##RenderMan RIB-Structure 1.0
version 3.03
# Comments appear next to single hash marks (#).
# Display 3 walls with texture mapping 
 
# Specify the output file and its size
Display "scm0.tif" "file" "rgba"
Format 640 480 1

# Define the viewpoint
Projection "perspective" "fov" [55 ]
Translate 0.3 0.6 2.6 
Rotate 0.0 1 0 0
Rotate 15.0 0 1 0

# Draw one frame, define the world
FrameBegin 1
WorldBegin

# Dont use ambient light - improves contrast in this environment
#LightSource "ambientlight" 1 "intensity" [0.1 ]

# Turn ray-casting shadow calculation on
Attribute "light" "shadows" ["on"]

# 3 light sources
LightSource "distantlight" 2 "intensity" [1 ] "lightcolor" [1 1 1] "from" [0 100 -20] "to" [0 0 0]
LightSource "distantlight" 3 "intensity" [2 ] "lightcolor" [1 1 1] "from" [30 30 30] "to" [0 0 0]
LightSource "distantlight" 4 "intensity" [2 ] "lightcolor" [1 1 1] "from" [50 30 -20] "to" [0 0 0]

# A textured wall behind the block
AttributeBegin
Attribute "identifier" "name" "mytwall"
Color [0.7 0.7 0.7]
Translate -1.0 0.5 1.0
  TransformBegin
  Scale 2 -2 2
  Declare "texname" "string"
  Surface "bwtexmap" "texname" "Text.tif"
  Polygon "P" [0 1 0  1 1 0  1 0 0  0 0 0]
  TransformEnd
AttributeEnd

# A brick wall with a separate displacement map (not used here)
AttributeBegin
Attribute "identifier" "name" "backwall"
Declare "brickwidth" "float"
Declare "brickheight" "float"
Declare	"mortarthickness" "float"
Declare "groovedepth" "float"
Declare "mortarcolor" "color"
Surface "brick" "brickwidth" .6 "brickheight" 0.2 "mortarthickness" 0.06 "groovedepth" 0.00 "mortarcolor" [0.3 0.3 0.3]
#Displacement "brickbump" "brickwidth" .6 "brickheight" 0.2 "mortarthickness" 0.06 "groovedepth" 0.06
Translate -1.0 -0.5 0.0
  TransformBegin
  Rotate 90 0 1 0 
  Polygon "P" [1 1 0  -1 1 0  -1 -1 0  1 -1 0]
  TransformEnd
AttributeEnd

# A carpet on the floor
AttributeBegin
Attribute "identifier" "name" "floor"
Surface "carpet"
Translate 0.0 -1.5 0.0
  TransformBegin
  Rotate 90 1 0 0
  Polygon "P" [1 1 0  -1 1 0  -1 -1 0  1 -1 0]
  TransformEnd
AttributeEnd

WorldEnd
FrameEnd