material

Syntax:

	(material
		(color: coord)
		(emissivity: number)
		(transparency: number)
		(eta: number)
		(shininess: number)
		(reflectivity: number))

color:

A coordinate indicating the (r, g, b) value of the base color of the object. Each element is on the range {0, 1}. The default color is grey, (.5, .5, .5}.

transparency:

A number on the range {0, 1} indicating the percent loss in intensity of light per meter of material traveled through. A value of 1 results in a perfectly transparent surface, a value of 0 results in a perfectly opaque surface. The default transparency 0, or opaque.

Note: In determining the appearance of the object, transparency is multiplied by the color. For example, an object with color (0, 0, 0) cannot be at all transparent, regardless of the transparency of the material.

emissivity:

A number on the range {0,1} indicating the emissivity of the material. A value of 1 results in a material with maximum glow; a value of 0 results in a material that does not glow. The default emissivity is 0.

eta:

A number on the range {1,2} indicating the index of refraction of the material. The index of refraction of air is 1.0; for water it is 1.33. The default index-of-refraction is 1.2.

shininess

A number on the range {0,1} indicating the sharpness of the specular highlight. Shiny materials have a small, sharp highlight; matte materials have a large, dull highlight. A value of 1 indicates the highest shininess; 0 indicates the least shininess.

reflectivity:

A number on the range {0,1} indicating the refectivity of the material. A value of 1 is a perfectly reflective material, i.e. a perfect mirror; a value of 0 is a completely dull material.


Example:

(material (color: (: .8 .1 .1)) (shininess: .7) (reflectivity: .6))

This code creates a shiny and reflective red material.


© 1996, Morgan McGuire ([email protected]) and Laura Wollstadt ([email protected]).
All rights reserved.

LBW 12/05/96