Model Compile Problem

TobiiTobii Join Date: 2010-01-10 Member: 70041Members
<div class="IPBDescription">Need some help..</div>Yes, i need help to compile a model..

For some odd reason, it won't work for me..

I have extracted the *.DAE file from max..

It has been placed in "C:\Program Files (x86)\Natural Selection 2\ns2\src\modelsrc\turret"

i made the *.model_compile file with this code;

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><model>
   <geometry "turret.dae" />
</model><!--c2--></div><!--ec2-->

I open launch pad, make a mod called "NS2 Model Mod" placed at "C:\MS2 Model Mod\", then open builer..

I load the "builder_setup.xml" choose "C:\Program Files (x86)\Natural Selection 2\ns2\src\" as path..

When i hit build the output is this;

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Rebuilding...
-------------------------------------------------------------------------
Build complete (0 seconds)
0 succeeded, 0 failed, 0 up-to-date, 2 skipped<!--c2--></div><!--ec2-->

What is it i do wrong? I have used the search function and found a few topics, but no luck really..

hope you can help!

Comments

  • PipiPipi Join Date: 2009-12-09 Member: 69550Members
    Have you correctly set your source and output folders?

    Have you used the Collada exporter from NS2? (and not the one that comes with Max)

    I've read something about windows 7 issue and administrator privileges that would cause some troubles.. but I can't tell you what exactly.
  • TobiiTobii Join Date: 2010-01-10 Member: 70041Members
    <!--quoteo(post=1767201:date=Apr 16 2010, 01:21 AM:name=Pipi)--><div class='quotetop'>QUOTE (Pipi @ Apr 16 2010, 01:21 AM) <a href="index.php?act=findpost&pid=1767201"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Have you used the Collada exporter from NS2? (and not the one that comes with Max)<!--QuoteEnd--></div><!--QuoteEEnd-->

    What Collada exporter are we talking about? The "ColladaMax.dle"?

    When i put that into plugins, i just get a error when i launch max..
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    edited April 2010
    I could be wrong, but doesn't the Launch Pad mods look at the Mod directory when compiling? As such, your model files should all go in there under the appropriate folder.
    I.E. C;\NS2 Model Mod
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    Check this I wrote in the Wiki

    <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Builder" target="_blank">http://www.unknownworlds.com/ns2/wiki/index.php/Builder</a>
  • TobiiTobii Join Date: 2010-01-10 Member: 70041Members
    <!--quoteo(post=1767282:date=Apr 16 2010, 03:52 PM:name=SgtBarlow)--><div class='quotetop'>QUOTE (SgtBarlow @ Apr 16 2010, 03:52 PM) <a href="index.php?act=findpost&pid=1767282"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Check this I wrote in the Wiki

    <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Builder" target="_blank">http://www.unknownworlds.com/ns2/wiki/index.php/Builder</a><!--QuoteEnd--></div><!--QuoteEEnd-->

    Thanks mate..

    This fixed the problem and made my day.. Thumps up!
  • ianmcmillianmcmill Join Date: 2010-04-29 Member: 71569Members, Reinforced - Supporter
    edited May 2010
    are there any errors know for compiling models under windows 7 64bit ?
    texture/material compile just fine but when it comes to compile the omen.model down in the verbose window i get an windows error saying the compilemodel.exe isnt reacting though the progress bar runs still till i hit "close programe".

    compiling only custom textures works fine.
  • TSSTSS Join Date: 2010-05-11 Member: 71716Members
    I'm having problems too with custom models. They build just fine, with 1 succes 1 skipped if i try to build an unskinned box, but as soon as i find it in the editor in the props window, or when i open it in the model viewer the program crashes.

    i've got 3ds max 2011 64 bit, which might be part of the problem. When i try to open the plugin included with the game, i get an errorcode 193-%1 is not a valid win32 executable (translated from dutch). As for Colladamax, i've tracked that down all the way to opencollada 1.30rc1 (since thats the only version that even installs for max2011, collada stops at 2009) but that crashes the compiler, so no dice there.

    So thinkin i was smart i've downloaded blender 2.49b, saved my file to a 3ds in max imported into blender and exported it under the 1.4 collada plugin, but it pretty much gives the same result - crashes when trying to view the compiled model in the editor or viewer.

    so 2 hours and several programs and plugins later, i'm stuck ^^ anybody got an idea what to do next?

    I'm running windows vista 64bit on a intel core-i7 2.66ghz with a nvidia geforce 275, all programs are 64 bit too. the model itself is a box, the model_compile file has nothing more then model tags and <geometry test_bookcase.dae /> in it (nevermind the name).
  • ianmcmillianmcmill Join Date: 2010-04-29 Member: 71569Members, Reinforced - Supporter
    i recently found a post by pipi i think. he had the same issue with the incompatible colladamax.dle for 3d max. he solved this issue with installting "a" directx sdk and c++2005 redist package.
    i have found another collada export plugin. it's free <a href="http://opencollada.org/download.html" target="_blank">http://opencollada.org/download.html</a>.
    OpenCOLLADA for 3ds Max works for my 3dsmax2010x64.
    yet this produces the "compilemodel.exe" lock up.

    there is another free collada exporter. <a href="http://sourceforge.net/projects/colladamaya/" target="_blank">http://sourceforge.net/projects/colladamaya/</a> .though i did not try this one yet.
  • ianmcmillianmcmill Join Date: 2010-04-29 Member: 71569Members, Reinforced - Supporter
    edited May 2010
    i've read your wiki sgtbarlow.
    the part "use the material tutorial but use other parts" may sound logical but after trying this for hours i end up tearing my hair.
    i compiled the model's material. the outputed dds is in my ns2/material/custom/ folder. i copied it to my nsmod/modelsrc/custom/ dir. i made a "modelname".material file with path to the ns2/custom/material/ folder. copied this material file to ns2mod/custom/modelsrc/ .
    then i wanted to make the compile file. but the wiki says ".model_compile should contain the line:

    geometry "my_model_name.dae"
    " is this the only line in this file ?

    after copying, modifing, creating, building, moving, renameing i dont no where right and left is anymore...

    always crashes on win7(64bit)


    PS.
    the trouble shooting guide with textures says i may have to edit the dae file.

    "<library_images>
    <image id="generic_litter_docume-img" name="generic_litter_docume-img">
    <init_from>models\my_folder\my_model_name.dds</init_from>
    </image>
    </library_images>
    "

    the example shows the modified .dae. my dae does not show any dds file from my model but the psd with path to the my ns2mod/custom/ folder. wonder if there is anything wrong.
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    You dont need to place the models texture in the materialsrc to get it to produce a DDS, the ModelsSRC folder will convert textures also.


    That is the only line you need in the model_compile file to get a basic model working but it wont be solid.
    A more compleate file looks like this:

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->materials_path    "models/props/refinery"
    geometry        "refinery_arch_beam.dae"
    physics        "refinery_arch_beam_physics.dae"<!--c2--></div><!--ec2-->


    If your library_images is missing then you have missed an option in your settings when exporting the .dae
    If you are using Blender, you need to press the "Use UV Image Mats" button.
  • TSSTSS Join Date: 2010-05-11 Member: 71716Members
    thought i'd update my progress on this ^^

    i managed to get a model in the editor without it crashing, the trick is in the material. when exporting from 3ds max, you need to make sure:

    - you have a material for your model, so a .psd (photoshop) file.
    - this .psd file has to be located in the compile directory of your mod (so mod/modelsrc/modeldir/something.psd), along with it's material file and the .model_compile file for the .dae. This is because the .dae refers to the directory of the material applied in max. if you move the material after, it cannot find the material.
    - assign the above material to the model in 3ds max's material editor.
    - export the .dae to the mod compile dir where the other files are.
    - directly build after that. you should get 2 bars now, after that with 3 items processed, 1 skipped (the skipped is the model_compile file).

    the editor accepts the stock 3ds max 2011 collada exporter, however currently my materials aren't showing up, instead a checker texture so something is still going wrong (read: i'm doing something wrong, probably in the max exporter), but atleast it doesn't crash anymore. the collada provided by the game still doesn't work in max 2011 64 bit, and i've given up on working with blender because that interface is so really confusing :p

    I'll try again later. I can't texture worth shiat anyway so i'm good for the moment :p
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    edited May 2010
    Check the .dae file to make sure the line for your textures is pointing to the .dds file not the psd file and that the path is set to the final export path.
    I do not know if the Builder takes the materials_path "models/props/refinery" entry and overwrites the path in the image_library line. Not made a model recently to check this out.

    I dont have this issue, mine will already be set to a .dds because I run the builder for the models textures in the modelsrc folder then load the .dds up in the Mapper in blender, so when I export its already pointing at "texture.dds" but contains the full drive path in the .dae, relative paths on colloda export does not work in blender so i just got to trim the down the path after exporting.
  • TSSTSS Join Date: 2010-05-11 Member: 71716Members
    edited May 2010
    succes! presenting: jupiter

    <img src="http://img245.imageshack.us/img245/6529/jupiterc.jpg" border="0" class="linked-image" />
    <img src="http://img263.imageshack.us/img263/3453/jupiter2.jpg" border="0" class="linked-image" />

    No collisions and only a diffuse texture :p Now for the weird stuff. The viewer was the key to my sollution since it has an output and gave a few errors. The problem was in the drive path, this is what i had in the .dae:

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><init_from>file://models\props\custom\jupiter.dds</init_from></div>

    The error i got from that was "couldn't open models/.material". so i changed it to:

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><init_from>models\props\custom\jupiter.dds</init_from></div>

    But then it gave the error "Couldn't open models/props/custom/models/props/custom/jupiter.material". Go figure.

    so this is what worked:

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><init_from>jupiter.dds</init_from></div>

    *cough*. i have no idea why this works, i also have no idea why the editor still shows the model untextured in the prop-preview window, while it's textured in the viewer, editor window and ingame. my .material file has "models/props/custom/jupiter.dds" in it. When i change this, my model becomes checkered again, however it's a *different* checker then my earlyer problem, which still haunts the editor preview.

    So i'm stumped but it works nonetheless. Thanks for the help SgtBarlow and good luck ianmcmill ^^
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    edited May 2010
    cool, did you use the line?: materials_path in your model_compile? might be why you got a double instance of models/props/custom.

    If the above is true then If you can stop Max from outputting a directory suffix in your export then you wont have to edit the .dae, then all you do is just specify that materials_path.



    Oh just a quick note, if you have any unusual files in your Source Folders for the Builder, The Builder will crash.
    I had a WinRAR file in there once and ran the Builder, this gave me a blue screen of death.
  • TSSTSS Join Date: 2010-05-11 Member: 71716Members
    edited May 2010
    no materials path in the model_compile file, that might be it. just this:

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><model>
    <geometry "jupiter.dae">
    </model></div>

    Though, if i add that path to the compile file, then i'd have to add it back into the .dae. So why is it even there in the first place then if it works without? (probably my preview bug thingy :p). I'll try that once i dare toutch my working setup again.

    On the note of crashes, im building straight into the main ns2 dir (no copy or anything) so im making sure it's clean. I also tend to delete files before a new build, just to make sure theres no overwrite errors. I've only had 1 weird crash, which happened after a long, long session and i accedentally tried extruding a line in a twitchy move, which just crashed my entire computer. No vista BSOD, no nothing, my screen went black monitor on standby. i had to do a hard reboot, booted vista up like normal, everything runs fine. wouldn't be able to reproduce that bug either. Aside from 2-3 random other program crashes, this is the most stable editor i've ever worked with.
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    That setup in your model compile is real old, not sure where you got it from. Should just be: (No XML Layout)

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->materials_path    "models/props/refinery"
    geometry        "refinery_arch_beam.dae"
    physics        "refinery_arch_beam_physics.dae"<!--c2--></div><!--ec2-->


    Could be a possible reason?
  • TSSTSS Join Date: 2010-05-11 Member: 71716Members
    It's because i had to piece that together from snippets here and there and an old PDF. Can't build new stuff with old info :p I've done a few more compiles just in the interest of updating that info :p

    i updated my model_compile file, but still the same issue. If i add the path to the .dae i get a double output. if i leave it as is, the preview is untextured but the model is. Maybe the preview tool caches memory and i simply need to refresh it somehow, which is what i'm guessing at the moment (since all the models loaded very slow the first time but now load fast).

    I also have to note again i'm using the autodesk exporter and not the exporter with the game because max2011 won't open it, which could cause any of the problems i'm having. I'm not a coder so i wouldn't know.
  • BAshhBAshh Join Date: 2003-08-26 Member: 20222Members, NS1 Playtester, Contributor
    edited August 2010
    So I finally got a model to compile and I wanted to share two things, one is to obviously make sure the

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'> <library_images>
    <image id="{image_id_psd}">
    <init_from>{image}.dds</init_from>
    </image>
    </library_images></div>

    Doesn't have the .psd, from when you saved your file from max (or whathave you)

    but, also in my <visual_scene> tag, I found a light tag that looked different from one I found on the web,

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'> <node id="ambient_light_node">
    <instance_light url="#ambient_light"/>
    </node></div>

    if you add {name="{name}" type="NODE"} to the <node id="{light}>, it compiles and works :)

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'> <node id="ambient_light_node" name="ambient_light" type="NODE">
    <instance_light url="#ambient_light"/>
    </node></div>

    This is in the .dae file exported by openCOLLADA for max.

    Hope this helps!
  • SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
    edited August 2010
    Are you not using: ColladaMax.dle found in Program Files (x86)\Steam\steamapps\common\natural selection 2 ?
  • BAshhBAshh Join Date: 2003-08-26 Member: 20222Members, NS1 Playtester, Contributor
    <!--quoteo(post=1794356:date=Aug 15 2010, 06:37 AM:name=SgtBarlow)--><div class='quotetop'>QUOTE (SgtBarlow @ Aug 15 2010, 06:37 AM) <a href="index.php?act=findpost&pid=1794356"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Are you not using: ColladaMax.dle found in Program Files (x86)\Steam\steamapps\common\natural selection 2 ?<!--QuoteEnd--></div><!--QuoteEEnd-->


    It doesn't work with 3dsm 9 / 09. 64 bit
  • brechtosbrechtos Belgium Join Date: 2008-04-18 Member: 64100Members, Reinforced - Gold
    <!--quoteo(post=1794397:date=Aug 15 2010, 04:58 PM:name=BAshh)--><div class='quotetop'>QUOTE (BAshh @ Aug 15 2010, 04:58 PM) <a href="index.php?act=findpost&pid=1794397"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It doesn't work with 3dsm 9 / 09. 64 bit<!--QuoteEnd--></div><!--QuoteEEnd-->

    The Colladamax included with the game is indeed not compatible with newer versions of 3ds max.
    I also had this problem. But no worries there are other ways to get the same result. Download the opencollada plugin from <a href="http://opencollada.org/download.html" target="_blank">http://opencollada.org/download.html</a> (Make sure you dowload the correct 3dsmax version according to your max install,32 or 64 bit.)

    When exporting use the OpenCOLLADA .DAE instead of the Autodesk Collada . DAE and be sure to check that relative paths is selected. I also turned of copy images and left the rest as their default values.
    This should work without any problems and there is no need to start messing around in the .DAE file to get the materials to work.
    For the rest just follow the nice video tutorial that Brian made (http://www.youtube.com/user/unknownworlds#p/u/9/sWw0_qHitto)

    Hope this helps some people who are having trouble with the issue.
Sign In or Register to comment.