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.
    Sphere with ambient material value #ff0000 and ambient light value #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.
    Sphere with diffuse material value #ff0000 and diffuse light value #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.
    Sphere with specular material value #ff0000, power material value of 100.0 and diffuse material value #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.
    Sphere with emissive material value #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.
    Sphere with specular material value #ff0000 and power material value of 1.0
    Sphere with specular material value #ff0000 and 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.
    Sphere with opacity material value 0.5 and alpha threshold material value 0.0

To see a demonstration of differing material settings, download an example park here.

material_eg.imml (4.1 kB) Alexander Tulloh, 09/24/2010 03:43 pm

sphere_diffuse.jpg - Sphere with diffuse material value #ff0000 and diffuse light value #ffffff (24.3 kB) Alexander Tulloh, 09/27/2010 10:22 am

sphere_ambient.jpg - Sphere with ambient material value #ff0000 and ambient light value #4c4c4c (23 kB) Alexander Tulloh, 09/27/2010 10:23 am

sphere_emissive.jpg - Sphere with emissive material value #ff0000 (21 kB) Alexander Tulloh, 09/27/2010 10:23 am

sphere_spec_A.jpg - Sphere with specular material value #ff0000 and power material value of 1.0 (20.8 kB) Alexander Tulloh, 09/27/2010 10:24 am

sphere_spec_B.jpg - Sphere with specular material value #ff0000 and power material value of 100.0 (19.2 kB) Alexander Tulloh, 09/27/2010 10:25 am

sphere_spec_C.jpg - Sphere with specular material value #ff0000, power material value of 100.0 and diffuse material value #ff0000 (24.8 kB) Alexander Tulloh, 09/27/2010 10:25 am

sphere_transparent.jpg - Sphere with opacity material value 0.5 and alpha threshold material value 0.0 (20.9 kB) Alexander Tulloh, 09/27/2010 10:26 am