Surface Shaders

This box lets you control how the surface color reacts to light at every given micropolygon.

To really have fun, you'll want to change the color procedurally, in other words, control it with a pattern or a math function.

picture of shadetree 'checks' box

Patterns usually return floating point values which can be used to vary the color of the ambient, diffuse, and specular colors.

Here's an example of a simple plastic shader:

picture of plastic shadetree example

In this case we're controlling the intensity of the diffuse component using the checks pattern. The output value is either 1 or 0, which turns the diffuse intensity on or off. The rendered image looks like:

rendering of checkered shader

The black squares are the diffuse intensity at 0, the colored squares are where the diffuse intensity is at 1.

To better demonstrate how the ambient color and specular highlights are affected, here is the same example with the ambient color set to red, and the ambient intensity increased to 0.3:

rendering of checkered shader

Note the ambient color and the specular unaffected by the checkered pattern.

(TODO: Insert discussion on texturemapping here)

Author: [email protected]
Copyright (c) 1998 Cinema Graphics Inc. All Rights reserved.