.obj -> .sur converter
-
StarTrader wrote:
Skotty, Schmack:I am getting great surs, but I’m still not clear on how to use the group checkboxes, can you help please…
- I always check “Hardpoint” for hardpoints, of course.
- I always check “Static” for every group.
- I have not needed to make moveable parts yet.
- I don’t attach any group to another because I think this is to be used when I need to make a complex non-convex sur shape in a single part? I have not needed to do this yet because there is no 18-part maximum limit.
- If I remember, you mentioned that if nothing is checked for a part, that part will be attached automatically to “Root”, so if none of the parts have a check then this will result in a single-group sur file, all hits going to root?
Is this all correct, or do I really still not understand?
Seems correct to me, although I can’t say much to the attached groups, maybe Skotty can help here.
StarTrader wrote:
One more question please:I have tried, but I still didn’t understand the first option checkbox: “If maximum depth of a gap in connected triangles is not greater than x.x, use convex hull, else splice connected vertices”.
Heheh - this is pogrammers’ talk!! The negative expression doesn’t help me, nor does mixing triangles (faces) with vertices… I’ve tried using it but couldn’t see differences, probably because I don’t know what I’m looking for and used the wrong test shapes?
Does this mean: “If the distance between two faces is more than x.x units, then merge the vertices for both faces (delete the two faces), but if it’s less, use the convex hull function”?? If so, why please, I don’t understand the reason? I would have expected the opposite?
An example model would help for this please if you can?
Thanks guys.
This is not easy to describe. Maybe you can come up with a better description for the checkbox.
Basically you have to imagine that the converter looks in each group for connected triangles, that means some sort of shape. Now if this shape is determined not to be convex it tries to determine if there are any gaps in it. E.g. if you have a sphere cut in half the gap will be where the cut is. The maximum distance from the triangles inside to the plane which lies over the gap is the value you enter into the textfield. If the distance is smaller, the convex hull is being used, which means the gap is being closed and you get half the sphere with no opening. This is useful to reduce polygon count in cases where closing this gap does not matter for the collisions (e.g. you don’t need to fly into the halved sphere).
I hope this explains it
-
- I always check “Hardpoint” for hardpoints, of course.
- I always check “Static” for every group.
- I have not needed to make moveable parts yet.
- I don’t attach any group to another because I think this is to be used when I need to make a complex non-convex sur shape in a single part? I have not needed to do this yet because there is no 18-part maximum limit.
- If I remember, you mentioned that if nothing is checked for a part, that part will be attached automatically to “Root”, so if none of the parts have a check then this will result in a single-group sur file, all hits going to root?
The third point is not right:
The attach means you are able to parent a group to another group (instead to root). So just set this if you want to parent a group to another one.
With that you would be able to create some kind of group-chain, like a train where every wagon is a group and the locomotive is the root. -
Skotty. wrote:
With that you would be able to create some kind of group-chain, like a train where every wagon is a group and the locomotive is the root.Putting it as a last groups, connecting them like u said and marking them to be animated crashes the converter.
I am aware that its not suggested for player ships but wanted to see if on npc ship that can be animated. -
Well since that was a testcase we used we know it works. It would be helpful if you could post your .obj file and a screenshot of the configuration. You also can check static since FL behaves differently when you attach groups to each other. Also animation on players only work well with static groups (the name is misleading but the contradiction comes from FL here).
-
Thanks guys, I will try to make some test models when I have time to determine the results and I’ll get back to you.
-
This is my tryouts!
Still I didnt started animating them with vodka’s MS tut.
Ma aim is HIGH! A lot of animation I want to make!- Head, Tail and Wings to bend
- Legs to stretch
( maybe also to fart! ^^ )
For start I would be happy if I can have animation on head and tail. Second setting produces valid sur (first is I know maybe wrong).
And one more I need! As Im out of luck to make proper wireframe, possible from the attached .obj file to make one simple and transfer it trough UTF editor in original CMP?
Must be a way to somehow place 10-15 cubes for groups as wireframe. -
As Skotty wrote in the tutorial there seems to be a bug if you make the moveable parts not the last groups. Try moving the HpTorpedo01 group above the tail and head groups you want to make movable. I will try to fix it as soon as I have time (which wont be before mid march).
-
Like this? Same thing.
No rush, its not that important, main thing works.
Also, if one of parts is missing (like one wing), animations doesn’t work for rest. -
I was wondering if anyone was having similar issues:
When other ships, (players or NPCs) collide with the .sur there’s occasional freezing of the screen (for some lasts 1-2 seconds, other it’s 10-20 seconds). Sometimes, though, there’s crashing. I’ve used the latest version of the obj–> sur tool, so that’s not an issue. I put HpMount hardpoint on all the ships (or the wireframes don’t work). That’s it for hardpoints, though.
I just don’t know if it’s a problem the way I’m making them OR if it’s just something in the obj–>sur tool. I’m hedging my bets it’s on me, though.
-
Yep, my fault. I redid the weapon .surs and the lag is gone.
-
I had problem with O-shape sur’s, they work incorrectly, frequently it is possible to fly through by surface from inside of the object. How to a fix them?
On screenshot I have represented preparation of sur from 12 groups.
I have made much grouped sur’s for the ships, they work normally. -
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.