######################################################################### # fig12.12.rib - RIB to create Figure 12.12 of: # # _Advanced RenderMan: Creating CGI for Motion Picture_, # by Anthony A. Apodaca and Larry Gritz, Morgan Kaufmann, 1999. # # This file demostrates the smoke shader. # The lights in this file use a shadow map, which can be generated # by rendering smokesm before rendering this file. ######################################################################### Option "searchpath" "shader" ["../shaders:&"] Display "fig12.12.tif" "framebuffer" "rgb" Format 480 360 1 #Format 1024 768 1 PixelSamples 2 2 ShadingRate 1 Projection "perspective" "fov" [45] Translate 0 0 7.5 Rotate -90 1 0 0 Translate 0 0 -2 Rotate -10 1 0 0 WorldBegin AttributeBegin Translate 0 0 8 Rotate 180 1 0 0 LightSource "uberlight" 1 "string lighttype" ["spot"] "float falloff" [2] "intensity" [50] "float width" [.25] "float height" [.14] "string shadowmap" ["smokeball.sm"] "float shadowbias" [.1] AttributeEnd Illuminate 1 1 Sides 1 Declare "stepsize" "float" Declare "density" "float" Atmosphere "smoke" "float stepsize" [.25] "float smokeoctaves" [4] "float smokefreq" [1] "float opacdensity" [0.025] "float lightdensity" [0.075] AttributeBegin AttributeBegin TransformBegin Rotate 90 0 0 1 Scale .35 .35 .35 Surface "oakplank" "float Kr" [0] TransformEnd Patch "bilinear" "P" [ -5 -5 0 5 -5 0 -5 5 0 5 5 0 ] AttributeEnd Surface "matte" Polygon "P" [ -5 -5 0 -5 -5 10 5 -5 10 5 -5 0 ] Polygon "P" [ 5 -5 0 5 -5 10 5 5 10 5 5 0 ] Polygon "P" [ -5 5 0 -5 5 10 -5 -5 10 -5 -5 0 ] AttributeEnd AttributeBegin Sides 2 Translate 0 0 2 Rotate -10 1 1 1 Surface "starball" Sphere 1 -1 1 360 AttributeEnd WorldEnd