Monday, January 10, 2011

SIGGRAPHASIA2010 Rib Exercises


Challenge 1

# The Translate and Rotate values for each item must be
# adjusted in order to place each surface in its correct
# position to make a "teapot".
Option "searchpath" "shader" "@:../shaders"
Option "searchpath" "texture" "@:../textures"
Option "searchpath" "archive" "../archives:Cutter_Help/templates/Rib:custom_templates/Rib"

Display "teapot" "it" "rgba"
Format 640 360 1
Projection "perspective" "fov" 40

ShadingRate 1
LightSource "distantlight" 1 "intensity" 1.5 "from" [0 0 0] "to" [0 0 1]

Translate 0 0 5
Rotate -30 1 0 0
Rotate 20 0 1 0
Scale 1 1 -1

WorldBegin
Surface "plastic"
TransformBegin
Attribute "identifier" "name" ["lid_handle"]
Color 1 0 0
Translate 0 .51 0
Sphere 0.15 -0.15 0.15 360
TransformEnd
TransformBegin
Attribute "identifier" "name" ["pot_lid"]
Color 1 0 0
Translate 0 0 0
Rotate 90 -1 0 0
Cone 0.5 0.5 360
TransformEnd
TransformBegin
Attribute "identifier" "name" ["pot_base"]
Color 1 1 1
Translate 0 -.5 0
Rotate 90 -1 0 0
Hyperboloid 1 0 0 0.5 0 0.5 360
TransformEnd
TransformBegin
Attribute "identifier" "name" ["main_handle"]
Color 1 1 1
Translate 0 .3 0
Torus 0.8 0.03 0 360 360
TransformEnd
TransformBegin
Attribute "identifier" "name" ["spout"]
Color 1 1 1
Translate .5 -.3 .5
Rotate 50 -1.5 0 1
Rotate 70 0 1 0
Cylinder 0.1 0.3 0.6 360
TransformEnd
WorldEnd