Multilayered: Cyberpunk's supershader
Substance Designer 2077: How it works and why it's actually super
Last updated
Substance Designer 2077: How it works and why it's actually super
Last updated
Published: Last documented edit: Oct 15 2024 by
This page describes Cyberpunk's multilayered supershader.
This wiki contains multiple guides about editing multilayered materials, such as:
For editing .mlmask files: Textures: Custom MultilayerMask
For editing .mlsetup files:
Everyone asks this question in the beginning, but you're only a single epiphany away from a change of mind. The multilayered shader can pack up to 20 layers of texture into a single file! Read on to find out how it works.
A significant portion of assets for Cyberpunk 2077 leverage the complex multilayered.mt supershader. The supershader has several different component files which are used to create masks to blend procedural textures without baking them. You can read more about this technique in this documentation by CDPR Technical Art Director Krzysztof Krzyścin.
While the multilayered supershader is very common, there are hundreds of other non Substance-style shaders, some with traditional baked PBR textures.
For a list of shader properties in multilayered.mt, see Multilayered Material: Properties
The multilayered shader is composed of three distinct parts:
Layer Masks | Mask textures that control where each surface is visible .mlmask files
Layer Definitions | Controls procedural effects such as tiling or color for each layer .mlsetup files
Layer Surfaces | Links PBR textures to create numerous pre-defined visual surfaces .mltemplate files
For editing mlsetup files, you'll want to use the MlSetupBuilder (download)
MLMASK files are the core element of the substance-style integration. These files contain an array of up to 20 textures which are used to control the blending between pre-defined surfaces called mltemplates. These mask textures are more-or-less 1:1 with substance-style layer masks.
As shown above, each mesh using the multilayer shader uses a unique mlmask file that is hand authored by CDPR artists. To take effect in game, each mask file is linked by the mlsetup file.
MLSETUP files are fairly self-explanatory when considering the name, multilayer setup. These files correspond with an mlmask file and are responsible for setting up parameters for each layer from the mlmask. Each layer within an mlsetup contains information very similar to materials or shaders.
To edit .mlsetup files, it's recommended that you use the MLSETUP Builder software.
For a definition of the properties, see Multilayered Material: Properties.
For a guide on how to edit one, check R&R: Colour Editing.
MLTEMPLATE files are the actual visible surfaces that appear on meshes using the multilayered.mt supershader. The multilayer templates include a wide variety of surfaces such as steel, iron, aluminum, plastic, nylon, linoleum, carpet, soil, grass, rubber, concreate, and everything else imaginable. Each template can use a unique color, normal, roughness, and metallic PBR texture. The mltemplate files are selected from within each layer definition of an mlsetup file. Meshes can blend up to 20 mltemplate surfaces into a single material by masking them with the mlmask.
Multilayered Shaders |
---|
engine\materials\multilayered.mt |
base\materials\multilayered_clear_coat.mt | Adds clearcoat effect |
base\materials\vehicle_destr_blendshape.mt | Adds procedural vehicle damage |
base\materials\cloth_mov_multilayered.mt |
base\materials\multilayered_terrain.mt |
base\materials\ver_mov_multilayered.mt |
multilayered
Texture Channels | Red | Green | Blue | Alpha |
---|---|---|---|---|
GlobalNormal | Normal R | Normal G | ? | ? |
MaskAtlas | ? | ? | ? | ? |
Name | Description |
---|---|
MultilayerMask | See mlmask |
MultilayerSetup | See mlsetup |
GlobalNormalIntensity | Sets visual intensity of normal map texture |
GlobalNormalUVScale | Sets the scale of the normal map in relation to the uv map (equivalent to tiling) |
GlobalNormalUVBias | ? |
MaskAtlas | ? |
MaskTiles | ? |
Layers | ? |
LayersStartIndex | ? |
SurfaceTexAspectRatio | Sets number of mlmask layers to be used |
MaskToTileScale | ? |
MaskTileSize | ? |
MaskAtlasDims | ? |
MaskBaseResolution | ? |
SetupLayerMask | ? |
NormalsTextureDDXYMultiplier | ? |
MicroblendsTextureDDXYMultiplier | ? |