old-www/LDP/LG/issue17/source/cyldisp.rib

81 lines
2.1 KiB
Plaintext

#########################################
# Test RIB for checking shaders
# By Michael J. Hammel March 1997
#########################################
# First we setup the output file
Display "cyldisp.tif" "file" "rgb"
# Then set the x & y resolution of the image and the pixel aspect
# ratio (1 = square pixels)
Format 320 240 1
# We now setup the camera (projection type and field of view)
Projection "perspective" "fov" 55
# Move the world 16 units away from the camera and position it
# so the view is to the left of the camera and down from the cameras
# point of view.
Translate 0 0 16
#
# Off-white ambient light, not very intense, to make sure everything
# gets lit just a little.
#
LightSource "ambientlight" 1
"intensity" 0.03 "lightcolor" [0.7 0.7 0.7]
TransformBegin
# Our first (and only) frame....
FrameBegin 1
WorldBegin
#
# Distant lights directly in front of and just off to both sides of
# our cylinder.
#
TransformBegin
Rotate -25 0 1 0
LightSource "distantlight" 3
"intensity" 0.825 "lightcolor" [1 1 1]
TransformEnd
TransformBegin
Rotate 25 0 1 0
LightSource "distantlight" 3
"intensity" 0.625 "lightcolor" [1 1 1]
TransformEnd
TransformBegin
LightSource "distantlight" 3
"intensity" 0.425 "lightcolor" [1 1 1]
TransformEnd
# The cylinder and its attributes
TransformBegin
Translate -.6 -.5 0
Scale 2.5 2.5 1
AttributeBegin
Color [ 0.72 0.45 0.20 ] # copper color
Attribute "render" "truedisplacement" 1
Attribute "displacementbound" "coordinatesystem" "object" "sphere" 2
Declare "Ka" "float"
Surface "plastic"
"Ka" .5
Declare "frequency" "float"
Declare "phase" "float"
Declare "offset" "float"
Declare "Km" "float"
Declare "dampzone" "float"
Displacement "RCThreads"
TransformBegin
Scale 2 2.5 2
Rotate -90 1 0 0
Cylinder 1 -1 1 360
TransformEnd
AttributeEnd
TransformEnd
WorldEnd
FrameEnd