Model compiling error

VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
Hey guys and gals

Something goes wrong when I try to compile :(
I used the collada plug-in that came with NS2, and I have followed Brian's import videos very closely, but something goes wrong when I try to compile the collada file.

I get this error message: <a href="https://dl.dropbox.com/u/6746387/error1.jpg" target="_blank">DROPBOX LINK</a>

Let me know what I got wrong here, please halp!

Cheers

Comments

  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited October 2012
    Don't use spaces!!

    The file path should be space free, the tools throw a fit.

    Also the normal tool has an incorrect directory path by default, so you have to manually run the normals after initial model compile.

    Also try and name your .psd file to the same name as the correcsponding model file, ie teapot.psd.
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    Alright thanks, I removed the spaces, but now I get this error :( <a href="https://dl.dropbox.com/u/6746387/sadface.jpg" target="_blank">Link</a>

    So are normal and specular maps converted the same way as the diffuse textures, but put in a different folder?
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    edited October 2012
    Normal and spec maps are like this, in a .material file the same name as your model:
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->shader = "models/marine/marine.surface_shader"
    albedoMap = "models/marine/heavymachinegun/heavymachinegun_view.dds"
    specularMap = "models/marine/heavymachinegun/heavymachinegun_view_spec.dds"
    normalMap = "models/marine/heavymachinegun/heavymachinegun_view_norm.dds"<!--c2--></div><!--ec2-->

    I think the convention is to have them all in the one folder together. Any .psd from your source folders will be converted to .dds

    Do you have compilemodel.exe in your naturalselection2 folder?
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    edited October 2012
    Thanks, its in the ns2 folder but named CompileModel.exe (with caps)
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    The caps is the same for all of us. I think, but maybe wrong, that your current issue stems from not having a materials file.

    I have had so many problems with models that I gave up, well took a break, and in the mean time my trial key for 3dsmax09 expired. So now I can't do anything model based even if I wanted too :P
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    I don't think it's the material file (normally you don't get that error until you try to open the model in the viewer)

    I think it is because your folders are not named correctly. Your source folders need to have specific names. "model2" should be renamed to "modelsrc" Also make sure you have your mod setup correctly in the launch pad.


    Here is a thread with someone who had a similar issue and solved it:

    <a href="http://www.unknownworlds.com/forums/index.php?showtopic=119161&hl=CompileModel" target="_blank">http://www.unknownworlds.com/forums/index....hl=CompileModel</a>
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    edited October 2012
    Awesome guys, thanks Wilson. Im aaalmost there, but I think they changed the formatting of the material file.

    <img src="https://dl.dropbox.com/u/6746387/almost1.jpg" border="0" class="linked-image" />
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    That is the old way...

    Look in any current materials file and see the new path, young jedi...
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    aha! success! Opened a material file and replaced file paths and such. But the shadows in the viewer are messed up though :I

    <img src="https://dl.dropbox.com/u/6746387/shadows.jpg" border="0" class="linked-image" />
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    I think that might be because you don't have spec or emissive map.
  • eh?eh? Join Date: 2012-03-03 Member: 147997Members
    That or a bad / missing normal map.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    I recommend using:

    specularMap = "materials/dev/black.dds"
    normalMap = "materials/dev/dev_normal.dds"

    This should fix your issue :)
    Unless you have a proper Normal Map or Specular Map to use :)
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    Thanks Soul_Rider, that worked really well :D

    Im gonna try to import a more complex model soon :)

    <img src="https://dl.dropbox.com/u/6746387/works.jpg" border="0" class="linked-image" />
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    By the way, I keep getting this error in the builder, though I dont know if its causing problems or what it is supposed to mean:

    <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->4> 'E:\Steam\steamapps\common\Natural' is not recognized as an internal or external command,
    4> operable program or batch file.
    <!--colorc--></span><!--/colorc-->
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    Seems like the Builder is trying to access the "Natural Selection 2" folder without accounting for the spaces in the folder name, which is why it is trying to open "...\Steam\SteamApps\common\Natural\", which doesn't exist.
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    Ok, I found out whats going wrong, my normal map isn't getting built :/

    I exported the map from Mudbox 2010, set the coordinates to tangent space and saved it as a .psd. Im also unsure how I should put it into the bump material slot in 3ds max, directly into the slot as a bitmap or through NormalBump?
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    I did mention in my first reply, the normals build path has an error, and you have to run it manually after you compile.....
    just create a batch file in the utils folder with this text:

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->nvcompress -normal -bc1 "Path to normal file" "path to output"<!--c2--></div><!--ec2-->

    As an example, here was the normal I had to make:

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->nvcompress -normal -bc1 "D:\pgmodelsrc\modelsrc\player\bmfg_view_normal.psd" "D:\pgmodel\models\player\bmfg_view_normal.dds"<!--c2--></div><!--ec2-->
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    edited October 2012
    Alright, what do I name the batch file, and do I need to point the builder to it or something like that? :I But i had the nvidia photoshop tools already installed so meanwhile I can save a normal map as a dds from there.

    I also successfully skinned and applied a specular and illumination map to this model (the spec and normal was baked into the base texture originally though, so a full refurbish takes some effort). 100 nostalgia points to those who recognize this dirty old wonder :
    <img src="https://dl.dropbox.com/u/6746387/a_wonder.jpg" border="0" class="linked-image" />
    <img src="https://dl.dropbox.com/u/6746387/sabre.jpg" border="0" class="linked-image" />

    Also, does anyone know how I can apply textures to multiple sub-objects in a model file?

    I have a huge and complex model that is divided into several objects, each with its own texture with specular and normal map layers, but I don't know how I properly organize and name the .material files.

    Brian's tutorial video uses a gorge with a sub-object on it, and has two textures that he successfully applies by first writing a primary material file for the main model texture and a secondary .material file with paths to the sub-object textures in it.

    I tried to do the same thing with my bigass model by using only two parts for simplicity's sake, but no success. I dont know what I should name the material file, should I name it the same as the sub-object or is it a way to use only one .material file with paths to all the sub-object textures in it?
  • Mr MoeMr Moe Join Date: 2009-12-17 Member: 69696Members
    Damn nice! Kinda looks like C&C or Dune to me. But I don't remember that logo so it's probably another great strategy game (which I bet I have played)

    Comm needs more awesome custom models like this one. I suck at modelling and am still noob in mapping, but I'm getting better and better and have great ideas for mods which will need models like that and other heavy weapons.

    I love it. Keep going!
  • VonDoomVonDoom Knee deep in the latency Join Date: 2009-10-08 Member: 68989Members, Reinforced - Shadow
    Nevermind, I solved it. I just needed to write a seperate material file for each texture with its own prefix, eg "part1_teapot.material" :D
  • FlakkFlakk Join Date: 2003-06-10 Member: 17202Members
    Bumping thread, because it helped me with the same problems :).
Sign In or Register to comment.