##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" ["/bmrt2.6/shaders:.:shaders:&"] #Option "radiosity" 120 Display "levoy.tif" "file" "rgba" Format 480 360 -1 Exposure 1 2.4 PixelSamples 1 1 Projection "perspective" "fov" 90 #Translate 0 -2 8 #Translate 0 -2 1.5 Translate 0 0 -2 #Rotate -10 0 1 0 #camera 10 deg. left WorldBegin LightSource "ambientlight" 1 "intensity" 0.08 Declare "shadows" "string" Attribute "light" "shadows" "on" LightSource "distantlight" 1 "from" [0 1 4] "to" [0 0 0] "intensity" 0.8 Attribute "radiosity" "emissioncolor" [0.2 0.5 0.8] AttributeBegin Color [ 0.2 0.0 0.0 ] Surface "matte" Polygon "P" [ -5 -5 0 5 -5 0 5 5 0 -5 5 0 ] AttributeEnd AttributeBegin Translate 0 0 2.5 Rotate 0 0 1 0 Color [1 .45 .06] Surface "levoy3" "float xpanels" 8.0 "float ypanels" 16.0 "filename" "enginel.tif" "float skip_below" 0.1 "float stepsize" 0.005 "float isovalue" -1 "float isovaluealpha" 10 "float isovaluethickness" 0.1 "color mat0_color" [0 0 0] "float mat0_alpha" 3 "float mat0_value" 0.5 "color mat1_color" [0 0 1] "float mat1_alpha" 3 "float mat1_value" 0.5 "color mat2_color" [0 1 0] "float mat2_alpha" 3 "float mat2_value" 0.5 "color mat3_color" [0 1 1] "float mat3_alpha" 3 "float mat3_value" 0.5 "color mat4_color" [1 0 0] "float mat4_alpha" 3 "float mat4_value" 0.5 Polygon "P" [ -.5 -.5 0 .5 -.5 0 .5 .5 0 -.5 .5 0 ] #unten Polygon "P" [ -.5 .5 1 .5 .5 1 .5 -.5 1 -.5 -.5 1 ] #oben Polygon "P" [ -.5 -.5 0 -.5 -.5 1 .5 -.5 1 .5 -.5 0 ] #hinten Polygon "P" [ .5 -.5 0 .5 -.5 1 .5 .5 1 .5 .5 0 ] #rechts Polygon "P" [ -.5 .5 0 -.5 .5 1 -.5 -.5 1 -.5 -.5 0 ] #links Polygon "P" [ .5 .5 0 .5 .5 1 -.5 .5 1 -.5 .5 0 ] #vorne AttributeEnd WorldEnd