--- ray/src/util/genBSDF.pl 2011/06/03 19:41:14 2.19 +++ ray/src/util/genBSDF.pl 2011/06/08 23:16:47 2.21 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# RCSid $Id: genBSDF.pl,v 2.19 2011/06/03 19:41:14 greg Exp $ +# RCSid $Id: genBSDF.pl,v 2.21 2011/06/08 23:16:47 greg Exp $ # # Compute BSDF based on geometry and material description # @@ -13,6 +13,7 @@ sub userror { } my $td = mkdtemp("/tmp/genBSDF.XXXXXX"); chomp $td; +my @savedARGV = @ARGV; my $tensortree = 0; my $ttlog2 = 4; my $nsamp = 1000; @@ -98,7 +99,10 @@ die "Could not compile scene\n" if ( $? ); print ' -System +'; +print "\n"; +print +'System @@ -317,7 +321,8 @@ print '; print "\t\t\tReflection $side\n"; -print ' LBNL/Shirley-Chiu +print +' LBNL/Shirley-Chiu BRDF '; @@ -397,7 +402,8 @@ my $rtcmd = "rtcontrib $rtargs -h -ff -fo -n $nproc -c "-o '$td/%s.flt' -m $fmodnm -m $bmodnm $octree"; my $rccmd = "rcalc -e '$tcal' " . "-e 'mod(n,d):n-floor(n/d)*d' -e 'Kbin=mod(recno-.999,$ndiv)' " . - q{-if3 -e '$1=(0.265*$1+0.670*$2+0.065*$3)/KprojOmega'}; + q{-if3 -e 'oval=(0.265*$1+0.670*$2+0.065*$3)/KprojOmega' } . + q[-o '${ oval },']; if ( $doforw ) { $cmd = "cnt $ndiv $ny $nx | rcalc -of -e '$tcal' " . "-e 'xp=(\$3+rand(.12*recno+288))*(($dim[1]-$dim[0])/$nx)+$dim[0]' " .