description |
---|
Properties of textured (PBR) materials |
Created: Jan 14 2024 by manavortex
Last documented update: Feb 20 2024 by manavortex
This page documents textured (PBR) shaders and their properties.
- For an overview of PBR shaders, see cheat-sheet-materials.md-> #textured-materials
- For an explanation of material properties and further links, see .
The most commonly used material for anything textured is engine\materials\metal_base.remt
. Despite its name, this material isn't necessarily metallic.
{% hint style="info" %} To use this material as emissive (light), check emissive-material-properties.md
You can change the colour of a texture on-the-fly by using the BaseColor
property (color picker blend file here)
{% endhint %}
The material can be transparent by setting enableMask
to True
(and make sure its not overriden in the material chain). When set, the material will use the alpha
channel of the BaseColor.
To make your mesh load a texture, use the following CKeyValuePair
s in your material's "values" array:
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 | path to your normalMap.xbm (if you have one) |
example use of metal_base.remt as a textured material
{% hint style="info" %} The .xbm is a container around the texture. Export the xbm to png via WolvenKit. {% endhint %}
{% hint style="warning" %} 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
{% endhint %}
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:
BaseColor | base\materials\placeholder\white.xbm |
Normal | optional: path to your normal map |
Roughness | optional: path to your roughness map |
RoughnessBias | 0.200000003 |
BaseColorScale | Colour as x/y/z values (color picker blend file here) |
You can find a ready-to-download template here.
LayerTile | Material scaling (zoom on surface) |