# Materialtype (decl)

MaterialTypes are declarations that dictate how a particular surface that references them reacts to impacts. This special declaration replaces the more simplistic surface type global keyword system (like metal , plastic or stone for instance) used in Doom 3 .

## Syntax

materialType [name]
{
description "[optional summary]"
rgb     [red],[green],[blue]
}

MaterialType declarations are started with a header which consists of the keyword materialType followed by the name of the type. They are then followed by the body of the declaration which is enclosed in curly brackets.

The rgb values (0 through 255) control the impact effects and sounds (if any) of the surface. The entire surface will react the same way though so if you’d like a little more control you should use a MaterialImage instead.

MaterialType declarations should be put in a . MTT in the / materials folder. The name of the material type is then referred from inside a material declaration with the materialType global material keyword.