RIB
Raytraced Shadows


return to main index



Introduction

Release 11 of prman added raytracing capabilities to the renderer. It is now possible to generate shadows "automatically". Traditional depth maps can still be used where speed and/or artistic flexibility are more important than convenience. The red text shown in listing 1 demonstrates how Pixar's prman renderer is activated for raytracing.


Listing 1


Display "shader_tester" "framebuffer" "rgb"
Format 427 240 1
Projection "perspective" "fov" 40
ShadingRate 1
  
Translate  0 0 9
Rotate -30 1 0 0
Rotate 0   0 1 0
Scale 1 1 -1
WorldBegin
    LightSource "shadowdistant" 1 "intensity" 95 
                "from" [0 10 0] "to" [0 0 0] 
                "shadowname" ["raytrace"]
                "samples" 64.0
                "width" 8.0  
    Attribute "visibility" "trace" [1]
 
    Attribute "shade" "transmissionhitmode" ["primitive"]
    Attribute "visibility" "int transmission" [1]
    # If your renderer does not support the previous two 
    # statements remove them and uncomment the next line.
    # The options to transmissions are "opaque", "Os", "shader"
    Attribute "visibility" "string transmission" ["opaque"]
  
    TransformBegin
        Surface "plastic"
        Translate 0 1.5 0
        Sphere 1 -1 1 360
    TransformEnd
    TransformBegin
        Surface "plastic"
        Scale 14 1 14
        Polygon "P" [-0.5 0 -0.5   0.5 0 -0.5  
                      0.5 0  0.5  -0.5 0  0.5]
                "st" [0 0  1 0  1 1  0 1]
    TransformEnd
WorldEnd

With the introduction of prman version 13.5 the string version of the transmission attribute statement ie.

    Attribute "visibility" "string transmission" ["opaque"]

was replaced by an integer version ie.

    Attribute "visibility" "int transmission" [1]

When set to [0], the int version of "transmission" will cause an object not to cast shadows. The previous way of setting transmission to either "opaque", "Os" or "shader" is now achieved with,

    Attribute "shade" "transmissionhitmode" ["primitive"]

Two settings are allowed, either "primitive" or "shader".


shadow_tester
Figure 1




© 2002- Malcolm Kesson. All rights reserved.