#!/bin/bash ################################ # Written by Jeremy Green # http://www.rhythmandcode.com/ ################################ LONGDIR=$(pwd) DIR=${LONGDIR##*/} SMALLSIZE=1024 MODE=thumb #MODE should be 'full' or 'thumb' OUTPUTDIR=. if [ $# = 1 ]; then echo "custom mode: $1" MODE=$1 fi if [ $# = 2 ]; then echo "custom num: $2" DIR=$2 fi mfacs=( 0.25 ) msats=( 1 ) mgamas=( 0.6 ) echo "running pfstone mapping operation" #This one scales the images within 1024x1024 I=1; #img # (useful for panos) for a in "${mfacs[@]}" do for s in "${msats[@]}" do for g in "${mgamas[@]}" do if [ -f $OUTPUTDIR/$DIR.$MODE.auto_mantiuk06_f.$a-s.$s-g.$g--$I.jpg ]; then echo " image exists remove to regenerate $OUTPUTDIR/$DIR.$MODE.auto_mantiuk06_f.$a-s.$s-g.$g--$I.jpg" else echo "generating image" pfsin $DIR.$MODE.exr | pfsgamma -g $g | pfstmo_mantiuk06 -f $a -s $s | pfsout $OUTPUTDIR/$DIR.$MODE.auto_mantiuk06_f.$a-s.$s-g.$g--$I.jpg fi if [ -f $OUTPUTDIR/$DIR.aligned.$MODE.auto_mantiuk06_f.$a-s.$s-g.$g--$I.jpg ]; then echo " image exists remove to regenerate $OUTPUTDIR/$DIR.aligned.$MODE.auto_mantiuk06_f.$a-s.$s-g.$g--$I.jpg" else echo "generating image" pfsin $DIR.aligned.$MODE.exr | pfsgamma -g $g | pfstmo_mantiuk06 -f $a -s $s | pfsout $OUTPUTDIR/$DIR.aligned.$MODE.auto_mantiuk06_f.$a-s.$s-g.$g--$I.jpg fi fi ((I++)); done done done #pfsin image_all_$MODE.exr | pfstmo_fattal02 -a 0.00151356 -b 0.50 -s 0.9 | pfsgamma -g 0.95 | pfsout $DIR.all.$MODE.auto_fattal02_a0.00151356.b0.50.s0.9.png #pfsin image_all_$MODE.exr | pfstmo_fattal02 -a 0.00151356 -b 0.65 -s 0.9 | pfsgamma -g 0.95 | pfsout $DIR.all.$MODE.auto_fattal02_a0.00151356.b0.65.s0.9.png #pfsin image_all_$MODE.exr | pfstmo_fattal02 -a 0.00151356 -b 0.80 -s 0.9 | pfsgamma -g 0.95 | pfsout $DIR.all.$MODE.auto_fattal02_a0.00151356.b0.80.s0.9.png #echo "pfsinhdrgen image_end1.hdrgen | pfshdrcalibrate -v -f ~/bin/camera.response | pfsoutexr image_end1.exr" #pfsinhdrgen image_end1.hdrgen | pfshdrcalibrate -v -f ~/bin/camera.response | pfsoutexr image_end1.exr #echo "running pfstone mapping operation" #This one scales the images within 1024x1024 #pfsin image_end1.exr | pfssize --maxx 1024 --maxy 1024 | pfstmo_fattal02 -a 0.00151356 -b 0.7 -s 0.7 | pfsgamma -g 0.85 | pfsout $DIR.end1.auto_fattal02_a0.00151356.b0.7.s0.7.png #echo "pfsinhdrgen image_end2.hdrgen | pfshdrcalibrate -v -f ~/bin/camera.response | pfsoutexr image_end2.exr" #pfsinhdrgen image_end2.hdrgen | pfshdrcalibrate -v -f ~/bin/camera.response | pfsoutexr image_end2.exr #echo "running pfstone mapping operation" #This one scales the images within 1024x1024 #pfsin image_end2.exr | pfssize --maxx 1024 --maxy 1024 | pfstmo_fattal02 -a 0.00151356 -b 0.7 -s 0.7 | pfsgamma -g 0.85 | pfsout $DIR.end2.auto_fattal02_a0.00151356.b0.7.s0.7.png #echo "pfsinhdrgen image_outside.hdrgen | pfshdrcalibrate -v -f ~/bin/camera.response | pfsoutexr image_outside.exr" #pfsinhdrgen image_outside.hdrgen | pfshdrcalibrate -v -f ~/bin/camera.response | pfsoutexr image_outside.exr #echo "running pfstone mapping operation" #This one scales the images within 1024x1024 #pfsin image_outside.exr | pfssize --maxx 1024 --maxy 1024 | pfstmo_fattal02 -a 0.00151356 -b 0.7 -s 0.7 | pfsgamma -g 0.85 | pfsout $DIR.outside.auto_fattal02_a0.00151356.b0.7.s0.7.png #echo "pfsin image.exr | pfsclamp --min 0.001 -p | pfsoutexr image_clamp.exr" #pfsin image.exr | pfsclamp --min 0.001 -p | pfsoutexr image_clamp.exr