### William Schilthuis ### WilliamGS.com ### http://www.sfdm.scad.edu/faculty/mkesson/vsfx319/index.html ### spring 2009 ### Renderman Archive ### Matrix Composition ### Part 2 of 6 ### Description: ### Prepass Ambient Occlusion ### Use this to bake out AO point cloud ### ### uncomment appropriate lines to render the ### image for displacment occlusion, which is ### just a cool effect. ### Option "searchpath" "shader" "@:../shaders" Option "searchpath" "texture" "../textures" Option "searchpath" "archive" "../archives:Cutter_Help/templates/Rib:custom_templates/Rib" DisplayChannel "float _area" # Display "wgs_matrix_rook_AOprepass" "it" "rgba" #use this to test camera Format 512 512 1 Projection "perspective" "fov" 36 #38* is all. 2* is really close ShadingRate 0.2 Translate 0.0 0 15 Rotate -90 1 0 0 Rotate 00 0 1 0 Scale 1 1 -1 WorldBegin Attribute "visibility" "trace" [1] # use to test AO Attribute "cull" "hidden" 0 Attribute "cull" "backfacing" 0 Attribute "dice" "rasterorient" 0 # hide ptc shader and use occlude to test camera composition Surface "bakeAreas" "bakename" ["/stuhome/vsfx319/textures/wgs_matrix_rook_AO.ptc"] #linux # Surface "bakeAreas" "bakename" ["M:/vsfx319/textures/wgs_matrix_rook_AO.ptc"] #windows # Surface "rtOcclude" "samples" [256] #use to test AO AttributeBegin #SCENE GROUP TransformBegin # ReadArchive "cutrAxes.rib" # Surface "rtOcclude" "samples" [256] #use to test AO Scale 10 10 10 Polygon "P" [-0.5 0 -0.5 -0.5 0 0.5 0.5 0 0.5 0.5 0 -0.5] "st" [0 0 0 1 1 1 1 0] TransformEnd AttributeEnd AttributeBegin #COMPOSITION GROUP # Surface "rtOcclude" "samples" [256] #use to test AO # Surface "plastic" #use for AO displace bake ReadArchive "wgs_matrix_rook_compositiongroup_archive.rib" AttributeEnd WorldEnd #execute the next line to generate AO texture map #txmake ../textures/wgs_matrix_rook_AO.tif ../textures/wgs_matrix_rook_AO.tex