An Example Render script

#! /bin/csh -f
# Use csh -f for fast startup.
# replace render with ray to use the raytracer.

if ( $1 == 'render' ) then

aset render.pixwidth 640
aset render.pixheight 480

set view_f_name = "Shot.1.mat.a1"
set model_f_name = "Shot.1.models.a1"
set curr_time = "0.00"
set time_inc = "0.1"
set curr_label = "0.00"
set label_inc = "0.1"
@ curr_frame = 1
while ( $curr_frame <= 10 )
   echo -n "Frame: $curr_frame "; date
   set outname = movie-{$curr_label}.rle.Z
   render -timenow $curr_time $view_f_name $model_f_name > $outname
   set curr_time = `awk 'BEGIN {print '$curr_time'+'$time_inc'; exit}'`
   set curr_label = `awk 'BEGIN {print '$curr_label'+'$label_inc'; exit}'`
   @ curr_frame = $curr_frame + 1
end

endif

#This second section is to correctly correct a batch of exp files
#produced by the raytracer.  If unexp is run seperately on each file
#the brightness of each will depend on the individual brightest areas,
#creating flickering over the course of the animation.

if ( $1 == 'unexp' || $1 == 'all' ) then 

rm -f exps.out
foreach f ( *.exp )
   echo Scanning $f...
   unexp -s $f >>& exps.out
end
set max = `awk 'NF == 3 { if ( $3 > max ) max = $3 } END { print max }' exps.out`
echo Maximum exponent is $max
foreach f ( *.exp )
   echo Fixing $f...
   unexp -m $max $f > $f:r.rle
   compress $f:r.rle
#   rm -f $f
end
rm -f exps.out