View Full Version : Spark editor - importing

08-20-2011, 05:09 PM
I just got Natural Selection 2 the other day, and have been trying to figure out how to import custom meshs into the editor. meshs load fine, but they're always missing the texture in the editor (do show in the viewer though). Here's my notes going over exactly what I'm doing atm, let me know what part(s) I've got wrong:

--One time setup--
1. Run LaunchPad.exe
2. "create game", name the project whatever you want (ex: test_map), and set the directory to:
C:\Program Files (x86)\Steam\steamapps\common\natural selection 2\ns2
3. Create a folder somewhere to store your files (this will be used for compiling them). Inside it needs to have the following folders:
* materialsrc
* modelsrc
* mapsrc
* cinematics
* soundsrc
* ui
* lua
4. Run Builder.exe
5. Set up the Builder as such:
* File > Load Setup > builder_setup.xml
* File > Settings > Set "Source Directory:" to the source files directory you created before

--File imports--
1. Export model from 3d app as a DAE, and open it in notepad.
2. search for <library_images>, a few lines after that you'll find something like <init_from>c:/blah/my_model.dds</init_from>
replace the path with just the name of your model (sans extension), and add .dds to the end and save.
3. save out all of your textures as dx5 .dds files from photoshop.
If spec is in color, or you have a gloss map, then spec needs its own file. Otherwise just add it as the diffuse alpha.
If have gloss map add it to the spec maps alpha.
4. create two .txt file and rename them something like myModelsName.material and myModelsName.model_compile
5. In the .material file paste and modify this as needed (obviously dont include lines for map files you arnt useing):

<map type="texture" value="myModelsName_dif.dds" />
<map type="bump" value="myModelsName_norm.dds" />
<map type="specular" value="myModelsName_spec.dds" />
<map type="emissive" value="myModelsName_glow.dds" />
<map type="opacity" value="myModelsName_opacity.dds" />

6. In the .model_compile file paste and modify this as needed (yes, it does need the materials_path line exactly like that):

<geometry "myModelsName.DAE" />
<materials_path "" />
<scale "1.0">

08-21-2011, 02:07 AM
Did you use the dae exporter which comes with max or the ns2 one?

Edit: If you are using the max one because the one from ns2 doesn´t work download the newest one from here:

It could also be, that you have to change the dae by hand, look here for directions.