--- ray/src/util/genBSDF.pl 2012/06/14 18:35:03 2.36
+++ ray/src/util/genBSDF.pl 2012/09/02 15:33:16 2.38
@@ -1,5 +1,5 @@
#!/usr/bin/perl -w
-# RCSid $Id: genBSDF.pl,v 2.36 2012/06/14 18:35:03 greg Exp $
+# RCSid $Id: genBSDF.pl,v 2.38 2012/09/02 15:33:16 greg Exp $
#
# Compute BSDF based on geometry and material description
#
@@ -197,17 +197,17 @@ print "\t\n";
print "\t\tTensorTree$tensortree\n";
print "\t\n";
-# Start rtcontrib processes for compute each side
+# Start rcontrib processes for compute each side
do_tree_rtcontrib(0) if ( $doback );
do_tree_rtcontrib(1) if ( $doforw );
} # end of sub do_tree_bsdf()
-# Run rtcontrib process in background to generate tensor tree samples
+# Run rcontrib process to generate tensor tree samples
sub do_tree_rtcontrib {
my $forw = shift;
my $matargs = "-m $bmodnm";
- if ( !$forw || !$doback ) { $matargs .= " -m $fmodnm"; }
+ if ( !$forw || !$doback || $tensortree==3 ) { $matargs .= " -m $fmodnm"; }
my $cmd = "rcontrib $rtargs -h -ff -fo -n $nproc -c $nsamp " .
"-e '$disk2sq' -bn '$ns*$ns' " .
"-b '$ns*floor(out_square_x*$ns)+floor(out_square_y*$ns)' " .
@@ -245,7 +245,7 @@ sub do_tree_rtcontrib {
"| $cmd";
}
# print STDERR "Starting: $cmd\n";
- system "$cmd" || die "Failure running rtcontrib";
+ system "$cmd" || die "Failure running rcontrib";
ttree_out($forw);
} # end of do_tree_rtcontrib()
@@ -254,8 +254,8 @@ sub ttree_out {
my $forw = shift;
my $side = ("Back","Front")[$forw];
my $cmd;
-# Only output one transmitted distribution, preferring backwards
-if ( !$forw || !$doback ) {
+# Only output one transmitted anisotropic distribution, preferring backwards
+if ( !$forw || !$doback || $tensortree==3 ) {
print
'
System
@@ -263,8 +263,10 @@ print
CIE Illuminant D65 1nm.ssp
ASTM E308 1931 Y.dsp
- Transmission
- LBNL/Shirley-Chiu
+';
+print "\t\t\tTransmission $side\n";
+print
+' LBNL/Shirley-Chiu
BTDF
';
@@ -379,7 +381,7 @@ kbin2(pol,azi) = select(kfindrow(1, pol),
kbin = kbin2(Acos(abs(Dz)),Atan2(Dy,Dx));
';
my $ndiv = 145;
-# Compute scattering data using rtcontrib
+# Compute scattering data using rcontrib
my @tfarr;
my @rfarr;
my @tbarr;