.obj -> .sur converter
-
I’m writing a command line converter in C++, which using more model fixes, and .ini files for best usability.
Now supports - import from .cmp/.3db/.mat/.ms3d, export to .cmp/.3db/.mat.
Also, i’m need for fully correct .sur files, i’m working now for this.
I would like a good understanding, for what is needed and how they must be made the opposite triangles, for create correct code. -
Jolly_Roger wrote:
I’m writing a command line converter in C++, which using more model fixes, and .ini files for best usability.
Now supports - import from .cmp/.3db/.mat/.ms3d, export to .cmp/.3db/.mat.
Also, i’m need for fully correct .sur files, i’m working now for this.
I would like a good understanding, for what is needed and how they must be made the opposite triangles, for create correct code.It’s better than ms3d-s cmp exporters ?
-
Perhaps one day the FL community will get out of the stone age and stop using the trash heap that is MS3D. I mean, there’s already a 3ds Max exporter that works much better.
-
I like the stone age… its free… and it does pretty much everything you need if you use the correct plugin versions.
Certainly the stone carvings are not that easy to be done… but well… there are plenty of free and compatible tools that are easy to use.
-
FriendlyFire wrote:
Perhaps one day the FL community will get out of the stone age and stop using the trash heap that is MS3D. I mean, there’s already a 3ds Max exporter that works much better.Getting away from what you call stoneage is very expensive, isn’t it? MS3D and all related plugins are really trash, but least people have either enough money, a company or whatever license for 3dsMax. And it also excludes users of programs like Blender.
Would it be a neutral converter as Schmackbolzens obj-sur-converter is, then everyone could do it with whatever program they want. That, in my opinion, would be the best solution for every modder.
-
I absolutely agree that an importer would be better than a plugin (though we’d need a richer format than OBJ to have all relationships and data, FBX being the most likely candidate), but until then 3ds is still better.
MS3D wasn’t free for the longest time and that didn’t stop anyone (and no, people did not buy it). On top of that, 3ds Max is free for students, all you need is a student email address.
-
FriendlyFire wrote:
On top of that, 3ds Max is free for students, all you need is a student email address.Not everyone is student and fewer are student for lifetime.
-
I have already the Max plugin. But why not see how this one works ?
FriendlyFire wrote:
FBX being the most likely candidate), but until then 3ds is still better.Why not blender .blend. 100% free, open source and you can do everything that you can do with 3ds.
-
cata123 wrote:
Why not blender .blend. 100% free, open source and you can do everything that you can do with 3ds.Don’t forget that except Blender most other software can’t handle .blender files. Obj, FBX and Collada are very common and every good modeling software can handle it.
-
Im too old for becoming student again… all the alcohol… all the parties
-
Actually, you dont need to be a student, or have a student email. You can gain access to a educational licensed version by specifying your a ‘mentor’…any email address will do.
However milkshape has some definite benefits over 3ds max, most importantly its size (25mb vs 6-8gb) 3ds is fine if your planning on doing tons of model creation, but if you just need to convert model formats then its serious overkill -
Personally I’d not recommend to do any sort of conversion with milkshape due to how limited feature support is there, namely vertex color and transparency, multiple uv maps. Even basic stuff like vertex normals aren’t well supported across formats and has a tendency of screwing up your stuff. If someone wants to make a good importing/exporting tool they’re better off converting between collada and FL formats. Collada has all the necessary features for FL models and is fairly extensible even within its validation schema.
-
From what I got you would like to have settings for each file. I can write that so that e.g. mass convert takes this into account. If there is demand? I don’t know how many still use this tool.
-
I write a complete solution, without any clicks, with automatic binding of all vertex, parts, hardpoints offsets in .cmp and .sur files.
I need the ability to quickly correct any problems, and make new features without waiting for the another developer.
The only complexity moments for me were - bits-section and convex hull.
I would be grateful for the help by source code, primarily msSURExporter V1.3. -
The feature with reading certain parts from cmp files was planned, but I never started it since not many people seemed to need it. Using the model itself was deliberately not done, since you need special collision models.
If enough people ask I would be willing to extend this tool further, but so far this seemed not to be the case.
I think you underestimate what it takes to write correct sur files, but we will see.
-
Thanks Adoxa!
Schmackbolzen
First of all, you need to create the correct information about the parts in .cmp, before parsing by .obj -> .sur converter. There are problems with other exporters, if part is ‘Rev’, ‘Rris’, or chained over other (not ‘Root’) part.
Also, I have implement the automatic connect hardpoint meshes from separate .ms3d file.
I try to exclude such routine work. -
Is there anything known about the lag issue of surs when colliding with them?
I seem to have the issue on new station models no matter if I use the obj2sur converter (latest version) or the 3ds max tools.
It also does not seem to matter if I let the tools run their job on the model (cmp version), a detail reduced version (rough shape) or even a version which only consist of purely convex shapes.The lag starts when forcefully colliding with the station after some time. NPCs also seem to cause these kind of issues in rare occasions.
I’ve read that the lag issue is know… and fixed but… it still happens… dunno. -
I’d reckon performance issue you’re having is caused by obj2sur breaking down concave hulls into triangle hulls, which you should avoid at all costs. If you have hitbox comprised of hundreds of hulls then it’s obviously a very bad situation. Individual hulls in a hitbox are expected to be convex and that’s just how it should be. Lastly obj2sur often generates incorrect BVH tree.
Just use surface builder in maxlancer for 3ds max to create hitboxes.
-
The thing is I went the path of creating perfectly convex shapes prior using obj2sur and maxlancer
Since the days of the milkshape sur exporter I avoided concave shapes.
Obj2sur in the latest version even has the “yes I am sure that everythign is 100% convex”-option which I of course tried (without different results, sure the sur is smaller because there is no splicing but the lag remains)The station models are relative complex, with negative space for docking bays etc.
To ensure everything is convex I created a simplified version of the stations which I broke down into groups of convex shapes to mimic the overall shape. That was the adviced method ever since we were able to create own surs.Since I observed these issues with obj2sur I tried to use maxlancer and its sur builder. But even there I can observe these lag issues.
I tested multiple export methods.
In one method I imported the simplified sur model with convex geometry groups from a different program and then exported it with maxlancer
In a different try I allowed the sur builder to generate the convex hull shapes, then exported the model with the sur.
There seem to be multiple export options in maxlancer… I tested them all.
In every case I am able to reproduce the lag issue by bumping my ship into the station often enough. Depending on the method used it takes a bit longer to break the game.
I am not sure what I am overlooking right now.The use of maxlancer was adviced to me by somebody helping me with some refresh of older 3d models but even there I noticed that his models which purely were done with the surface builder can trigger the lag issue.
So I am not entirely alone with this problem.The BVH tree you mentioned (correct me if I am wrong) is the color coded stuff you get when enabling the hierarchy option on the sur import in maxlancer, right?
I discussed this possibility as error source with 2 other modders a few weeks ago.
If so, is there a way to fix this?
Even the surs generated by the surface builder of maxlancer have these yellow and red boxes sometimes. I am not sure how to avoid that. The one post I was able to find about that was not so clear to us.