.obj -> .sur converter
-
Skotty. wrote:It is always the center of each single group.
TY Skotty. If that is the case, if I want the XYZ=0 being the center of the sur model and not each group, what settings should I use? I use the setting of groups=1 in the CMP exporter, and want to make sure that XYZ=0 of the sur file’s model is the same.
Side thought:
If I export cmp group=1 and use multiple groups to make the convex shapes for my .sur that gets exported to obj, even tho I label each group name the same as it’s source with the _lod1 extension instead of the _convex that gets defaulted to, Do I have to regroup all my sub-components into one group before the export to obj? Or can I leave them as is?Fus
-
The best way to use Schmackis sur conveter is in combination with P1p3rs CMP exporter, because both use the same center point calculation. If you use the old CMP exporter, the standard center will be 0. Schmackis sur converter won’t move any part, so just leave it where it is.
For the sur, leave EVERY convex group single. Just give all sur groups that belong to the same CMP group the same name.
You have to name the sur group exactly like its cmp group, so everytime add the _lod1 to the end (like you can read them out of your FIX file).
If you use multiple sur groups for a non root group, it may happen that the group gets another center point for its “secundary” group (= the group of the destroyed, cutted off part). In this case set the manual center point of the FIRST sur mesh entry of this group with the negated value of the FIX value of the CMP group. The manual center override will always be added to the automatic center, no override.It may be that I didnt answer your question on a way you wanted. I really have some problems understanding your questions.
-
Skotty. wrote:
The best way to use Schmackis sur conveter is in combination with P1p3rs CMP exporter, because both use the same center point calculation. If you use the old CMP exporter, the standard center will be 0. Schmackis sur converter won’t move any part, so just leave it where it is.Sorry I can’t do that. Pip3r’s .dll files don’t show up in my File/Import or File/Export of my MS3D 1.8.4, So I have to use CMP export 0.2 and Import 2.7.
For the sur, leave EVERY convex group single. Just give all sur groups that belong to the same CMP group the same name.
You have to name the sur group exactly like its cmp group, so everytime add the _lod1 to the end (like you can read them out of your FIX file).I do.
If you use multiple sur groups for a non root group, it may happen that the group gets another center point for its “secundary” group (= the group of the destroyed, cutted off part). In this case set the manual center point of the FIRST sur mesh entry of this group with the negated value of the FIX value of the CMP group. The manual center override will always be added to the automatic center, no override.
Now you lost me. Huh? My CMP’s don’t have a Cons/Fix node cuz I use the groups=1 default in the CMP exporter. (See SS)
Fus
-
This just get’s more confusing all the time.
-
Well, imagine then how confusing it was developing that tool for FL
@Fusion: The problem is: If you have a different polygon count than the original model (which is usually the case), you can get a different center point for all groups as whole. You would have to make sure that each center of the group of the model for the .sur file is on the center of the corresponding group of the real model. If you used the convex tool for each group and didn’t move them, then you can just move your collision model so that the center point for all groups as whole (meaning the center point of the model) is on the center point of your real model. Usually that also is the case then so you don’t have to change a thing. Automatic calculation of my tool will do the rest.
We really need a tutorial for this, I hope Skotty has the time for it anytime soon are someone else is willing to do this.
-
Hardpoints that are included in vanilla sur files should be included in the sur file if they are fitted to your model. If not then you will risk having intermittent crashes during combat if one of them is hit.
These are:
HpCloak01 (-xx)
HpCM01 (-xx)
HpMine01 (-xx)
HpMount
HpShield01 (-xx)
HpThruster01 (-xx)
HpTorpedo01 (-xx)
HpTurret01 (-xx)
HpWeapon01 (-xx)Hardpoints represented by the usual triangle only and not having a hardpoint sur mesh will generate the following message during the conversion:
“Warning, no matching vector pair found! Adding new Triangle Group.”Here below is an .ms3d file of vanilla hardpoint meshes, to normal vanilla FL scale.
Here is how to use them:
After exporting your model .cmp file, merge this hardpoint sur meshes file with your model in MilkShape, and save it as a new .ms3d filename so you don’t overwrite your model file, in case you need to make another .cmp file. I usually add “Surs” to the end of the filename, e.g. “myNewShip.ms3d” and “myNewShipSurs.ms3d”.
Make your model groups convex by selecting the ones you want and using the ConvexTool, then move each new convex mesh above the original group to maintain your group and hardpoints order. Ensure that the convex mesh name now has the same name as the original group and with “_lod1” suffix, and delete the original group. Do this with all the new convex meshes.
Then move each hardpoint Sur mesh you need to the place of the triangle representing your hardpoint, rename it to the same name as your hardpoint, and delete the original hardpoint triangle. The hardpoint meshes must be named “HpThruster01” etc, and must NOT have any “_lod1” suffix.
You can resize the sur mesh to suit the weapon or equipment that it is covering.
You can also make your own hardpoint sur mesh if you prefer, just be sure it is entirely convex and very simple.
Copy the same hardpoint mesh shape for more hardpoints of the same type.
Delete hardpoints in your model that aren’t in this mesh file, because they don’t need sur meshes, e.g. HpEnginexx (the engines use the sur shapes for the engine groups).
Finally, delete any hardpoint meshes for hardpoints that you don’t have in your model,e.g. HpCloak01, HpMine01, HpTurret01 etc.
Save again and export your .obj file, then use the obj-sur converter.
-
I attached a hexed version of Milkshapes Convex Tool. It doen’t add _convex but _lod1 to the end of the convex model. Its standard polycount is 256 instead of 1024.
-
Good stuff guys.
I also uploaded the correct ConvexTool, on the other thread.
I am still unclear if the converter adds the “_lod1” suffix to sur parts?
Just about to do some testing.
-
No, you must have the _lod1 in your obj file. The Converter adds nothing.
-
Right, yes I just saw that.
It’s probably better this way, because the Convex Tool adds “_convex” or “_lod1” for the modified version, so this will distinguish the convex parts from the originals in MilkShape until they are deleted.
I’ve modified my earlier post to correct it.
-
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?
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.
-
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.