Mesh files

Hello, I was looking at the mesh files for sins and it looks like it's gonna be quite a bit of work to reverse engineer so I was wondering if anyone was already working on it or had reversed engineer the file format already.

Doing the graphic editing suite for galciv wasn't too hard, I cheated by using the extremely cryptic pear editor but without any way of fiddling and seeing the changes it could become painful.

Cheers!
53,001 views 91 replies
Reply #1 Top
You won't have to reverse engineer it. We'll provide all the mod tools neccessary before release.
Reply #3 Top
and when will that be?


Shortly before or after the release of the game.
Reply #4 Top
Well, that's kind of sad. I was hoping for a nice challenge
Reply #5 Top

It won't be released for awhile - try and beat us to it

Reply #6 Top
It won't be released for awhile - try and beat us to it


Argh.

It's painful enough to make fitting planet textures and changing .particle files already. And that are minor issues.

Now I don't want to mess with meshes too.
Reply #7 Top
Aw come on, how hard is it to mess with meshes

But seriously, I did make some small progress. Some parts are starting to make sense after staring at multiple mesh files for a while. I was hoping for more clues in the format but oh well. At this point I really should try to look at the assembly but I don't want to go there, so I'm trying various things to get more clues.

I tried spying all the read write/operations on my machines, to see what was read and how but as luck would have it you have a modern engine and are streaming the files to memory instead of doing the reads piecemeal on the disk ;(.

Oh well, I did find some data structures I'll write it down if someone else is interested.

Vanderburg: How did you edit the particles? When I looked at it, they were binary files.
Reply #8 Top
Well, so far I managed to find out how to add guns to all my ships, move around or add stuff like engine exhausts etc. It's pretty neat to see a cap ship fire away with twice the amount of fire points. No vertex data yet thought ;(.
Reply #9 Top
Vanderburg: How did you edit the particles? When I looked at it, they were binary files.


Hex editor.

It's a pain but with comparing different files to each other, I was able to make custom weapon animation and stuff work.

But it's more trial and error than true understanding.

Especially since I have no clue what the code in the .fx files really means. I never programmed graphics before.
Reply #10 Top
I'm pretty sure the .fx files are just shader files.
Reply #11 Top
I'm pretty sure the .fx files are just shader files.


Yeah, they may very well be that. Doesn't help me since I've no clue what the commands there mean.

The highest programing language I know is C++ and even there I never made much with graphics...
Reply #12 Top
Well, I found the vertices. Now it's only a question of time, looking at all the little missing bits to fully flesh out the file format.

Then the part that I like less comes, I whish I could farm it out to someone else . I have to actually write the app to convert mesh to the sins format and make an editor to fiddle with sins specific attributes. It's not that it's hard, it's just time consuming and there's no more puzzle heh.

Anyone feels like helping?

Btw, I'm not too sure which format would be best to import to sins since I'm not an artist. Anyone with preferences?
Reply #13 Top
Btw, I'm not too sure which format would be best to import to sins since I'm not an artist. Anyone with preferences?


.max (3d studio max format)

.dxf (AutoCad format) I could then use it with my old CAD programs...
Reply #14 Top
<3 autocad
Reply #15 Top
You can't do max format I think. You can write an importer/exporter for max but max format is a mix of script and stuff if I remember correctly. I was thinking 3ds .
Reply #16 Top
3ds is pretty universal, alot of different modelling programs can use that format to import/export. There's also other programs that can convert 3ds into just about any other format, even autocad.
Reply #17 Top
.obj is common in most editors. Collada (an export/import plugin for maya and 3dmax) is decent to use.
Than again, I'm not really sure what those file types hold. .dae (collada export) holds physics and other junk that isn't needed.
Reply #18 Top
Well, I can import the models now in milkshape 3d. I just need to make it work the other way around now .

Sins importer

To be honest it would in theory work but there's a bunch of value I'm unsure of their use for now. Makes me think it probably won't work all that smoothly.
Reply #19 Top
kool, further than I thought you'd get:)

I still remember making him:(
Reply #20 Top
Milkshape 3d is a very good beginner tool, but it is also very limited. You cant multi texture with MS3D (use more than 1 texture per group, as it will only read 1 texture in that group. Open a multi-textured model in ms3d, and you will see). I dont believe ms3d supports shaders the way sins uses them being as it is a basic modeler. In any case i still use it. Even if only to convert between file formats, or to mirror components which 3dsmax screws up sometimes. It is well worth the price Mete Ciragan is asking.

Good job on the MS3D importing! Those extra values are probably the shader references, and hardpoint locations of the model

As Darkshimmer said .3ds is the most common 3d file format, and almost every modeling program can support 3ds in some way. Obj is the 2nd most common, and like with 3ds most programs can support it. There are some differences between obj, and 3ds. Which you will see when you convert between formats.

I prefer 3ds mainly because 3dsmax is my tool of choice.

My question is can you use a "non-solid" mesh in sins (a "solid" mesh is a mesh that is completely sealed with no intersecting triangles like what is used in SFC3, and Bridge Commander)
Reply #21 Top
Yes, geo can be open "non solid" as you said. The shaders are set up at export time. For the artists. all we did was plug in textuers into 3 main areas in a material, the exporter does the rest. As for other info, it's possibly UV and tangent info.
Reply #22 Top
Well, the extra values are not the hardpoints, I got that working. I found one, it was the distance at which it was switching from the 3d model to the 2d icon. Who would've thought this was in the model file .

As for the shaders, maybe, maybe not. There might be parameters for them, I don't know. The bulk of the unknown data that I worry about is vertex data. There's 17 float value per vertex. I identified 3 position values, 2 texture coordinate and the rest is a mystery. I would've said rgb and normals maybe but I don't think they would be using per vertex normals because of the bump mapping. I don't know, shaders really aren't my thing. I worked with them a bit just because I felt I had to know about them but that's it.

PS: tristangoodes I'm disapointed in your lack of faith, of course it would work
Reply #23 Top
Perhaps if the sins dev's are nice they can assist you with the MS3d plugin (other dev's have with other games) By pointing you in the right direction as far as what values do what.

Good to know about the non-solid mesh's. Now i dont have to rebuild my entire mod fleet
Reply #24 Top
You could wait till the tools are released. BTW< I modeled the trade ship;) > Vasari were my babies
Reply #25 Top

As for the shaders, maybe, maybe not. There might be parameters for them, I don't know. The bulk of the unknown data that I worry about is vertex data. There's 17 float value per vertex. I identified 3 position values, 2 texture coordinate and the rest is a mystery. I would've said rgb and normals maybe but I don't think they would be using per vertex normals because of the bump mapping. I don't know, shaders really aren't my thing. I worked with them a bit just because I felt I had to know about them but that's it.


Can't really tell you much. Not really allowed.