Spark's .model format...

BeigeAlertBeigeAlert 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
Is this a proprietary format by UWE, or is it some other prexisting specification?

Could I possibly get some documentation on the format? I'm thinking of taking a crack at writing an importer for Blender.

Comments

  • JoseppeJoseppe Join Date: 2012-01-21 Member: 141497Members
    edited August 2014
    Options you have:

    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 ;)
  • ObraxisObraxis Subnautica Animator & Generalist, NS2 Person Join Date: 2004-07-24 Member: 30071Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Silver, WC 2013 - Supporter, Subnautica Developer, Pistachionauts
    The .model format is based off the collada format. Specifically, the exported version using 3DSMax 2009. Other versions are not supported.

    The CDT has a lofty goal of addressing this issue in the long-term.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    I would assume that the simplest way to do it owuld be compare the spark collada exporter with the standard collada exporter and see what the differences are, then try and edit those into the collada exporter for blender.
  • BeigeAlertBeigeAlert 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
    edited August 2014
    Obraxis wrote: »
    The .model format is based off the collada format. Specifically, the exported version using 3DSMax 2009. Other versions are not supported.

    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. :(
    Soul_Rider wrote: »
    I would assume that the simplest way to do it owuld be compare the spark collada exporter with the standard collada exporter and see what the differences are, then try and edit those into the collada exporter for blender.

    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...
  • InsaneInsane Anomaly Join Date: 2002-05-13 Member: 605Members, Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Subnautica Developer, Pistachionauts, Future Perfect Developer
    It's our own format, specific to the Spark engine. I think we released the specs to the .level file format a while back - you could always try e-mailing Max.
  • BeigeAlertBeigeAlert 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
    Insane wrote: »
    It's our own format, specific to the Spark engine. I think we released the specs to the .level file format a while back - you could always try e-mailing Max.

    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.
  • cooliticcoolitic Right behind you Join Date: 2013-04-02 Member: 184609Members
    AFAIK .model sounds like a container to me.
  • VetinariVetinari Join Date: 2013-07-23 Member: 186325Members, Squad Five Blue, Reinforced - Shadow, WC 2013 - Silver
    BeigeAlert wrote: »
    Insane wrote: »
    It's our own format, specific to the Spark engine. I think we released the specs to the .level file format a while back - you could always try e-mailing Max.

    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).

    Just wait until im back home
Sign In or Register to comment.