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:
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
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.
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 cahnnel, 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 with no noticeable 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.
As you can see from the above screenshot, the Detail map tiling is controlled directly in the texture slot.
activate Detail mapping in Shader Generation Parameters.
Once enabled, this will activate three new sliders:
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!