--- ray/src/util/rtpict.pl 2022/04/12 00:30:58 2.25 +++ ray/src/util/rtpict.pl 2023/11/17 23:30:07 2.28 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# RCSid $Id: rtpict.pl,v 2.25 2022/04/12 00:30:58 greg Exp $ +# RCSid $Id: rtpict.pl,v 2.28 2023/11/17 23:30:07 greg Exp $ # # Run rtrace in parallel mode to simulate rpict -n option # May also be used to render layered images with -o* option @@ -15,7 +15,8 @@ my %rtraceC = ('-dt',1, '-dc',1, '-dj',1, '-ds',1, '-d '-ab',1, '-af',1, '-ai',1, '-aI',1, '-ae',1, '-aE',1, '-av',3, '-aw',1, '-aa',1, '-ar',1, '-ad',1, '-as',1, '-me',3, '-ma',3, '-mg',1, '-ms',1, '-lr',1, '-lw',1, - '-ap',2, '-am',1, '-ac',1, '-aC',1); + '-ap',2, '-am',1, '-ac',1, '-aC',1, + '-cs',1, '-cw',2, '-pc',8, '-pXYZ',0); # boolean rtrace options my @boolO = ('-w', '-bv', '-dv', '-i', '-u'); # view options and the associated number of arguments @@ -26,10 +27,11 @@ my %vwraysC = ('-vf',1, '-vtv',0, '-vtl',0, '-vth',0, my %ignoreC = ('-t',1, '-ps',1, '-pt',1, '-pm',1,); # Starting options for rtrace (rpict values) my @rtraceA = split(' ', 'rtrace -u- -dt .05 -dc .5 -ds .25 -dr 1 ' . - '-aa .2 -ar 64 -ad 512 -as 128 -lr 7 -lw 1e-03'); + '-aa .2 -ar 64 -ad 512 -as 128 -lr 7 -lw 1e-04'); my @vwraysA = ('vwrays', '-pj', '.67'); my @vwrightA = ('vwright', '-vtv'); my @rpictA = ('rpict', '-ps', '1'); +my @pvalueA = ('pvalue', '-r'); my $outpatt = '^-o[vrxlLRXnNsmM]+'; my $refDepth = ""; my $irrad = 0; @@ -88,6 +90,11 @@ while ($#ARGV >= 0 && "$ARGV[0]" =~ /^[-\@]/) { $ambcache = ($ARGV[1] > 0.0); } elsif ("$ARGV[0]" eq '-af') { $ambfile = "$ARGV[1]"; + } elsif ("$ARGV[0]" eq '-pXYZ') { + push @pvalueA, $ARGV[0]; + } elsif ("$ARGV[0]" eq '-pc') { + push @pvalueA, '-p'; + push @pvalueA, @ARGV[1..8]; } push @rtraceA, $ARGV[0]; push @rpictA, shift(@ARGV); @@ -161,7 +168,7 @@ if ($nprocs > 1 && $ambounce > 0 && $ambcache && defin die "Error running rtrace\n" if ( $? ); system "( getinfo < /tmp/pix$$.txt | getinfo -a 'VIEW=$view'; " . "getinfo - < /tmp/pix$$.txt | rlam /tmp/ord$$.txt - " . - "| sort -k2rn -k1n ) | pvalue -r -Y $res[3] +X $res[1]"; + "| sort -k2rn -k1n ) | @pvalueA -Y $res[3] +X $res[1]"; die "rlam error\n" if ( $? ); unlink ("/tmp/ord$$.txt", "/tmp/pix$$.txt"); exit 0; @@ -180,7 +187,7 @@ if ($nprocs > 1 && $ambounce > 0 && $ambcache && defin if (defined $outzbf) { exec "@vwraysA -ff | @rtraceA -fff -olv @res '$oct' | " . "rsplit -ih -iH -f -of '$outzbf' -oh -oH -of3 - | " . - "pvalue -r -df | getinfo -a 'VIEW=$view'"; + "@pvalueA -df | getinfo -a 'VIEW=$view'"; } ##################################################################### ##### Base case with output picture only? @@ -207,7 +214,7 @@ my %rtoutC = ( ); # Arguments for rsplit based on output file type my %rcodeC = ( - '.hdr', ['-of3', '!pvalue -r -df -u'], + '.hdr', ['-of3', "!@pvalueA -df -u"], '.dpt', ['-of', "!rcode_depth$refDepth -ff"], '.nrm', ['-of3', '!rcode_norm -ff'], '.idx', ['-oa', '!rcode_ident "-t "']