##RenderMan RIB-Structure 1.0 version 3.03 ########################################################################### # # This RIB file give a demonstration of the use of automatic shadows # which can be attenuated by opacity of individual objects. # # Casting shadows: # By default, light sources do not cast shadows. The following RIB # sets a nonstandard attribute which causes any subsequently declared # light sources to automatically cast shadows using ray tracing: # Declare "shadows" "string" # Attribute "light" "shadows" "on" # LightSource .... # This attribute "affixes" itself to the lightsource when it's # declared. Note that it can be pushed and popped by AttributeBegin/End, # just like any other attribute. # # Occluder options: # When a light source casts shadows, by default the object casts a # shadow which blocks out light according to the Opacity in effect # when the object was declared. For some complex objects (like the # ones in this scene), the surface shader needs to be evaluated before # the renderer can know exactly what the opacity needs to be. This # is slower than the default, and only needs to be done when the # surface shader causes the opacity to change across the surface. In # this case, the proper attribute to set is: # Declare "casts_shadows" "string" # Attribute "render" "casts_shadows" "shade" # # These attributes are all described in the "BMRT User Guide". # ########################################################################### Option "searchpath" "shader" [".:../shaders:&"] Display "shaderChange.tif" "file" "rgb" "compression" "none" Format 1024 768 -1 PixelSamples 2 2 Projection "perspective" "fov" 45 Translate 0 -2 8 Rotate -110 1 0 0 WorldBegin LightSource "ambientlight" 1 "intensity" 0.5 LightSource "distantlight" 1 "from" [0 1 4] "to" [0 0 0] "intensity" 0.8 # Declare "brickwidth" float # Declare "brickheight" float # Declare "mortarthickness" float AttributeBegin Translate 0 0 2 Color [ 1.0 1.0 1.0 ] Surface "JBUMcraters" Sphere .4 -1 1 360 AttributeEnd AttributeBegin Translate 0 .8 2 Color [ 1.0 1.0 1.0 ] Surface "RudyCstones" Sphere .25 -1 1 360 AttributeEnd AttributeBegin Translate -.5 -.3 2 Color [ 1.0 1.0 1.0 ] Surface "RudyCstones" Sphere .25 -1 1 360 AttributeEnd AttributeBegin Translate .5 -.3 2 Color [ 1.0 1.0 1.0 ] Surface "RudyCstones" Sphere .25 -1 1 360 AttributeEnd AttributeBegin Translate 0 0 2 Color [ 1.0 1.0 1.0 ] Surface "RudyCplasmaball" Sphere 2 -1 1 360 AttributeEnd AttributeBegin Translate 0 0 2 Color [ 1.0 0.0 0.0 ] Surface "RudyCplasmaball" Sphere 1.25 -1 1 360 AttributeEnd AttributeBegin Translate 0 0 2 Color [ 0.0 0.0 1.0 ] Surface "RudyCplasmaball" Sphere 1 -1 1 360 AttributeEnd WorldEnd