Shade Trees

In his 1984 paper, Cook developed the idea of shade trees. This is a very powerful model that allows the user to develop complex shading models using a 'shading language' without having to delve into the actual framework of the rendering program. The language was extended in 1985 by Perlin to provide control and looping structures, as well as logical operators. This evolved to eventually form the basis for textures in RenderMan.

Shade trees provide the ability to contol every part of the shading calculation. This allows the user access to both 'classical' shading models and experimental. Shaders can even be developed for a specific scene, producing (for lack of a better term), elegent hacks.

An example shade tree for a plastic shader might look like the following:

A shade tree for a plastic shader

The above shading tree, written in the RenderMan shading language looks as follows:

surface
plastic (float Ka=1, Kd=0.5, Ks=0.5,Roughness=0.1;)
{
   point Normal=faceforward(normalize(N),I);
   point Viewer = normalize(-I);
   Oi=Os;
   Ci=Os*(Cs*(Ka*ambient()+Kd*diffuse(Normal))+
      Ks*specular(Normal,Viewer,Rougness));
}


Next Page