This page demonstrates the basics of scripting shapes RenderMan scene description (rib) protocol. Writing rib files by hand focuses attention on the use of color, opacity and the fundamental concepts related to xyz coordinate system.

The preliminary renders have been done using basic shading so that the geometry can be more easily seen.



Basic Geometry



TransformBegin
	Translate 0 0 0
	Scale 1 1 1
	ReadArchive "../archives/matrixbyte1.rib"
TransformEnd
	
TransformBegin
	Translate 0 7 0
	Scale 1 1 1
	Rotate 30 0 90 1
	ReadArchive "../archives/matrixbyte1.rib"
TransformEnd
	
TransformBegin
	Translate 0 14 0
	Scale 1 1 1
	ReadArchive "../archives/matrixbyte1.rib"
TransformEnd
	
TransformBegin
	Translate 0 -7 0
	Scale 1 1 1
	Rotate 30 0 90 1
	ReadArchive "../archives/matrixbyte1.rib"
TransformEnd
	
TransformBegin
	Translate 0 -14 0
	Scale 1 1 1
	ReadArchive "../archives/matrixbyte1.rib"
TransformEnd
			

Field Of View



Display "../michael_devore/matrix/MatrixCamera2a.tif" "tiff" "rgba"
PixelSamples 8 8
Format 954 480 1
#Format 477 240 1
Projection "perspective" "fov" 90
ShadingRate 1
DepthOfField 4 1 10
Translate  0 0 20
Rotate 0 0 0 1
Rotate 90 0 0 1
Scale 1 1 -1

			

Depth of Field



Display "../michael_devore/matrix/MatrixCamera3.tif" "tiff" "rgba"
PixelSamples 8 8
Format 954 480 1
#Format 477 240 1
Projection "perspective" "fov" 40
ShadingRate 1
DepthOfField 18 1 6	# f-stop, constant 1, focal distance
Translate  0 0 11
Rotate 0 0 0 1
Rotate 0 0 0 1
Scale 1 1 -1
			

Displacement Mapping



Display "Matrix Camera 1" "it" "rgb"
PixelSamples 8 8
Format 954 480 1
#Format 477 240 1
Projection "perspective" "fov" 40
ShadingRate 1
DepthOfField 18 1 6	# f-stop, constant 1, focal distance
Translate  0 8.4 13
Rotate 60 1 0 0
Rotate -20 0 1 0
Scale 1 1 -1
	
Attribute "visibility" "trace" [1]
	
AttributeBegin
	Displacement "emboss" "texname" ["texname.tex"] "Km" 0.10
AttributeEnd
			


Lighting



TransformBegin
	LightSource "pointlight" 1 "float intensity" 150 "point from" [1 4 1]
		"color lightcolor" [1.0 1.0 1.0]
TransformEnd
	
TransformBegin
	LightSource "pointlight" 1 "float intensity" 15 "point from" [1 -4 1]
		"color lightcolor" [1.0 1.0 1.0]
TransformEnd
	
TransformBegin
	LightSource "pointlight" 1 "float intensity" 15 "point from" [1 4 1]
		"color lightcolor" [1.0 0 0]
TransformEnd

TransformBegin
	LightSource "pointlight" 1 "float intensity" 15 "point from" [1 -4 1]
		"color lightcolor" [1.0 0 0]
TransformEnd

TransformBegin
	LightSource "pointlight" 1 "float intensity" 20 "point from" [-10 4 -10]
		"color lightcolor" [.5 0 1]
TransformEnd
	
TransformBegin
	LightSource "pointlight" 1 "float intensity" 20 "point from" [-10 -4 -10]
		"color lightcolor" [.5 0 1]
TransformEnd
			

Lighting and Shading



Surface "combo"
		"float Ka" 1.0
		"float Kd" 0.50
		"float Ks" 1.0
		"float Kr" 1.4
		"float ior" 1.50
		"float Kt" 1.0
		"float roughness" 0.50
		"string envmap" ["raytrace"]
		"color specularcolor" [.5 .5 1.0]
				
Surface "glassrefr"
		"float Kr" 1.5
		"float Kt".5
		"float ior" 1.50
		"float Ks" 1.0
		"float shinyness" 50.0
	
Color .9 .9 1
			



Display "Matrix Camera 2" "it" "rgb"
#Display "../michael_devore/matrix/MatrixCamera2a.tif" "tiff" "rgba"
##Display "../michael_devore/matrix/MatrixCamera2aprev.tif" "tiff" "rgba"
PixelSamples 8 8
#Format 954 480 1
Format 477 240 1
#Projection "perspective" "fov" 90
#ShadingRate 1
#DepthOfField 4 1 10 # f-stop, constant 1, focal distance
#Translate  0 0 20
#Rotate 0 0 0 1
#Rotate 90 0 0 1
#Scale 1 1 -1