# mental ray scene file from "Writing mental ray shaders" # http://www.writingshaders.com/scene_catalog.html verbose on link "phong.so" $include "phong.mi" link "point_light_shadow.so" $include "point_light_shadow.mi" link "shadowpass.so" $include "shadowpass.mi" options "opt" object space contrast .05 .05 .05 1 samples -1 2 shadow off frame buffer 0 "+rgba" frame buffer 1 "+rgba" end options light "light_1" "point_light_shadow" ( "light_color" .5 .5 .5 ) # origin 4 5 6 origin 4 .5 7 end light instance "L1" "light_1" end instance light "light_2" "point_light_shadow" ( "light_color" .4 .4 .4 ) # origin -4 5 0 origin -4 1 1 end light instance "L2" "light_2" end instance light "light_3" "point_light_shadow" ( "light_color" .3 .3 .3 ) # origin 2 5 -4 origin 6 4 -6 end light instance "L3" "light_3" end instance shader "red_phong" "phong" ( "diffuse" 1 .5 .5, "specular" 1 1 1, "lights" ["L1", "L2", "L3"] ) material "red" "shadowpass" ( "base_color" = "red_phong", "lights" ["L1", "L2", "L3"] ) end material shader "yellow_phong" "phong" ( "diffuse" 1 1 .5, "specular" 1 1 1, "lights" ["L1", "L2", "L3"] ) material "yellow" "shadowpass" ( "base_color" = "yellow_phong", "lights" ["L1", "L2", "L3"] ) end material shader "blue_phong" "phong" ( "diffuse" .5 .5 1, "specular" 1 1 1, "lights" ["L1", "L2", "L3"] ) material "blue" "shadowpass" ( "base_color" = "blue_phong", "lights" ["L1", "L2", "L3"] ) end material shader "gray_phong" "phong" ( "diffuse" 1 1 1, "specular" 1 1 1, "lights" ["L1", "L2", "L3"] ) material "gray" "shadowpass" ( "base_color" = "gray_phong", "lights" ["L1", "L2", "L3"] ) end material camera "cam" output "fb0" "tif" "buffer_3_without_shadows.tif" output "fb1" "tif" "buffer_3_shadows.tif" output "rgba" "tif" "buffer_3.tif" focal 1.5 aperture 1 aspect 1.5 resolution 300 200 end camera # bw.lookat(0,2,5,0,-.3,0) instance "camera-instance" "cam" transform 1 0 0 0 0 0.90849 0.417906 0 0 -0.417906 0.90849 0 0 0.272547 -5.37826 1 end instance instance "cone-1" geometry "bw_cone" ("name" "bw-cone") material "yellow" transform 0.223607 -0.447214 -0.866025 0.0 -0.894427 -0.447214 0.0 0.0 -0.387298 0.774597 -0.50 0.0 0.085525 -0.789083 -0.592820 1.0 tag 1 globillum on globillum 3 end instance instance "ball-1" geometry "bw_ball" ("name" "bw-ball") material "blue" transform 1.818182 0.0 0.0 0.0 0.0 -0.0 -1.818182 0.0 0.0 1.818182 -0.0 0.0 -1.636364 0.545455 -0.0 1.0 tag 2 globillum on globillum 3 end instance instance "column-1" geometry "bw_cylinder" ("name" "bw-column") material "red" transform 1.812616 -0.845237 0.0 0.0 0.0 -0.0 -2.0 0.0 0.845237 1.812616 -0.0 0.0 -1.111022 -1.909353 -0.50 1.0 tag 3 globillum on globillum 3 end instance instance "square-1" geometry "bw_square" () material "gray" transform 0.010 0.0 0.0 0.0 0.0 -0.0 0.010 0.0 0.0 -0.010 -0.0 0.0 0.0 -0.0 0.0050 1.0 tag 4 globillum on globillum 3 end instance instgroup "root" "camera-instance" "L1" "L2" "L3" "cone-1" "ball-1" "column-1" "square-1" end instgroup render "root" "camera-instance" "opt"