Material Types
Version 1.00 – Friday 13th June 2003 – John J Scott
Materials are defined by .mtt files in the base/materials/ folder. The name of the file is the name of the material (eg. “materials/sand.mtt” is called “sand”).
A .mtt file looks like this –
materialType
{
description “A phrase that describes this material type”
rgb r,g,b
}
The r, g and b components are defined as 0 to 255. (eg. 255,0,0 would be bright red)
The material type can be defined in the material in 2 ways –
The following material would have the material type of “concrete”
textures/wall/texture
{
qer_editorimage textures/wall/texture_d
materialType concrete
bumpmap addnormals ( textures/wall/texture_local, heightmap ( textures/wall/texture_h, 1 ) )
diffusemap textures/wall/texture_d
specularmap textures/wall/texture_s
}
The following material will use the hit image map “textures/wall/texture_hit” to work out the material type, but return metal should the hit image not yield a valid material.
textures/wall/texture
{
qer_editorimage textures/wall/texture_d
materialType metal
materialImage textures/wall/texture_hit
bumpmap addnormals ( textures/wall/texture_local, heightmap ( textures/wall/texture_h, 1 ) )
diffusemap textures/wall/texture_d
specularmap textures/wall/texture_s
}
The currently defined materials are –
Material Type |
RGB Value |
|
|
None |
0,0,0 |
Solidmetal |
178,178,178 |
HollowMetal |
102,102,102 |
Sand |
255,255,0 |
Flesh |
204,102,102 |
Notes -