|
# For testing vex shaders without using Houdini - by Renee Tam.
# Be sure to replace these with the appropriate values:
# /stuhome/vsfx419/cutter
# /stuhome/vsfx419
# vex
# cutrDiffuse
# Source code by Renee Tam (Feb 2004). Modified to handle OTL
# for Houdini 7 by M. Kesson with help from Matthew Parrott.
# (Feb 2005).
# specify version
ray_version VEX7.0.231
# Set the path to Cutter's library of IFD shapes
set pathToGeometry = "/stuhome/vsfx419/cutter/Cutter_Help/ifd_geometry"
# Set the path to the OTL file that contains the VEX shader that you wish to test
set pathToOTL = "/stuhome/vsfx419/vex/test.otl"
# For Houdini 7 we must load the OTL file in which our VEX shader is defined
ray_loadotl $pathToOTL
# Set handle "geo" to reference sphere.geo
# Other shapes that are part of the Cutter library are
# circle.geo, cube.geo, plane.geo, torus.geo and tube.geo
ray_detail -s geo $pathToGeometry/sphere.geo
# global transform
ray_globaltransform 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1
# use the ip renderer
ray_picture ip
# setting the resolution
ray_resolution 256 256
# the zooming angle
ray_zoom 1.0
### common light shaders and their default parameters
### NAME PARAMETERS
### asad_light (lightcolor - 1 1 1)
### (coneangle - 180)
### (conedelta - 10)
### pointlight (lightcolor - light color)
### ambient (lightcolor - light color)
### distant (lightcolor - .8 .8 .8)
### (atten - 1000000)
### attenlight (intensity - 1)
### (lightcolor - .8 .8 .8)
### (atten - 100000)
### attenspot (intensity - 1)
### (lightcolor - 1 1 1)
### (coneangle - 30)
### (conedeltaangle - 5)
### (beamdistribution - 1)
### (atten - 1000000)
### window (light_color - 1 1 1)
### (dark_color - .3 .3 .3)
### (xorder - 2)
### (yorder - 3)
### (xoff - .5)
### (yoff - .5)
### (panewidth - 1)
### (paneheight - 1)
### (framewidth - .2)
### (fuzz - .2)
# lights are next
ray_light -n light1 -Z 1 1
ray_shader attenlight intensity 2
ray_transform 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0
# define the path to the object file
ray_object object1 geo $pathToGeometry/sphere.bgeo
# obj transform
ray_transform 1 0 0 0 0 1 0 0 0 0 1 0 0 0 2.5 1
# details of the shader and its parameter names/values go next
#ray_shader opdef:/Shop/cutrDiffuse
# Kd 1
# surfcolor = {1,1,0}
#texname "/stuhome/vsfx419/Type name of new folder/zebra_001.jpg"
# Ks = 1
# roughness = 0.1
#hilitecolor = {1,1,1}
ray_shader opdef:/Shop/azebra c1 1 1 0 \
c2 0 1 1 \
freq 5 \
s_center 0.9 \
t_center 0.9
ray_displace opdef:/Shop/cutrDisplace Km 0.1\
freq 15 \
s_center 0.9 \
t_center 0.9
#ray_displace opdef:/Shop/cutrDiffuse
# ray_1mask and ray_rmask are relevent on when lights
# other than ambient light are used
ray_lmask 0
ray_rmask *
ray_render
ray_quit
|