Stipple script allows for different modes and renders a video
This commit is contained in:
parent
711ad36b02
commit
b4b8fd37cb
16
stipple.sh
16
stipple.sh
|
@ -11,6 +11,9 @@ MAXPARTICLES=500
|
||||||
MINDOTSIZE=0.8
|
MINDOTSIZE=0.8
|
||||||
LINE=0.8
|
LINE=0.8
|
||||||
FILL=true
|
FILL=true
|
||||||
|
MODE="stipple"
|
||||||
|
|
||||||
|
IMAGES=""
|
||||||
|
|
||||||
#files in dir
|
#files in dir
|
||||||
for png in "${INPUT}/"*.png ; do
|
for png in "${INPUT}/"*.png ; do
|
||||||
|
@ -20,6 +23,11 @@ for png in "${INPUT}/"*.png ; do
|
||||||
tmp=`mktemp`.png
|
tmp=`mktemp`.png
|
||||||
bash white.sh "${png}" "${tmp}"
|
bash white.sh "${png}" "${tmp}"
|
||||||
cd ~/src/stipple_gen/
|
cd ~/src/stipple_gen/
|
||||||
|
if [ "${IMAGES}" == "" ]; then
|
||||||
|
part=`echo "${name}" | awk -F'_0' '{print $1}'`
|
||||||
|
IMAGES="${OUTPUT}/${part}_%06d_rendered.png"
|
||||||
|
VIDEO="${OUTPUT}/${part}.mov"
|
||||||
|
fi
|
||||||
bash stipple_gen.sh \
|
bash stipple_gen.sh \
|
||||||
--inputImage "${tmp}" \
|
--inputImage "${tmp}" \
|
||||||
--outputImage "${OUTPUT}/${name}_rendered.png" \
|
--outputImage "${OUTPUT}/${name}_rendered.png" \
|
||||||
|
@ -33,11 +41,17 @@ for png in "${INPUT}/"*.png ; do
|
||||||
--minDotSize $MINDOTSIZE \
|
--minDotSize $MINDOTSIZE \
|
||||||
--line $LINE \
|
--line $LINE \
|
||||||
--fill $FILL \
|
--fill $FILL \
|
||||||
--maxParticles $MAXPARTICLES
|
--maxParticles $MAXPARTICLES \
|
||||||
|
--mode $MODE
|
||||||
rm "${tmp}"
|
rm "${tmp}"
|
||||||
cd ~/src/animation/
|
cd ~/src/animation/
|
||||||
|
if [ "${MODE}" != "tsp" ]; then
|
||||||
opt=`mktemp`.svg
|
opt=`mktemp`.svg
|
||||||
svgsort "${OUTPUT}/${name}.svg" "${opt}"
|
svgsort "${OUTPUT}/${name}.svg" "${opt}"
|
||||||
mv "${opt}" "${OUTPUT}/${name}.svg"
|
mv "${opt}" "${OUTPUT}/${name}.svg"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
ffmpeg -r 12 -f image2 -i "${IMAGES}" \
|
||||||
|
-c:v prores_ks -profile:v 3 \
|
||||||
|
"${VIDEO}"
|
||||||
|
|
Loading…
Reference in New Issue