Spark's .model format...
BeigeAlert
Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
in Mapping
Comments
1) Ask UWE:
But you will not get any information on this, i guess.
Its there own engine and they want to protect it.
If they would release information about the model specification, you could open & edit the official models.
If you dont want to edit & reuse the models in another application you can just use the spark-model-viewer.
2) Reverse Engineering:
You can learn assembler and get your hands on Hex-Rays Decompiler to decompile the viewer / builder.
But you need a lot of knowledge of assembler. Btw, the viewer / builder are protected against debuggers.
Example: Glidors U-Model by Konstantin Nosov
The guy did create a upk-decompiler (unreal format) by reverse engineering the unreal format specification.
Maybe you can get some information in the forum to get an idea how difficult this is.
3) Manually:
Create the minimum stuff needed to compile a model from 3ds max with builder-application into spark model format.
Then look at the hex code and try to identify segments. Start with an empty model and add an edge or vertices and run
the builder application step-by-step & compare the outputs. But i dont know if this is really worth it.
4) Community Developer Team Membership:
Try to get into the CDT to get your hands on the source code / specification.
Ok, this will probably not happen after they noticed this thread :P
5) Wait 10 years
They released the NS1 Source after ~10 years, so maybe it could happen in 2024 for NS2
The CDT has a lofty goal of addressing this issue in the long-term.
Huh? I'm not talking about what goes in the "source" folder, I'm talking about the .model file that builder will spit out. It's a binary file, collada is an xml file.
EDIT: Or is that exactly what you meant? Is the binary file just a non-human readable version of the DAE?
And @Joseppe that's what I've been trying to do, studying the format in a hex editor. A bit more complicated than the .level format.
I tried doing this a while back... but couldn't pin point what the difference was that was causing builder to discard the provided physics mesh and generate a whole new one. Need to take another crack at it one of these days...
Yea the .level format I'm all over, it's how I managed to make my blender exporter for spark (and the arc range utility that nobody seems to care about). I haven't had too much time for ns2 lately, but I tried dissecting a .model file a while back, and it's MUCH more complicated than spark geometry. Gonna take me a long time to reverse engineer it.
My goal with this is enable importing of models into spark (ones that we don't have the source for, ie props) to fix the really awful collision geo some of them have (rock props, rock props, and especially rock props ). But this would also open the door for creating animated models for things where cinematics won't cut it. A while back, I made a "skulks with shotguns" map (sws_metro) and my original plan was to have a train come screaming through there every half minute or so, wiping out everything on the track. Cinematics don't sync up properly for this to work (ie they can activate late if you are out of range), so it'd have to be an animated prop if that was to work. Not having access to the train models, there was no way for me to animate them.
Just wait until im back home