RSL
|
IntroductionThis tutorial introduces the use of point clouds and brick maps for occlusion shading. The shader, listing 1, applies unusual color tinting to the occlusion that it assigns to a surface - figure 1. Listing 1
In addition to calculating an occlusion value - or
reading a previously saved value from a brickmap - the Color 1 0 0 Sphere 1 -1 1 360
does not effect the color of the object as seen by the camera but, instead, causes
another surface that is occluded by the object to be tinted. The shader provides
a parameter called "camera_color" and it is the color assigned to this parameter
that controls the visual coloration as "seen" by the camera.
|
Avoiding Gaps in the Point Cloud Data
To ensure all the occlusion data will be available for later use, the
"bake-camera" must be setup not only so that it views as much of the scene as
necessary but that three rib Attribute "cull" "hidden" [0] Attribute "cull" "backfacing" [0] Attribute "dice" "rasterorient" [0]
If they are not present in a rib file
their default value is |
|
|
Because the Listing 2 shows a sample rib file for the bake-pass. The point cloud will be saved to the same directory as cutter.jar. Use a full path to save the point cloud to your preferred directory. Listing 3 shows the rib file for the beauty pass. |
Listing 2 (bake pass)
|
Listing 3 (beauty pass)
|
© 2002- Malcolm Kesson. All rights reserved.