The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
The RenderMan Interface - Paul Bourke
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
This example integrates over a hemisphere centered at the point on the surface with its<br />
north pole in the direction of the normal. Since the integral extends only over the upper<br />
hemisphere, it is not necessary to use the customary max(0,Ln.Nn) to exclude lights that<br />
are locally occluded by the surface element.<br />
<strong>The</strong> illuminate and solar statements are inverses of the illuminance statement. <strong>The</strong>y control<br />
the casting of light in different directions. <strong>The</strong> point variable L corresponding to a particular<br />
light direction is available inside this block. This vector points outward from the light<br />
source. <strong>The</strong> color variable Cl corresponds to the color in this direction and should be set.<br />
Like the illuminance statements, illuminate and solar statements cannot be nested.<br />
<strong>The</strong> illuminate statement is used to specify light cast by local light sources. <strong>The</strong> arguments<br />
to the illuminate statement specify a three-dimensional solid cone. <strong>The</strong> general forms are:<br />
illuminate( position ) stmt<br />
illuminate( position, axis, angle ) stmt<br />
<strong>The</strong> first form specifies that light is cast in all directions. <strong>The</strong> second form specifies that<br />
light is cast only inside the given cone. <strong>The</strong> length of L inside an illuminate statement is<br />
equal to the distance between the light source and the surface currently being shaded.<br />
<strong>The</strong> solar statement is used to specify light cast by distant light sources. <strong>The</strong> arguments to<br />
the solar statement specify a three-dimensional cone. Light is cast from distant directions<br />
inside this cone. Since this cone specifies only directions, its apex need not be given. <strong>The</strong><br />
general forms of the solar statement are:<br />
solar( ) stmt<br />
solar( axis, angle ) stmt<br />
<strong>The</strong> first form specifies that light is being cast from all points at infinity (e.g., an illumination<br />
map). <strong>The</strong> second form specifies that light is being cast from only directions inside a<br />
cone.<br />
An example of the solar statement is the specification of a distant light source:<br />
solar( D, 0 )<br />
Cl = intensity * lightcolor;<br />
This defines a light source at infinity that sends light in the direction D. Since the angle of<br />
the cone is 0, all rays from this light are parallel.<br />
An example of the illuminate statement is the specification of a standard point light source:<br />
illuminate( P )<br />
Cl = (intensity * lightcolor) / (L.L)<br />
This defines a light source at position P that casts light in all directions. <strong>The</strong> 1/L.L term<br />
indicates an inverse square law fall off.<br />
128