CLICK HERE to visit the new NS2 Wiki! Please do not rely on any information here as it may be inaccurate and/or out of date! For help with NS2, hop onto the official Discord server!

Importing Custom Textures

From NS2 community wiki
Jump to: navigation, search

Getting Started

After setting up the Builder you will have your "materialsrc" folder all ready to go.

PSD/TGA/PNG file types in your materialsrc folder should work.

Folder Structure

Source files:

  • YourModName\materialsrc\Your_Custom_Output_Folder_Name\your_texture_name.material
  • YourModName\materialsrc\Your_Custom_Output_Folder_Name\your_texture_name.psd
  • YourModName\materialsrc\Your_Custom_Output_Folder_Name\your_texture_name_normal.psd

Exported files:

  • Steam\steamapps\common\natural selection 2\ns2\materials\Your_Custom_Output_Folder_Name\your_texture_name.material
  • Steam\steamapps\common\natural selection 2\ns2\materials\Your_Custom_Output_Folder_Name\
  • Steam\steamapps\common\natural selection 2\ns2\materials\Your_Custom_Output_Folder_Name\

Creating ".material" file

You must create a ".material" file for each of your custom textures. The easiest method to do this is by copying an existing ".material" file, and pasting it in the same folder as your own textures.

The ".material" file must be named the same as your texture. "your_texture_name.psd" should have a "your_texture_name.material" file.

Open the .material file and make it look something like this.

       shader = "shaders/Level.surface_shader"
       albedoMap = "materials/Your_Custom_Output_Folder_Name/"
       normalMap = "materials/dev/"

albedoMap is your main texture.

normalMap can be swapped with a custom normal map e.g. "materials/Your_Custom_Folder_Name/". Place "your_texture_name_normal.psd" next to your main texture's PSD.


Now you can go to the Builder and click: Build > Build.

It should convert your textures to DDS and put them in the output directory (steamapps\common\natural selection 2\ns2\materials\Your_Custom_Output_Folder_Name)

Using the Texture

Now load the Spark Editor. Your material should be in the list.


  • Naming the "materialsrc" folder to "materials" may fix an issue with the texture being put in the wrong location ("ns2\materialsrc" instead of the correct location "ns2\materials") after compiling.