Material properties
How materials work, and how you can configure them
Last updated
How materials work, and how you can configure them
Last updated
Last documented update: Apr 20 2024 by manavortex
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 AMM: Textured items and Cyberpunk Materials using Custom Props
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.
To find a shader template, use the (you can copy the query):
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:
Type: CMaterialParameter… | CKeyValue | explanation |
---|---|---|
| Vector4 | A vector with X, Y, Z, W (coordinates and space). This is also used for colour values (Wolvenkit usually supports those). |
| RRef:Texture | A texture (.xbm) via DepotPath |
| Color | A color (RGB/color picker) |
| RRef:MultilayerMask | a multilayerMask ( |
| RRef:MultilayerSetup | a multilayerSetup ( |
| CFloat/CDouble | a numeric value with decimals. Float has 7 decimals, Double has 15 |
| ??? | a texarray via depotPath |
| ??? | |
RRef: | A hair profile (.hp) via depotPath |
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.
Property name(s) | Explanation |
---|---|
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) |