# Multilayered Material Properties

## Summary

**Created:** Jan 14 2024 by [mana vortex](https://app.gitbook.com/u/NfZBoxGegfUqB33J9HXuCs6PVaC3 "mention")\
**Last documented update:** Apr 07 2024 by [mana vortex](https://app.gitbook.com/u/NfZBoxGegfUqB33J9HXuCs6PVaC3 "mention")

This page documents multilayered shader properties.

* For an **overview** of glass shaders, see [cheat-sheet-materials](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/references-lists-and-overviews/cheat-sheet-materials "mention")-> [#multilayered](https://wiki.redmodding.org/cyberpunk-2077-modding/references-lists-and-overviews/cheat-sheet-materials#multilayered "mention")
* For an **explanation** of material properties and further links, see [](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/materials/configuring-materials "mention")

{% hint style="warning" %}
If a layer with a greyscale mask is invisible, set MicroblendContrast in the `.mlsetup` to 1!
{% endhint %}

## Multilayered Material

For a full documentation, check the corresponding [page](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/materials/multilayered).

To set it up, use these keys for the "values" array of your material:

|                 |                                                                                                                                                                  |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GlobalNormal    | path\to\normal.xbm                                                                                                                                               |
| MultilayerMask  | path\to\mask.mlmask ([white file](https://wiki.redmodding.org/cyberpunk-2077-modding/references-lists-and-overviews/cheat-sheet-materials#white-multilayermask)) |
| MultilayerSetup | path\to\material.mlsetup                                                                                                                                         |

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-c39f934c02352ede65f9cf2201fbf7eceedb54ef%2Fmaterial_docu_multilayered_example.png?alt=media" alt=""><figcaption><p>an example multilayered material</p></figcaption></figure>

## Material properties

### colorScale

Sets a color from within the [mltemplate](#what-is-the-mltemplate) file. Hex codes corresponds to rows and columns in substance painter.

### material

Depot path to the base material [mltemplate](#what-is-the-mltemplate) from which the surface inherits its properties (lightbreaking, subsurface scattering…).

Example values:\
`base\surfaces\materials\paint\car_paint\car_paint_metallic_01.mltemplate`\
`base\surfaces\materials\metal\enameled_hq\enameled_hq_01_30.mltemplate`

### matTile

**Scaling** (tiling multiplier) of the material across the mesh. The higher the value, the smaller it is.

### metalLevelsIn

Clamps metalness **input** levels. This value corresponds to a (generated?) greyscale texture across the entire mesh.

### metalLevelsOut

Clamps metalness **output** levels. This value corresponds to a (generated?) greyscale texture across the entire mesh.

### normalStrength

Applies or ignores the base mesh's normal map to this layer. This value can be greater than 1!

### offsetU

For logos: X-offset on the texture. Used for e.g. targeting a certain label.

### offsetV

For logos: Y-offset on the texture. Used for e.g. targeting a certain label.

### opacity

Transparency of the layer, 0 means that it isn't displayed, 1 means that it's fully visible.

### roughLevelsIn

TODO

### roughLevelsOut

Determines the roughness of a material

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-d2d7611afe7560387afd639e5d32fa6f875cb81f%2Fmultilayered_properties_roughness.png?alt=media" alt=""><figcaption><p>How roughness affects a material (the colour was not changed)</p></figcaption></figure>

## Microblend properties

{% hint style="danger" %}
You can only use microblends if this layer's mask is not fully white.
{% endhint %}

### mbTile

Like [#mattile](#mattile "mention"), this determines the scaling of the microblend. The higher the value, the smaller it is.

### microblend

Depot path to the base microblend texture (xbm), a seamless pattern which will be projected on the surface. Think of an extra normal map that tiles across a layer.

### microblendContrast

A crossfade between the layer mask and the microblend mask (the black parts of the microblend texture). If you set this to >=1, then the layer will be blocked out where the microblend texture is black.

This requires the xbm's AlphaChannel (transparency) to be set up.

### microblendNormalStrength

Like [#normalstrength](#normalstrength "mention") for the microblend.

### microblendOffsetU

X-offset for the microblend texture.

### microblendOffsetV

Y-offset for the microblend texture

## multilayered\_clear\_coat.mt

Discovered and shared by [Rebecca](https://discord.com/channels/717692382849663036/1082772930892664943/1358835907905589431), thanks a tonne!

Using ClearCoat lets you put additional hues over an mlsetup:

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-2fad75a3a520f4ac7d75e6aa82c795fea1a8e8e6%2Fclearcoat_1.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-e7d64e923658f5c0d2f13473595cc274811b306e%2Fclearcoat_2.png?alt=media" alt=""><figcaption></figcaption></figure>

Please note that this uses light colour mixing!

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-951a69dc6558f6d02f637da8a99e6b293998a1c1%2Flight_colour_mixing.png?alt=media" alt=""><figcaption></figcaption></figure>

## multilayer\_blackbody\_inject.mt

Putting multilayerblackbody\_inject.mt into debugging mode allows for the addition of emissives on top of your multilayer setup. The simplest example of this is on the DLC magic rune katana.

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-b5618f8222c0be01dc8c8d5fcde1bcabf662da28%2Fml_bb_inject.png?alt=media" alt=""><figcaption><p>Material Setup for Emissive Multilayer Setup</p></figcaption></figure>

<figure><img src="https://1427525421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4gzcGtLrr90pVjAWVdTc%2Fuploads%2Fgit-blob-9482d49460e5f2956d1fa7691aa1deae2a2de775%2Frebecca_kicks_icon.png?alt=media" alt=""><figcaption><p>Example of Emissive on top of mlsetup<br>Emissive painted on the UV DamageTypeRGBMask</p></figcaption></figure>

Debug and MaximumTemperature are required to be 1 to stop the whole mesh from randomly flashing.

You can also use FireHSV or PoisonHSV combined with red and green layers on the mask to create three different Emissive masks on a single xbm file; however through testing it's currently assumed only one can be used at a time. However you can change the % Hue value to use any colour for the emissive.

An additional texture can be added with DamageTypeNoise. This texture can be scaled with the x/y numbers of the UV setting and scrolled with z/w numbers. More contrast can be added into the noise by increasing the value of IntensityAdd.
