Example 5: Trick

Text    scene.rib    interact.rib    Makefile

scene.rib

Option "searchpath" "shader" ["../../shaders/plain:../../lib/prman:&:.:"]

Option "searchpath" "archive" ["&:.:../lib"]

 

Format 640 480 1

Hider "hidden" "jitter" [0]

FrameBegin 0

 

Projection "perspective" "fov" [34]

 

Transform [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0.3 2 1 ]

Rotate -20 1 0 0

 

Display "scene.tif" "tiff" "rgba"

 

 

 

WorldBegin

 

 

 

# Lights

 

Attribute "identifier" "string name" ["ambient"]

LightSource "ambientlight" 1 "intensity" [1] "lightcolor" [0.15 0.15 0.15]

 

Attribute "identifier" "string name" ["light1"]

LightSource "spotlight_rts" 2 "from" [0.402 0.227 -0.702] "to" [0.124 -0.422 0.005]

"intensity" [1] "coneangle" [0.75] "lightcolor" [1 0.9 0.7]

 

Attribute "identifier" "string name" ["light2"]

LightSource "spotlight_rts" 3 "from" [-0.602 0.159 -0.162] "to" [-0.309 -0.751 0.130]

"intensity" [1] "coneangle" [0.7] "lightcolor" [0.4 0.3 0.6]

 

Attribute "identifier" "string name" ["light3"]

LightSource "spotlight_rts" 4 "from" [0.214 -0.0148 1.630] "to" [0.113 -0.234 0.660]

"intensity" [1.6] "coneangle" [0.8] "lightcolor" [0.6 0.0.3 0.0]

 

 

 

 

Attribute "visibility" "string transmission" ["opaque"]

Attribute "visibility" "int trace" [1]

Attribute "displacementbound" "sphere" [10] "coordinatesystem" ["world"]

Attribute "trace" "displacements" [1]

 

 

 

 

# Floor

 

Attribute "identifier" "string name" ["floor"]

Surface "hb_plastic"

 

TransformBegin

ConcatTransform [ 4 0 0 0 0 1 0 0 0 0 4 0 0 -0.5 0 1 ]

Color [0.6 0.8 1]

Scale 0.5 0.5 0.5

Polygon "P" [ -1 0 1 1 0 1 1 0 -1 -1 0 -1 ]

TransformEnd

 

 

# Teapot 1

 

AttributeBegin

 

Attribute "identifier" "string name" ["teapot1"]

Surface "hb_plastic" "roughness" [0.5] "specular_color" [0 1 0]

 

TransformBegin

Translate 0.4 -0.5 0.3

Rotate -60 0 1 0

Scale 0.7 0.7 0.7

Color [0.8 1 1]

Procedural "DelayedReadArchive" [ "teapot.rib" ] [ -10 10 -10 10 -10 10 ]

TransformEnd

 

AttributeEnd

 

 

# Teapot 2

 

AttributeBegin

 

Attribute "identifier" "string name" ["teapot2"]

#Displacement "hb_pitted"

Surface "hb_plastic" "specular_color" [1 0 0]

 

TransformBegin

Translate 0.4 -0.5 -0.3

Rotate 60 0 1 0

Scale 0.85 0.85 0.85

Color [1 0.8 1]

Procedural "DelayedReadArchive" [ "teapot.rib" ] [ -10 10 -10 10 -10 10 ]

TransformEnd

 

AttributeEnd

 

 

# Teapot 3

 

AttributeBegin

 

Attribute "identifier" "string name" ["teapot3"]

Surface "hb_plastic" "roughness" [0.15] "specular_color" [0.8 0.9 1]

#Displacement "hb_encrusted"

 

TransformBegin

Translate -0.3 -0.5 0

Rotate 180 0 1 0

Color [1 1 0.8]

Procedural "DelayedReadArchive" [ "teapot.rib" ] [ -10 10 -10 10 -10 10 ]

TransformEnd

 

AttributeEnd

 

 

 

 

WorldEnd

FrameEnd