Script that stipples rendered frames in a loop

This commit is contained in:
Matt McWilliams 2021-08-10 18:07:26 -04:00
parent 389224377a
commit 67c71d683d
1 changed files with 39 additions and 0 deletions

39
stipple.sh Normal file
View File

@ -0,0 +1,39 @@
#!/bin/bash
INPUT=`realpath "${1}"`
OUTPUT=`realpath "${2}"`
WIDTH=404
HEIGHT=374
DOTSIZE=4
MAXGENERATIONS=25
MAXPARTICLES=500
MINDOTSIZE=0.8
LINE=0.8
FILL=true
#files in dir
for png in "${INPUT}/"*.png ; do
filename=`basename "${png}"`
name=`echo "${filename}" | cut -d'.' -f1`
num=`echo "${name}" | awk -F'_' '{print $(NF)}'`
tmp=`mktemp`.png
bash white.sh "${png}" "${tmp}"
cd ~/src/stipple_gen/
bash stipple_gen.sh \
--inputImage "${tmp}" \
--outputImage "${OUTPUT}/${name}_rendered.png" \
--outputSVG "${OUTPUT}/${name}.svg" \
--canvasWidth $WIDTH \
--canvasHeight $HEIGHT \
--dotSizeFactor $DOTSIZE \
--windowWidth $WIDTH \
--windowHeight $HEIGHT \
--maxGenerations $MAXGENERATIONS \
--minDotSize $MINDOTSIZE \
--line $LINE \
--fill $FILL \
--maxParticles $MAXPARTICLES
rm "${tmp}"
cd ~/src/animation/
done