Advanced Material Example

From C4 Engine Wiki

Jump to: navigation, search

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

Image:Dirty_Tiling_Diffuse.jpg

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

Image:Dirty_Tiling_Bump.jpg

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

Image:Dirty_Tiling_Specular.jpg

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

Image:Diffuse.png

  • Check the Calculate ambient occlusion in alpha check box.
  • Set the Height map scale to 16.
  • Select Alpha for the Height map channel drop box.

Importing the grayscale heightmap

Image:Bump.png

  • Check the Calculate normal map check box.
  • Check the Calculate parallax date check box.
  • Check the Calculate horizon maps check box.
  • Set the Height map scale to 16.
  • Select Alpha for the Height map channel drop box.

Importing the specular map

Image:Specular.png

  • Use the default import settings.

Applying the material within the Material Manager

  • Within the Colors tab, assign a specular color and amount.

Image:Colors.png

  • Within the Textures tab, assign the diffuse, normal and gloss maps.

Image:Textures.png

  • Within the Options tab, check the Enable horizon mapping box.

Image:Options.png

Personal tools