appendixA.html, appendixF.html, index.html, section01.html, section02.html, section03.html, section04.html, section05.html, section06.html, section07.html, section08.html, section09.html, section10.html, section11.html, section12.html, section13.html, section14.html, section15.html, section16.html
The handling of surface, interior and atmosphere shaders differ slightly from the RenderMan Interface Specification. Exterior shaders are currently not used and only a single atmosphere shader is used. Interior shaders are implemented in a way which is intended to make the creation of volume effects - regions of space inside which a volume shader is applied - simpler.
The ray tracing process generates an primary ray from the camera into the scene. When it hits a surface, a ray segment is created. Running a surface shader may generate further rays as follows. If the surface is not completely opaque, a continuation ray is created beyond the surface. If the shader calls the trace() function further secondary rays will be generated as specified. If either a surface shader or a volume shader calls illuminance() or diffuse(), specular() or phong(), shadow rays are generated towards any light sources which is set to cast shadows.
Ray segments are shaded as follows. If there is an atmosphere shader defined, it will be run on all primary, secondary and continuation rays, including those that do not hit any geometry. If any of these rays hit the inside of a surface with an interior shader defined, the interior shader will then be run. If this wasn't the case, then if the ray segment leaves the inside of a surface with an interior shader defined, then this shader will be run. Finally, if no interior shader was defined on the surface at the end of the ray segment, any surface shader defined there will be evaluated.
The result of this is that the atmosphere permeates the entire scene, and that surfaces with an interior shader d efined on them bound regions of space which will have this volume shader evaluated, even if there is geometry inside this volume. It is currently a restriction that these regions will not have a surface shader run on them. Due the rather complex evaluation mechanism described above, there is no need to explicitly attach an interior shader to geometry lying inside a volume effect. Note that there is a case where this does not work - a ray segment which leaves a surface and hits another surface neither with an interior shader defined, but which happens to lie inside a volume region will not have the volume shader evaluated on it.
No volume shaders are applied to shadow rays. When a shadow ray hits a surface which has had its "casts_shadows" attribute set to "shade" the surface shader is evaluated and the opacity returned used to attenuate the light. All surfaces with "casts_shadows" set to "opaque" block all shadow rays hitting them.
Last modified: Thu Dec 2 12:50:45 GMT 1999