NoMansSky:TEXTURE Files

From Step Mods | Change The Game
Nomanssky flare.png

TEXTURE.MBIN Files

Description[edit | edit source]

TEXTURE.MBIN files contain configurations for creating different layers of procedural recoloring used by models in-game.
With them, it is possible to create different patterns and decal choice sets for every model. This is how an animal may have stripes on their skin but then spots on another variant, or none at all.

These TEXTURE.MBIN files exist in the same folder where basic TEXTURE maps exist.
It is not yet fully understood at what point these are loaded but it is preferable to name a TEXTURE.MBIN the same as the basic name of a diffuse DDS map. TEXTURE.MBIN files are not referenced anywhere in MATERIAL nor SCENE files, either.

If a texture's name is CAR.BODY.STRIPE.DDS, the TEXTURE.MBIN should be named CAR.TEXTURE.MBIN.

If the initial texture name is simply CAR.DDS, it is preferable to rename it to add two words as in the example above as these words are referenced in the TEXTURE.MBIN. More information about this matter is seen in the example below.

Warning-Logo.png
WARNING:
The .DDS extension must be in uppercase ! .dds files are not used by the game !

TEXTURE Nodes[edit | edit source]

Procedural Texture List[edit | edit source]

For each TEXTURE.MBIN file, there are 8 pre-defined Procedural Texture Lists, or layers.
Unlike other MBINs where structs can be freely added or removed, TEXTURE MBINs always have 8 layers but not all layers need to be used (although at least one is necessary).
Layers are ordered from top to bottom, so the first layer (layer 0) is overlaid on the next (layer 1) and so forth until the last layer.

Procedural Texture[edit | edit source]

For each layer, there can be one or more procedural textures defined but the game will only pick ONE procedural texture per texture list though.
Each procedural texture relies on a color diffuse map. The idea is that, depending on the selected palette, a hue shift will be performed on the RGB channels of a chosen diffuse map and pixels will be removed based on the ALPHA channel, used as a transparency mask.
This allows one to create different decal sets, 'paintjobs', or patterns of a certain object.
Much like doing a hue shift adjustment on Photoshop, black, grey and white pixels receive the least influence.

Example[edit | edit source]

Suppose there is a model of a car. The car has a basic paint coat, and it has a racing stripe of another color that runs through it.
The desirable output is that this car's basic paint layer and racing stripe will change colors every time.

For this, it is necessary to provide two diffuse texture maps that will be used as a color map:

CAR.BODY.PAINT.DDS - Car basic paint color.
CAR.BODY.DECALSTRIPE.DDS - Racing stripe print with an alpha channel specifying the pixels of the cars color stripe.


The CAR.TEXTURE MBIN will be setup like this:

Procedural Texture List (layer 0) <Name = "BODY">
  Procedural Texture <Name ="DECALSTRIPE">
Procedural Texture List (layer 1) <Name = "BODY">
  Procedural Texture <Name ="PAINT">

In this setup, the color of the body will always be different from the color of the racing stripes and that the racing stripes will be laid OVER the basic paint.
Now, suppose we created another pattern - a flaming vinyl as an alternative decal set for the same car called CAR.BODY.DECALFLAME.DDS.


The TEXTURE MBIN setup would look like this:

Procedural Texture List (layer 0) <Name = "BODY">
  Procedural Texture <Name ="DECALSTRIPE">
  Procedural Texture <Name ="DECALFLAME">
Procedural Texture List (layer 1) <Name = "BODY">
  Procedural Texture <Name ="PAINT">

In this new set, the car in-game will either have a racing stripe or a flame decal, but not both at once.

Keeping texture colors[edit | edit source]

To keep some diffuse texture original colors, simply set the ALPHA channel to PURE BLACK.
If you are using that diffuse map's alpha channel as a metalness map, however, you can also use set Palette to "Rock" and ColourAlt to "None", effectively making no hue shifting happen.