User Tools

Site Tools


gamedev:textureproperties:ambient_occlusion

Skin Texture Property: ambient.occlusion

Defines the ambient occlusion factor.

Excepted Data Source1 component image
Data Range0 to 1
Default Value1
Affected ModulesGraphic
Linked Properties-

Description

The ambient.occlusion texture property defines the ambient occlusion for a material. In the real world only a fraction of ambient light enters bumps and cravices in objects. This results in such places to be somewhat darker than the rest of the object. In games the low polygon models are flat and such details are only shown using normal mapping. Normal mapping can though not take care of darkening pixels due to ambient occlusion. For this an additional AO map is required storing for each pixel the percentage of ambient lighting potentially hitting this point.

Ambient occlusion is typically created in a similar way normal maps are created using a high polygon model. For this rays are tested in a semi-sphere around the point on the high polygon model matching the point of interest on the low polygon model. The number of rays not hitting any geometry is then divided by the total number of shot rays. This results in a percentage value indicating how much ambient light potentially hits the surface point. This works as the process of shooting out rays in a semi-sphere can be reversed. This is then the same as if tons of tiny direction light sources are sitting on a semi-sphere shining at the point of interest. The result is again the percentage of light hitting the point compared to the total amount of light. Blender3D can create such AO maps for you.

The value is typically a single component value inside the range from 0 to 1. 0 represents 0% incoming ambient light while 1 represents 100% incoming ambient light. Care has to be taken about the gamma correction. Since AO maps are often also painted not only generated tools like Blender3D use 2.2 gamme on the saved images. This texture property uses also 2.2 gamma correction on the AO map.

The default value for this texture property is 1.

Examples

Material with and without ambient occlusion

Material with and without ambient occlusion. On the left side there is no ambient occlusion. The lighting looks flat. On the right there is ambient occlusion generated by Blender3D. Lighting has more depth in cravices and holes.

You could leave a comment if you were logged in.
gamedev/textureproperties/ambient_occlusion.txt · Last modified: 2019/05/24 23:43 by dragonlord