Specular Maps

This information is based off a non-PBR workflow and is largely obsolete since CRYENGINE 3.6. See Creating Textures for Physically Based Shading for more information.

Overview

This is the texture representing the specular intensity and color of material highlights defined as the "shininess" and color of specular reflections.

In most cases this is a modified black and white diffuse merged with perhaps different rendered maps such as cavity maps to achieve a desired look.

Some notes to keep in mind which often determine a good specular texture are:

  • High contrast, variations between black and white are easily visible.
  • White is absolute specularity/reflectivity while black is no reflection whatsoever.
  • Artists often use the specular to help exaggerate definitions with the other maps to make details more visible.

Choosing how to utilize your specular map

CryENGINE computes specular by using P and M:

  • Power of specular (controls how hard/strong/blurry reflection is).
  • Multiplier (or scaler) for computed specular (0-1 range, from "no specular" to "normal specular" output). I call it "anti-dirtyness".

Presets and material settings used dictate from where those P and M come.

Below are three options:

1. Specular data is in the alpha channel of the diffuse image.
Requires "gloss map in diff alpha" enabled in material.
Image uses preset DiffusewithAlpha_XXX, alpha channel contains M.
Image produces single texture, DXT5 format.
P comes from material settings (called glossiness level or so), so it's same P for every texel.

2. Specular data is in a separate image (no alpha channel), diffuse image has no alpha channel.
First image uses preset Diffuse_xxxx, second image uses Specular_xxxx (color channels contain M).
First image produces DXT1 texture, second one produces DXT1 texture. Total size of those two textures is same as size of single texture in option #1.
P comes from material settings (called glossiness level or so), so it's same P value for every texel.
Note that comparing to option #1, you have per-color-channel M, so you can control how much of each of R/G/B is reflected per-pixel.

3. Specular data is in a separate image (should have alpha channel), diffuse image has no alpha channel.
First image uses preset Diffuse_xxxx, second image uses Specular_xxxx (color channels contain M same as in option #2; alpha contains multiplier for P, see below).
First image produces DXT1 texture, second one produces DXT5 texture. Total size of textures is 50% bigger than size in options #1 and #2.
P comes from material settings (called glossiness level or so) multiplied by values from alpha channel of the second image, so it's per-texel. So, you can control hardness of specular on per-texel level.
Same as in #2 you can control how much of each of R/G/B is reflected per-pixel.

Note that if you are tight on memory and you don't care about having high-precision specular, then sometimes it's better to use #2 instead of #1, because it will allow you to use different resolutions for diffuse and specular textures. For example your diffuse texture is 1024x1024 and specular texture is 256x256.