No Man's Sky Modding Wiki
No edit summary
Tags: Visual edit apiedit
(→‎Mask Map: Added info about Mask Map blue channel)
Tag: Visual edit
Line 14: Line 14:
 
* Red channel - ambient occlusion bakes are attached here.
 
* Red channel - ambient occlusion bakes are attached here.
 
* Green channel - a roughness map is used here.
 
* Green channel - a roughness map is used here.
* Blue channel - has something to do with detail textures but is largely unused for most models
+
* Blue channel - has something to do with detail textures but is largely unused for most models. (Blue channel appears to be for determining where custom colors are applied while base building - White receives primary color, grey (I used #7b7b7b) receives secondary color, and black retains original texture color.)
 
* Alpha channel - (most likely unused)
 
* Alpha channel - (most likely unused)
   

Revision as of 11:59, 5 February 2018

NMS uses DDS images as texture maps. As such, it is highly recommended to use the nVidia DDS plugin for Photoshop, GIMP, or in whatever preferred image editor of choice with DDS file writing capabilities.

Due to the way shaders have been written inside the game, the arrangement of textures overall differ from what is more commonly known in other game engines. The most commonly used shader in NMS is called the Ubershader and functions similarly to Unity's Standard Shader (physically-based rendering) but with a few differences as discussed below and in the MATERIAL page.

Usable Texture Maps

Diffuse Map

The basic diffuse is practically the same as a basic 2D texture in most engines. The map contains RGB data containing the albedo colors for your object's texture. It is important to take note of the way channels are read by NMS's shaders.

  • RGB channels - color information for your albedo map.
  • Alpha channel - this channel is used for metalness, transparency, and emissive textures. (all these material flags read from the same channel and as such, you can't have all of these flags running at once)

Mask Map

The mask map contains other color information used by NMS.

  • Red channel - ambient occlusion bakes are attached here.
  • Green channel - a roughness map is used here.
  • Blue channel - has something to do with detail textures but is largely unused for most models. (Blue channel appears to be for determining where custom colors are applied while base building - White receives primary color, grey (I used #7b7b7b) receives secondary color, and black retains original texture color.)
  • Alpha channel - (most likely unused)

Normal Map

As of the Path Finder update, NMS now uses standard XY/RG normal maps. Yay!

The normal map in NMS's engine is apparently stored differently from the normally known blue normal maps and is apparently similar to normal maps in Starcraft 2, looking orange in appearance.

  • Red channel - this channel is always apparently white
  • Green channel - remains the same as in a standard blue normal map.
  • Blue channel - always remains black.
  • Alpha channel - whatever used to be in the red channel is now here instead.

With that in mind, it is possible to convert standard blue normal maps to the NMS version and vice versa manually by just copying colors between color channels in your preferred image editor.