# mental ray scene file from "Writing mental ray shaders" # http://www.writingshaders.com/scene_catalog.html verbose on link "vertex_color.so" $include "vertex_color.mi" options "opt" object space contrast .1 .1 .1 1 samples 0 2 end options camera "camera" output "rgba" "tif" "texture_7.tif" focal 35 aperture 22.05 aspect 1.375546 resolution 200 150 end camera instance "main-camera" "camera" transform 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -3 1 end instance material "vcolor" "vertex_color" ( "uv_index" 0 ) end material object "square" visible group # Coordinate data for XYZ position: -.5 -.5 0 .5 -.5 0 .5 .5 0 -.5 .5 0 # First set of texture coordinates # (see "Textures, Motion, Derivatives" in # documentation of miState): 0 0 0 1 0 0 1 1 0 0 1 0 # Second set of texture coordinates: 1 0 0 0 1 0 0 0 1 1 1 1 # Following integers are indices into previous list of triplets: # "v" is vertex coordinate # "t" is tex_list array element, starting at 0 v 0 t 4 t 8 v 1 t 5 t 9 v 2 t 6 t 10 v 3 t 7 t 11 # Define polygon; now integers refer to "v" definitions: p 0 1 2 3 end group end object instance "colored-square" "square" material "vcolor" end instance instgroup "root" "main-camera" "colored-square" end instgroup render "root" "main-camera" "opt" # Incremental render: change output file from # "texture_7.tif" to "texture_7_uv_1.tif"; # change "vertex_color" parameter "uv_index" from 0 to 1. incremental camera "camera" output "rgba" "tif" "texture_7_uv_1.tif" focal 35 aperture 22.05 aspect 1.375546 resolution 200 150 end camera incremental material "vcolor" "vertex_color" ( "uv_index" 1 ) end material render "root" "main-camera" "opt" # For diagram: material "texture_space_0" "vertex_color" ( "uv_index" 0 ) end material material "texture_space_1" "vertex_color" ( "uv_index" 1 ) end material