.obj -> .sur converter
-
The sur meshes of the newgate_sur weren’t convex. This could be a problem.
Another thing: Static objects without animation and single destructible parts don’t need to have more than the root group. So here it is just loading the obj, leaving all settings at they are and convert.I attachet the (not tested) hopefully working versions.
-
Thanks!
I import “newgate” and ship sur’s back to MilkShape, remove outer “bubble”, and reassembly sur’s. After that, >99% collisions detected.
I repeat this operation with “newgate” sur more times, while the amount of vertexes has ceased will decrease. After that, I have not fly through a surface. -
It is very important to ensure that all parts of the sur are convex. If even one is not convex, the sur will fail.
I have built surs successfully for hollow ships like the Brakiri’s rear body, you can fly through it and collide with all surfaces. The ring of that body is made of 8 sur segments. So we know it works, it just needs care because when we work with small parts it is easy to not see that a part is not convex.
Milkshape has the Convex Tool which sometimes doesn’t make a good convex part, so you need to inspect every convex part you make with it. Then, once all the convex parts are good, you can delete the original model parts and use the convex parts to make your sur, and that is really easy, and usually produces a good sur. But again, you do need to test the sur in the game too.
And for ships, don’t forget that Adoxa and I found that a lot of random crashes were happening because some of the needed hardpoint surs were missing from the sur files. There is a thread somewhere with all that info in it - it could be earlier in this one but I don’t have time to look for you.
Once you add in only these necessary hardpoints, you will have trouble-free surs for your ships too, so it’s worth doing.
-
Just additional: I never had any problem with Milkshapes Convex Plugin. I am using it for months and never had even one problem with it.
-
Ok, maybe you guys can help me with mine. I’ve uploaded my jumpgate and get a teribble sur. I’d don’t reallty undertsand the process using the convex tool. I’d like to understand what you mean by convexing parts of it. Just so you know, it’s animated in the cmp file. Sorry, but I am trying to learn. Oh, and my shitty sur is packed in there as well.
-
For animated objects you need of course single groups, for surs, too.
In my signature is a tutorial that should tell you everything about the SUR Converter you need to know.The convex tool is pretty easy to use.
Chose surfaces of your model that are some kinds of “extremes”. The convex tool will create a shape around them so they will create a new, convex mesh.
I always do it this way: Removing all surfaces except those wich roughly describe the shape of the mesh I want to have there.I just attached a working version of your sur. I did it on the same way as I just described. I also added a little picture how it looks in the Converter.
-
Well I tested it out. The main part that doesn’t move, works 100%. The rotating part, doesn’t. Don’t get me wrong here I appreicate the effort. I see what you mean with the convex tool. But I thought surs had to have under a certain amount of parts. Or am I wrong on that?
-
SURs can have as many parts as you wish. But always keep in mind: the more parts/polygons, the more the computer has to calculate. In Freelancers case, the physics are rather simple and you always have to see the object in its real size. If it is really big, for example this jumpgate, don’t hesitate to use a lot of groups. If it is a little object, nobody will ever notice the inaccuracity.
I just tested around with the object because just before you wrote I was talking with Schmackbolzen about the program again.
I found out: we never tested what happens if you want to create moveable groups with more than 1 mesh. In your case, I put them together with “Belongs to”. As you see, it doesn’t work right. The better/correct way would be to give all meshes of the same group the same name (as you do with static sur meshes).
And here is the current problem: Because we never tested this we never noticed the bug the converter has. So, for now, moveable groups are just working if they are single meshes or, maybe, if they are sticked together with Belongs To.A little workaround for you:
Make all the ring objects static, too. Because it just rotates, the player won’t notice the moving parts that much as he does on normal jumpgates.(In general, always keep in mind what the player will notice and what not, so you can simplify surs as much as possible.)
-
I will try to fix this in the upcoming weeks, not that easy to find though.
-
I tried to use MilkShape ConVex Tool:
1. Load prepared .ms3d, Ctrl+A, ConVex Tool, Del, Export to .obj.
2. Convert .obj to .sur, without checking second checkbox.
It’s easy and worked fine with “newgate” sur (big tube), but it does not work with this sur: -
Did you use “smoothing groups” –> select 1/assign after deleting the non-convex ie: original sur parts?
-
No.
I tried, no effect for this sur. -
Many collisions not detected, especially from the inside.
It happens that the sur does not detect any collisions for several seconds at a time (sur may be “offline”?).
msConVexTool.dll has not contain information about the version, file size is 110 592 bytes. I not found another versions.Updated:
Another version ConVexTool from page 22 of this topic, same result. -
Just a general note:
If someone has problems with converting surs, it would be extremely helpful to have a picture of what you did in the Obj - Sur Converter!When using the Convex Tool you dont need to smooth any group. Just delete all “original” meshes and export it.
The meshes of your sur are absolutely correct.
I also have the same problem you have with this sur. This seems to be a bug in the program. At least, it always happens again. I merged a few meshes together, so changed the structure a bit, but it’s still not working.
So this is something I cannot help with. You just could try to rebuild the meshes or change their positons etc. Maybe reposition the whole model. -
msConVexTool.dll…size is 110 592 bytes
That’s too big imho. I’ve got 2 different convex tool:
- v1–-> 45056 bytes
-v1.1 —> 53248 bytes
I don’t know what kind of convex tool you use but I suggest to try the versions posted above I belive they can be found at the download section.
Anyway, Skotty is right, sometimes this error caused by the program itself and there is no solid way to fix it. You might try excluding each surs from the first to the last and find that one which is responsible for the trouble. It’s gonna take several hours though.
But it’s really weird, I had same problem when I used ms.sur exporter. Since I started to use otsc I haven’t had this issue. - v1–-> 45056 bytes
-
This might be related to the not identical tree my program generates. It would be helpful if you try to find vanilla .sur files which have a similar geometry and look how they solved it. If they used some tricks it is a bug of Freelancer. You should post it so that Skotty can add it in his tutorial then.
If not I can use your geometry for further testing, but it will take some time until I can have a look at it.
-
@ Davis: You don’t need to discuss about the “right” Convex Tool. Version 1 and Version 1.1 and the one I uploaded on Page 22 (Version 1.1 with _lod1 ending except _convex) are ALL working as they should!
As Schmackbolzen said, I am always open to help people with their Sur-Problems since I experimented a lot and know how to use Schmackbolzens program the optimal way. Also how to make them fit with P1p3rs CMP exporter is my speciality if you use multiple groups with Fix/Rev/Pris entries.
Does ANYONE has interest in more tutorials?:
- how to create optimal physical models of your object
- how to use the Sur Converter for simple objects
- how to use the Sur Converter for fighters
- how to use the Sur Converter for battleships
- how to use the Sur Converter for stations
-
Davis: Skotty didn’t take offence, by “you don’t need to discuss” he means “you don;t need to worry about” - he’s not a Brit or Yank, so make allowances for language, most people here are bilingual and English is their second language. How well do you write in German?
The two versions of Convex Tool are similar but one opens a dialogue box asking for a value before executing the convex process. That value is a distance that it will lift the sur away from the model surface. As it should be 0, I don’t use that version so that I don’t have to press an additional key.
The other version of ConvexTool that Skotty mentions is just fixed to rename the convex parts to partname_lod1 ready for sur generation - the original tool renames the convex parts to pertname_convex so it is necessary to rename each part to partname_lod1 manually - this would need another step. We like shortcuts.
Remember, despite Skotty’s no experience of problems using the Convex Tool, I have had some. So just be aware of the possibility of a convex part not being totally convex if you have problems with your sur.
And in ship surs, certainly you can omit all sur hardpoints - just be prepared for intermittent crashes that you can’t account for. I tested my surs over several hours and crashes were happening after from between 5 minutes and sometimes over an hour of heavy intensive NPC vs NPC combat testing. In game I was getting random crashes maybe days apart, or sometimes as soon as a player entered the system the sur was used in.
If you test your sur by flying round a single ship fitted with it, and blasting and bumping it, you won’t see these problems. But when you give your sur to one NPC faction and blast them continuously using enemy NPCs, you will see a different story. If you clean up your surs in this way (add the minimum necessary hardpoint surs) and test by this NPC combat method overnight without failure, then you have bulletproof surs and that is surely a good thing. Many mods are plagued by intermittent crashes. This is one cause of those, and we know it can be easily removed.
As my good pal BejayMac often used to say, I’ve taken the horse to the water, and now it’s up to the horse to drink, I can’t force it to drink.