Understanding the Material element¶
Each material group can only contain 1 material element. This material element can define the basics of what the surface looks like.
- Ambient – The amount of ambient light reflected from this surface. The ambient light contribution is currently given by the IMML tag’s global illumination attribute, so will be constant across the whole surface. Below is a sphere with an ambient material value of #FF0000 and ambient light value of #4C4C4C.
- Diffuse – The amount of diffuse light reflected from this surface. This will be multiplied by the color of the light shining on it to give the final result. Below is a sphere with a diffuse material value of #FF0000 and diffuse light value of #FFFFFF.
- Specular – This is the “highlight” or “shiny” color; this color will be multiplied by the lights color to give the final result. Below is a sphere with a specular material value of #FF0000 and a diffuse material value of #FF0000.
- Emissive – This color has nothing to do with lighting, it relies solely on its own value, and is directly added to the color of the material. Below is a sphere with an emissive material value of #FF0000.
- AlphaThreshold – Anything with an alpha value equal to or below this value will not be drawn. The alpha value is determined by the material opacity combined with any alpha mapping. To see how to turn on alpha mapping for models, click here.
- Power – The specular power or specular exponent of the specular lighting. Increasing this value will make the highlight smaller, making the object appear more shiny. Decreasing it will broaden the highlight, making it seem less shiny. Below is a sphere with a power material value of 1.0 and a sphere with a power material value of 100.0.
- Opacity – Determines the opacity of an object, with 1.0 being fully opaque and 0.0 being fully transparent. Below is a sphere with an opacity material value of 0.5 and an aplha threshold material value of 0.0.
To see a demonstration of differing material settings, download an example park here.