--- ray/src/cv/optics2rad.csh 2006/05/19 03:50:13 2.1 +++ ray/src/cv/optics2rad.csh 2006/05/19 21:33:12 2.2 @@ -1,5 +1,5 @@ #!/bin/csh -f -# RCSid $Id: optics2rad.csh,v 2.1 2006/05/19 03:50:13 greg Exp $ +# RCSid $Id: optics2rad.csh,v 2.2 2006/05/19 21:33:12 greg Exp $ # # Convert Optics 5 output to correct Radiance input # @@ -33,6 +33,7 @@ void BRTDfunc $(name)_back '_EOF_' echo "# Output generated by $0 from $*" +sed -e '/^[^#]/d' -e '/^$/d' $* cat > /tmp/out$$.fmt << '_EOF_' @@ -42,7 +43,7 @@ void glass $(name) 3 ${Rtn} ${Gtn} ${Btn} '_EOF_' -rcalc -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(x):if(x,-1,1)' \ +rcalc -l -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(x):if(x,-1,1)' \ -e 'lum(r,g,b):.265*r+.670*g+.065*b' \ -e 'trans=lum(Rtau,Gtau,Btau)' \ -e 'rfront=lum(fRrho,fGrho,fBrho);rback=lum(bRrho,bGrho,bBrho)' \ @@ -63,7 +64,7 @@ void BRTDfunc $(name) ${bRrho} ${bGrho} ${bBrho} '_EOF_' -rcalc -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(x):if(x,-1,1)' \ +rcalc -l -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(x):if(x,-1,1)' \ -e 'lum(r,g,b):.265*r+.670*g+.065*b' \ -e 'trans=lum(Rtau,Gtau,Btau)' \ -e 'rfront=lum(fRrho,fGrho,fBrho);rback=lum(bRrho,bGrho,bBrho)' \ @@ -84,7 +85,7 @@ void BRTDfunc $(name) ${bRrho} ${bGrho} ${bBrho} '_EOF_' -rcalc -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(x):if(x,-1,1)' \ +rcalc -l -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(x):if(x,-1,1)' \ -e 'lum(r,g,b):.265*r+.670*g+.065*b' \ -e 'trans=lum(Rtau,Gtau,Btau)' \ -e 'rfront=lum(fRrho,fGrho,fBrho);rback=lum(bRrho,bGrho,bBrho)' \