Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
How materials work, and how you can configure them
This page gives an explanation and overview about material properties. For more detailed explanation of a specific kind of material, please check the nested pages in the wiki's file tree, or check the "next" link at the bottom of the page.
If you want to see a list of materials grouped by class, check Cheat sheet: Materials
If you want to learn how material assignments work on the object, check 3d objects: .mesh files
If you want to understand reusable material templates, please check Re-using materials: .mi
The Modding Guides section has multiple guides on editing materials, e.g. Changing materials, colors and textures or Textured items and Cyberpunk materials
The properties of a material (or a shader) are defined in its shader file. Those files have the extension .mt
or .remt
and are widely used and extended.
You should never replace a .mt
or .remt
— this will affect every single thing using the material.
If you want to change specific surfaces, look out for the right .mi
file and change that, or create one and start custompathing.
You can find a wiki page with an overview of shaders under Shader Docs, but it needs expanding. Maybe you'd like to contribute?
You can see a material's default properties by opening the .(re)mt
file in WolvenKit and inspecting the parameters array.
yourMaterialType > .remt|.mt
Any properties that you don't overwrite by adding them to your CMaterialInstance or .mi file will take the default properties specified in the file.
Here, you can also see what value a shader template will use if you don't give it any properties.
The interesting bit is on the right side of the arrow in the picture above, since it specifies the type of parameter:
Whether or not a material can be transparent depends on the shader. Transparency can be switched on/off via the EnableMask
property, or clamped via AlphaThreshold
(see #shared-properties).
Whether or not a material emits light depends on the shader, e.g. metal_base.remt
supports this via the Emissive
texture property.
For a documentation of this, see Emissive Material Properties.
This section will list properties that are common to many materials and give a short explanation of what they do.
Not all materials use all of these properties.
The same parameters can be named differently across different shaders (e.g the base texture can be called BaseColor
, Diffuse
, or Albedo
).
Properties with texture paths can end in Texture, e.g. BaseColorTexture
instead of BaseColor
.
As this is a horrible mess, it is easiest to look up the properties in the shader if you're not certain.
This page documents glass shaders and their properties.
For an overview of glass shaders, see Cheat sheet: Materials-> #glass
For an explanation of material properties and further links, see Material properties
To turn on material transparency, the EnableMask
property must be set to True
!
Cyberpunk's glass material, such as base\materials\glass_onesided.mt
All glass materials can consider the vertex color attribute, which you can edit directly in Blender.
Find a ready-to-use bottle glass .mi here.
For a glass material without view distortion and warping, use base\vehicles\common\materials\glass_windshield_tinted_black.mi
Find a ready-to use glass .mi file here
base\environment\decoration\electronics\devices\device_neokitsch\textures\device_neokitsch_glass_black.mi
base\fx\shaders\parallaxscreen.mt
Find a ready-to-use example of a turned-off screen here.
Download the .mi file here
You can see the material in action on mana's Barong Tagalog mod, or download the .mi file from the resource repository
Properties of emissive (glowing) materials: Let There Be Light
This page documents glass shaders and their properties.
You can make engine\materials\metal_base.remt
glow by adding the correct parameters, or you can poke through the game files and search for emissive > .mi
to find Cyberpunk material templates to learn from.
You can find the shader under base/fx/shaders/device_diode.mt
The properties need to be documented at some point
Last documented update: Apr 20 2024 by
To find a shader template, use the (you can copy the query):
Type: CMaterialParameter… | CKeyValue | explanation |
---|---|---|
Property name(s) | Explanation |
---|---|
Created: Jan 14 2024 by Last documented update: Jan 14 2024 by
Parameter name | Value |
---|---|
Property | Value | |
---|---|---|
Created: Jan 14 2024 by Last documented update: Jan 14 2024 by
For an overview of emissive shaders, see ->
For an explanation of material properties and further links, see
For a list of such templates, check
Find a ready-to-use glowing .mi file .
Vector
Vector4
A vector with X, Y, Z, W (coordinates and space). This is also used for colour values (Wolvenkit usually supports those).
Texture
RRef:Texture
A texture (.xbm) via DepotPath
Color
Color
A color (RGB/color picker)
MultilayerMask
RRef:MultilayerMask
a multilayerMask (.mlmask
) via depotPath
MultilayerSetup
RRef:MultilayerSetup
a multilayerSetup (.mlsetup
) via depotPath
Scalar
CFloat/CDouble
a numeric value with decimals. Float has 7 decimals, Double has 15
TextureArray
???
a texarray via depotPath
StructBuffer
???
RRef:.hp
A hair profile (.hp) via depotPath
LayerTile LayerScale
Material scaling (zoom on surface) > 1 zooms in, >1 zooms out
Roughness Rough
Whether a surface is rough or smooth. White: full, Black: none
Metalness Metallic
Whether a surface is metallic or not. White: full, Black: none
Normal GlobalNormal
A material's bump map. Yellow normal maps are called swizzled.
BaseColor Diffuse Albedo
A material's base colour value. This is usually a colour, but it can also be a vector4. Wolvenkit usually supports this, but if you don't see a colour picker, please write a ticket (and use the color picker .blend)
AlphaThreshold
Clamps transparency. (TODO: how exactly?)
EnableMask
Should the material enable masking? (will use the diffuse texture's alpha channel)
Mask
A mask (transparency) texture (like a layer mask in Photoshop)
Opacity
float, 0.0 - 1.0
: Controls glass transparency.
GlassTint
A texture to tint your glass. (TBD: Does it work as a mask?)
TintColor
Glass tint as RGB (copy from e.g. mi_neokitsch_fridge_z_emissive.mi
).
IOR
Index of refraction as float, 1.0-2.0:
The refraction properties of your material.
Refraction Depth
float 0.0-10.0:
Control refraction amount here.
FresnelBias
float, 0.0 - 2.0
: How much does the glass behave like a lens (that is, warp the picture behind it)?
BlurRadius
float, 0.0 - 1.0
: Blur amount when looking through the glass
VertexColorTint
float, 0.0 - 1.0
: Transparency of vertex colour tint
Opacity/OpacityBackFace
float, 0.0 - 5.0
: Controls glass transparency. OpacityBackFace will only affect inside-facing normals.
FrontFacesReflectionPower / BackFacesReflectionPower
float, 0.0-10.0
: How strongly should the glass reflect?
TintColor/TintSurface
Surface and refraction color as RGB (copy from e.g. mi_neokitsch_fridge_z_emissive.mi
).
ParalaxTexture
Texture that your screen should display, e.g. base\materials\placeholder\black.xbm
LayersSeparation
1
ScanlinesIntensity
0
ScanlinesDensity
0
Emissive
0
Roughness
0.200000003
Metalness
0
baseMaterial
base\materials\glass_onesided.mt
TintColor
white (220, 220, 220, 0)
IOR
0.100000001
NormalStrength
5.74905014
Roughness
base\materials\placeholder\black.xbm
GlassRoughnessBias
0
BlurRadius
1
baseMaterial
base\materials\glass_onesided.mt
enableMask
true
TintColor
RGB
colours the material
IOR
0.300000012
Index of refraction
Opacity
1
the material's transparency will be determined by the mask texture
NormalStrength
2.74905014
MaskTexture
texture (black/white)
black parts of the mask will not be affected by this material
Roughness
texture (black/white)
use base\materials\placeholder\white.xbm
for maximum roughness
Normal
texture (normal map)
path\to\your\normal_n01.xbm
GlassRoughnessBias
0
???
MaskOpacity
0.629999995
0 - 1, controls glass opacity
BlurRadius
0
will blur the things behind the glass
Emissive | path to emissive texture, e.g. |
EmissiveEV | float, e.g. |
EmissiveColor | Glow colour as RGB (copy from e.g. |
Properties of the multilayered material
This page documents multilayered shader properties.
For an overview of glass shaders, see Cheat sheet: Materials-> #multilayered
For an explanation of material properties and further links, see Material properties
For a full documentation, check the corresponding page.
To set it up, use these keys for the "values" array of your material:
Properties of textured (PBR) materials
This page documents textured (PBR) shaders and their properties.
The most commonly used material for anything textured is engine\materials\metal_base.remt
. Despite its name, this material isn't necessarily metallic.
To make your mesh load a texture, use the following CKeyValuePair
s in your material's "values" array:
The .xbm is a container around the texture. Export the xbm to png via WolvenKit.
If your texture has any brightness issues in-game, toggle around the isGamma flag during import.
The expected isGamma
settings are:
normals: false diffuse/albedo: true anything that is used in .inkatlas files: true
The most commonly used material for anything textured is engine\materials\metal_base.remt
. Despite its name, this material isn't necessarily metallic.
To turn the material into plastic, use the following CKeyValuePair
s in your material's "values" array:
Created: Jan 14 2024 by Last documented update: Jan 14 2024 by
Created: Jan 14 2024 by Last documented update: Feb 20 2024 by
For an overview of PBR shaders, see ->
For an explanation of material properties and further links, see
To use this material as emissive (light), check
You can change the colour of a texture on-the-fly by using the BaseColor
property (color picker blend file )
The material can be transparent by setting enableMask
to True
(and make sure its not overriden in the ). When set, the material will use the alpha
channel of the BaseColor.
You can find a ready-to-download template .
GlobalNormal
path\to\normal.xbm
MultilayerMask
path\to\mask.mlmask (white file)
MultilayerSetup
path\to\material.mlsetup
LayerTile | Material scaling (zoom on surface) > 1 zooms in, >1 zooms out |
BaseColor | path to your texture.xbm (Diffuse/Albedo) |
Roughness | path to your roughnessMap.xbm (if you have one) |
Metalness | path to your metalnessMap.xbm (if you have one) |
Normal |
BaseColor |
|
Normal | optional: path to your normal map |
Roughness | optional: path to your roughness map |
RoughnessBias | 0.200000003 |
BaseColorScale |
Animated materials and their properties
For a list of effect materials, check Cheat sheet: Materials -> #fx-shaders
This shader glimmers
base\fx\_shaders\metal_base_glitter.mt
base\fx\_shaders\holo_mask.mt
base\fx\_shaders\hologram.mt
Holo material (example .mi)
base\fx_shaders\oda_helm.mt
You can find a mesh-as-effect as component inside base\characters\cyberware\player\a0_003__mantisblade\appearances\a0_003_wa__mantisblades_edge.app
Created: Jan 14 2024 by manavortex Last documented update: Jan 14 2024 by manavortex
This page documents liquid shaders and their properties.
For an explanation of material properties and further links, see Material properties
Cyberpunk has its own liquid shader(s) such as base\materials\fillable_fluid_vertex.mt
. Projecting this material onto a submesh will turn the submesh into a transparent container filled with the liquid you specified. If you flip the container on its head, the fluid will drain to the bottom and fill it up again.
To control the offsets, you need to adjust the vectors FluidBoundingBoxMax and FluidBoundingBoxMin.
It shares various properties (such as IOR, FresnelBias, BlurRadius) with the glass shader.
Find a ready-to use (black) liquid .mi file here.
Hair and skin shader
Published: Apr 05 2024 by manavortex Last documented edit: Apr 05 2024 by manavortex
This page gives an explanation of properties for the hair and skin shaders.
You can look up different hairstyles and -colours under Cheat Sheet: Hair
You can look up information about skin under Cheat Sheet: Body and Cheat Sheet: Head
Or you can learn more about Custom Tattoos & Scars
Or you can learn how to make a custom hair profile with the Wolvenkit Blender IO Suite
path to your normalMap.xbm ()
Colour as x/y/z values (color picker blend file )
BaseColor
path to your texture.xbm (Diffuse/Albedo)
BaseColorScale
an RGB color value
Roughness
path to your roughnessMap.xbm (if you have one)
Metalness
path to your metalnessMap.xbm (if you have one)
Normal
path to your normalMap.xbm (if you have one)
TintColor
liquid's color as RGB (copy from e.g. mi_neokitsch_fridge_z_emissive.mi
).
FillAmount
float, e.g.0.0
: Probably works in combination with the bounding box. You'll have to experiment.
FluidBoundingBoxMin FluidBoundingBoxMax
Vectors (X, Y, Z, W) controlling the maximum distance from the container's walls. Each value is a float (decimal) speficying the axis in question - you'll simply have to play around with them (you can ignore W). For a bottle material I've used Max: 0.03, 0.03, 0.155 Min: -0.03, -0.03, 0.09
Strand_ID
Texture - Paths to an identity map (.xbm
).
This is a greyscale texture where every masked hair strand has a single, unique greyscale value. gradientEntriesID
colour gradient in hair profile (.hp
) is mapped to this texture.
Strand_Gradient
Texture - Paths to a root map (.xbm
). This is a greyscale texture with a vertical black to white gradient from root to tip. gradientEntriesRootToTip
colour gradient in hair profile (.hp
) is mapped to this texture.
Strand_Alpha
Texture - Paths to an opacity mask texture (.xbm
). Black = fully transparent. White = fully opaque.
RoughnessScale
Scalar with a decimal value between 0 and 1.0. Determines how rough or smooth hair material look. 0 = least rough (high specular, shiny reflection characteristics). 1.0 = most rough (high diffuse, matte reflection characteristics). Hair will look unnatural if this is too low (shiny).
See#roughness-metalness for a picture
RoughnessBias
Scalar with a decimal value between 0 and 1.0 that is applied between min and max RoughnessScale
, which changes the suddenness of its onset.
AlphaCutoff
Flow
Texture - Paths to an anisotropic rotation map (.xbm
). Anisotropy is a reflection characteristic of materials with fine grooves/ridges predominately following the same direction. The reflection will become blurred and stretched perpendicular to the direction of the grooves.
FlowStrength
Scalar with a decimal value between 0 and 1.0. Anisotropic materials have unique reflection characteristics as a result of their grooved/ridged surface. The more anisotropic a material is, the more its reflection is influenced (stretched/blurred) by the direction of its grooves/ridges. 0 = fully isotropic. 1.0 = fully anisotropic. Hair should have high or full anisotropy.
VertexColorStrength
Scalar with a decimal value between 0 and 1.0. Determines how much influence vertex colour has in the material. Vertex colour is a mesh attribute (colour, red channel). Cyberpunk hair meshes are vertex coloured red on the cap mesh and the innermost layer of hair clumps. They fade to black at the outermost layer of hair clumps. RGB 255, 0, 0 = max dull/dark. RGB 0, 0, 0 = max bright/glossy.
Scattering
Scalar with a decimal value between 0 and 1.0. Effect is not well understood at this time. Related to some internal light scattering function in hair shader. It affects the colour and reflection characterics of hair materials. There is some interaction between this and advanced game options for hair rendering. Specifically AlphaShifts R, TT, TRT (light scattering modes), single scattering and multiple scattering. Default values can be overridden with CET console commands. e.g. GameOptions.SetFloat("Editor/Characters/Hair/AlphaShifts", "TRT", 0.375000
ShadowStrength
ShadowMin
ShadowMax
ShadowRoughness
DebugHairColor
HairProfile
HairParameters - Paths to a hair profile or .hp
file. Hair profiles contain 2x arrays named gradientEntriesID
and gradientEntriesRootToTip
. Each array contains a set of colour values and gradient stop positions. They are mapped to the greyscale identity and root maps respectively, which are blended to form the hair material's base colour. Cheap method to create a large variety of editable hair colour variations without the need to use large, colour textures.
Albedo
Texture - Paths to an albedo texture (.xbm
). This texture is used to determine the base colour of skin. Most skin albedo maps are pale/caucasian and tinted darker tones via TintColor.
SecondaryAlbedo
Texture - Paths to a secondary albedo texture (.xbm
) with alpha transparency, which is blended with Albedo
. Intended for secondary colour details like freckles. Commonly used by texture frameworks to blend tattoos with Albedo
.
SecondaryAlbedoInfluence
Normal
Texture - Paths to a primary global normal map (.xbm
).
DetailNormal
Texture - Paths to a secondary global normal map (.xbm
). This is typically used for muscle/vein definition and is blended with primary normal.
Roughness
Scalar with a decimal value between 0 and 1.0. Determines how wet/shiny or dry/matte skin material appears. 0 = least rough (most wet/shiny). 1.0 = most roughness (most dry/matte). See #roughness-metalness for a picture
DetailRoughnessBiasMin
DetailRoughnessBiasMax
MicroDetailUVScale01
Scalar - UV scale compensation factor for microdetail_n01.xbm
. See Fig. 1. Value is an integer between 0 and 100. A particular value is required for this detail normal map to tile seamlessly depending on the UV scale of the body part mesh. See Fig. 2.
MicroDetailUVScale02
Scalar - UV scale compensation factor for microdetail_n02.xbm
. See Fig. 1. Value is an integer between 0 and 100. A particular value is required for this detail normal map to tile seamlessly depending on the UV scale of the body part mesh. See Fig. 2.
MicroDetail
Texture - Paths to a microdetail texture (.xbm
). See Fig. 1. This is a tileable detail normal map, typically used for pore structures. There are 3x by default (microdetail_n01.xbm
, microdetail_n02.xbm
and a 2:1 combination of the two textures called microdetail_n.xbm)
.
MicroDetailInfluence
Scalar with a decimal value between 0 and 1.0. Determines normal strength of microdetail_n01
and microdetail_n02
. See Fig 1.
TintColorMask
TintColor
Color - RGB uint8 colour value multiplied with the per pixel colour of Albedo
and SecondaryAlbedo
texture. Used to make all of the skin tone options in character creator (ca_almond, ca_senna, bl_dark etc).
TintScale
SkinProfile
Detailmap_Stretch
EmissiveMask
EmissiveEV
Detailmap_Squash
CavityIntensity
Bloodflow
Texture - Path to a bloodflow (vein) texture (.xbm
).
BloodColor
DetailNormalInfluence
Documentation of properties, with screenshots if applicable
Sets a color from within the mltemplate file. Hex codes corresponds to rows and columns in substance painter.
Depot path to the base material 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
Scaling (tiling multiplier) of the material across the mesh. The higher the value, the smaller it is.
Clamps metalness input levels. This value corresponds to a (generated?) greyscale texture across the entire mesh.
Clamps metalness output levels. This value corresponds to a (generated?) greyscale texture across the entire mesh.
Applies or ignores the base mesh's normal map to this layer. This value can be greater than 1!
For logos: X-offset on the texture. Used for e.g. targeting a certain label.
For logos: Y-offset on the texture. Used for e.g. targeting a certain label.
Transparency of the layer, 0 means that it isn't displayed, 1 means that it's fully visible.
TODO
Determines the roughness of a material
You can only use microblends if this layer's mask is not fully white.
Like #mattile, this determines the scaling of the microblend. The higher the value, the smaller it is.
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.
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.
Like #normalstrength for the microblend.
X-offset for the microblend texture.
Y-offset for the microblend texture