Advanced Material Example
From C4 Engine Wiki
This is a short tutorial that takes the reader through the required process of importing an advanced material into the C4 Engine. It does not focus on the artistic side of creating a texture, rather the process of importing them into the C4 Engine.
We will be importing a texture that features ambient occlusion, parallax mapping, horizon mapping and finally some specular highlighting.
In order to save time and allow you to get started straight away, a sample download containing the raw TGA files may be obtained from here.
Contents |
The TGA files
We need three separate TGA files for such a material. A diffuse texture, a grayscale heightmap (sometimes referred to as a bump map) and a specular map (referred to as a gloss map inside of C4 Engine).
The diffuse texture
For best results, the diffuse texture should not contain any lighting or shadowing information. The alpha channel of this texture should include the grayscale height map that will be discussed below.
The grayscale heightmap
This is a grayscale image that represents the height of our texture, where black equals depth and white equals height, with corresponding values in-between. All four channels (RGB and Alpha) of this material should be identical.
The specular map
This texture modulates the shininess of our final material (when specular highlighting is enabled). Specifically, it is used to control which areas are shiny and which are not. This is typically a grayscale image where black equals no shine and white equals full shine, with corresponding values in-between. It's also worth mentioning that the gloss map can also be used to regulate reflection, whether it be real-time reflection or an environment map.
Importing into C4 Engine
Importing the diffuse texture
- Check the
Calculate ambient occlusion in alphacheck box. - Set the
Height map scaleto 16. - Select
Alphafor theHeight map channeldrop box.
Importing the grayscale heightmap
- Check the
Calculate normal mapcheck box. - Check the
Calculate parallax datecheck box. - Check the
Calculate horizon mapscheck box. - Set the
Height map scaleto 16. - Select
Alphafor theHeight map channeldrop box.
Importing the specular map
- Use the default import settings.
Applying the material within the Material Manager
- Within the
Colorstab, assign a specular color and amount.
- Within the
Texturestab, assign the diffuse, normal and gloss maps.
- Within the
Optionstab, check theEnable horizon mappingbox.









