Normal Maps

Overview

Normal mapping is one of the standard techniques used in CRYENGINE to add details to a surface without increasing the number of polygons. A normal map can represent surface details like wrinkles, scratches and beveled edges by storing the corresponding surface normals in a texture.

CRYENGINE is using tangent space normal maps which can be reused on different models. These normal maps can either be created from a heightmap or derived from a high-polygon model based in any software whether its Max, Maya, Xnormal etc.


To the left is a Specular Map, Middle is a Diffuse Map, Right is a Tangent Space Normal Map.

Normal Maps with Gloss in Alpha

For CRYENGINE 3.6's Physically Based Shader model, we introduced the "DDNA" texture, which is a standard DDN texture like before but with the addition of the Gloss map inside the Alpha channel of that texture.


RGB contains the standard Normal map texture information and a Greyscale alpha contains the Gloss map information.

Ensure that you name your texture map correctly. You cannot use _ddn or _DDNA, it must be _ddna for the Resource Compiler to recognize the texture correctly.
It must also use the NormalmapWithGlossInAlpha_highQ preset from CryTIF.

Hand-Modified Normal Maps

Not all colors represent valid normals. This is why it is dangerous to apply certain image manipulation to normal maps (e.g. down sampling with bi-cubic filter, sharpening, alpha blending). The CryTIF Plugin has a feature to visualize such problems.

Creating A Quality, Seamless Normal Map

There are a few ways to go about this with CRYENGINE and all require a low resolution and high resolution mesh. Some notes to keep in mind if you want to create a good normal map are:

  • UV maps are laid out so that there is a decent compromise of space utilization and stretching.
  • Normal map is rendered using tangent basis calculation with swizzle coordinates in X+Y-Z+.
  • Mirroring UV's can be very difficult to hide with normal maps and requires some extra work to hide, be sure the normal directions are the same across the seam.
  • The naming convention for normal maps with gloss in the alpha channel is a _ddna suffix (e.g. tree_ddna.dds).
  • Use the CryTIF Exporter presets when saving normal maps.
  • Use the CryTIF Exporter to check the normal maps.
  • Give normal maps an extruded edge of pixels. That way, there won't be any errors generated by mip-map levels (see also Lighting Art Hints).
  • If you render normal maps based on special lighting setups in 3ds Max, do not anti-alias them against the background.
  • Don't edit normal maps in Photoshop. If you have to resize a normal map, use bi-linear instead of bi-cubic interpolation (can be set in Photoshop under Edit > Preferences > General).
  • Don't apply color filters or other manipulation (grain, noise) to a normal map itself.
For 3Ds Max users:

Be sure that custom normals is checked when exporting your geometry so that your model has the same normals that you had in your bake.

See Also