Detail mapping is a simple technique to add surface detail (micro and macro) at relatively low cost, memory and performance wise.
|Detail Map Off||Detail Map On|
|Simple Grey Diffuse with High Gloss|
|Full Texture Set: Diffuse, Normals, Glossmap|
CRYENGINE uses a special approach with Detail maps, often referred to as "Unified" or "Merged" detail maps.
The reason for this is Detail maps in CRYENGINE include not only Normals information, but also Diffuse and Gloss information.
Channels are organized as follows:
- Red: Diffuse
- Green: Normal Red
- Blue: Gloss
- Alpha: Normal Green
If you're converting an existing Normal map into a Detail map, you can take the existing Red/Green channels and place them in the Green/Alpha channels respectively.
To showcase how to create a Merged Detail Map, we're going to take an existing RGB Normal map:
From Left to Right: RGB Channels, Red Channel, Green Channel, Blue Channel.
Create an Alpha channel and place the Green Channel into it.
Select the Red channel and paste that into the Green channel.
The texture should now look something like this:
Now, for the Red and Blue channels we're going to add a Diffuse and a Gloss map.
Pick a suitable Diffuse texture and place it in the Red channel then pick a suitable Gloss texture and place it in the Blue channel.
Left: Greyscale Diffuse, Right: Greyscale Glossmap
The texture should now look something like this (depending on the luminosity of the R/B channels, color may vary):
From Left to Right: RGB Channels, Red Channel, Green Channel, Blue Channel, Alpha Channel.
Two options are available for Merged Detail Maps: Detail_MergedAlbedoNormalsSmoothness (Using BC7 compression) or an additional _Lossless format.
Note that the Lossless format should be used with care as file size will be 4x larger.
Detail Maps are most often tiled fairly heavily, this means you can use smaller resolutions without noticeable a loss in quality as texel density will be high due to the tiling.
To use a Detail Map, your Material should be using the Illum Shader. HumanSkin and Terrain.Layer Shaders also use Detail maps but not Merged Detail Maps, rather, the older "Normal map" style Detail maps.
To activate the Detail Map, place the path to your Merged Detail map texture in the "Detail" Texture Slot.
As you can see from the above screenshot, the Detail Map tiling is controlled directly in the texture slot.
Once that is done, activate the "Detail mapping" Shader Generation Parameter. Note that you will be unable to enable this checkbox if the Detail texture slot is empty.
Once enabled, this will activate three new sliders:
- Detail bump scale: Controls the intensity of the Green / Alpha Channels (former Red/Green normal channels)
- Detail diffuse scale: Controls the intensity of the Red Channel (greyscale diffuse texture)
- Detail gloss scale: Controls the intensity of the Blue Channel (greyscale gloss texture)
The Detail bump scale is independent of other Material settings, a standard Normal map is not required for this to be used.
However, the Diffuse and Gloss scales are blended with the Diffuse Color and Glossiness Material settings respectively.
If you have a 0,0,0 Diffuse Color then you will not be able to see the Detail diffuse channel of your Detail map. If you have 0 Glossiness, you will not see the Detail gloss channel.
This control over independent channel output gives a large amount of flexibility and re-usability with Detail Maps so experiment with a variety of settings to suit your assets!