1 |
|
#!/bin/csh -f |
2 |
< |
# SCCSid "$SunId$ SGI" |
2 |
> |
# RCSid: $Id$ |
3 |
|
# |
4 |
|
# Compute best ambient value for a scene and append to rad input file |
5 |
|
# |
22 |
|
exit 1 |
23 |
|
endif |
24 |
|
onintr quit |
25 |
< |
set tf=/usr/tmp/ca$$ |
25 |
> |
set td=`mktemp -d /tmp/ca.XXXXXX` |
26 |
> |
set tf=$td/compamb |
27 |
|
set oct=`rad -w -s -e -v 0 $argv[1] QUA=High AMB=$tf.amb OPT=$tf.opt | sed -n 's/^OCTREE= //p'` |
28 |
|
rad -n -s -V $argv[1] \ |
29 |
|
| rpict @$tf.opt -av 0 0 0 -aw 16 -dv- -S 1 -x 16 -y 16 -ps 1 $oct \ |
44 |
|
endif |
45 |
|
echo "render= -av $av" >> $argv[1] |
46 |
|
quit: |
47 |
< |
exec rm -f $tf.{amb,opt,dat} |
47 |
> |
exec rm -r $td |