Material properties explained

How materials work, and how you can configure them

If you want to learn how material assignment works for the object, check 3d objects: .mesh files

For information on material templates, see Re-using materials: .mi

Checking material properties

You can see a material's default properties by opening the .(re)mt file in WolvenKit and inspecting the parameters array. 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.

Roughness/Metalness

A roughness/metalness preview. Yes, it's not a sphere.

Multilayered Material

For a full documentation, check the corresponding page.

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)

MultilayerSetup

path\to\material.mlsetup

an example multilayered material

Textured Material

The most commonly used material for anything textured is engine\materials\metal_base.remt. Despite its name, this material isn't necessarily metallic.

You can also use this material as emissive, for a documentation, see below.

The material can be transparent, you need to set the enableMask flag to True and make sure its not set to False anywhere higher in the material chain. Note this is not in the values, its just below the baseMaterial definition. When set the material will use the alpha channel of the BaseColor.

To make your mesh load a texture, use the following CKeyValuePairs 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

The .xbm is a container around the texture. Export the xbm to png via WolvenKit.

Further properties

LayerTile

Material scaling (zoom on surface) > 1 zooms in, >1 zooms out

Plastic

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 CKeyValuePairs 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.

Emissive Material

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.

For a list of such templates, check here.

Emissive

path to emissive texture, e.g. engine\textures\editor\white.xbm The texture works like an alpha mask.

EmissiveEV

float, e.g. 2.0: emissive brightness. Brightness varies depending on your colour. Unless you want to actively blind people, you might want to stay below 4.

EmissiveColor

Glow colour as RGB (copy from e.g. mi_neokitsch_fridge_z_emissive.mi)

Find a ready-to-use glowing .mi file here.

Glass

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.

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

Find a ready-to-use bottle glass .mi here.

Non-warping glass

For a glass material without view distortion and warping, use base\vehicles\common\materials\glass_windshield_tinted_black.mi

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).

Find a ready-to use glass .mi file here

Half-transparent glass

base\environment\decoration\electronics\devices\device_neokitsch\textures\device_neokitsch_glass_black.mi

Device screen glass

base\fx\shaders\parallaxscreen.mt

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

Find a ready-to-use example of a turned-off screen here.

Liquid

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.

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

Find a ready-to use (black) liquid .mi file here.

Last updated

#647: Add info on downloading Phantom Liberty DLC files for rollback

Change request updated