Natural Selection Wiki
Natural Selection Wiki

So you want to use custom texture In Spark an Natural Selection 2 ? Great ! This is the place.

Convert your file to TGA[]

First you need to convert your file to the *.tga format.

You can use software like PhotoFiltre or GIMP

You can also use this website

Put your TGA in "source\materialsrc" of your project

Convert your file to DDS[]

DDS is a Direct Draw Surface file.

In Launchpad, use "Builder" and Then Build > Build.

Go to "output\materials" and your *.dds should now be there. Don't move it.

*.Materials File[]

A *.material file needs to be in the same folder of your dds (It's basically a text file)

For your texture, you can use this example *.material :

shader = "shaders/Model.surface_shader"
albedoMap = "materials/yourtexture.dds"
normalMap = "materials/dev/dev_normal.dds"
specularMap = "materials/dev/dev_white_spec.dds"
surface = "thin_metal"

Change "yourtexture" by the name of your file, then Relaunch Editor and everything should be fine.

Additionnal Note : If the texture appears black in the preview, go to

%appdata%/Natural Selection 2/cache

and delete the content there.

Going Further with *.Materials[]

You can go to SteamApps\common\Natural Selection 2\ns2\materials\ to see how dev made materials.

Here is a list

shader[]

Is used to set the render mode of the texture

shader name Usage
shaders/Level_alpha.surface_shader decal
shaders/Model.surface_shader wall
shaders/Model_emissive.surface_shader light

albedoMap[]

Is used to set your actual texture

normalMap[]

Is used to set the bump mapping of your texture, giving it height.

Example : veil ceiling normal map :

Veil ceiling 01 normal

specularMap[]

Is used to set the reflection of your texture

opacityMap[]

Is used to ?????

emissiveMap[]

Is used to ?????

surface[]

Is set to defines the physical properties of a material, it affects impact particles, footstep sounds etc..

Surface Name Usage
metal Metalic surface
thin_metal Everything else
rock Rocks (Summit or Mineshaft textures for example)
electric Lights or Computer
organic Trees, Plants and Aliens
Surface tool Effect
tunnel_allowed
no_ip No Infantry Portal
no_evolve No Alien evolution
nocling skulk can't cling to that surface

Wetmaps[]

Since update 333 wetmaps have been added :

- Added “wetmaps” to the game.  This allows mappers to specify regions that should appear “wet” or “damp” without having to modify materials to create wet variations of them.  Similar to fog volumes, mappers can specify “wetmap volumes” — areas bounded by an arbitrary mesh volume and give it a “wetness” value.  Then, the sharp edges can be smoothed over by placing wetmap decals.

Download Free Textures[]

Beware of the copyright of your picture. "Free" doesn't mean you can use it in a commercial project. Instead, search for "Open Source Texture", like these :

https://opengameart.org/textures/all