Fortraneries/Fraktalism/mkvoxvidz.sh

57 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
echo
source "./common.sh"
make voxelize
if [ $? -ne 0 ] ; then
echo
echo "Make error " $?
exit 1
fi
./voxelize > WS/voxels.dat
./vox2inc.awk < WS/voxels.dat > WS/voxels.inc
grep NbrVox WS/voxels.inc
TMPNG="/dev/shm/voxvidz.png"
NBIMG=360
for idx in $( seq 0 $(( NBIMG - 1)) )
do
dst=$(printf "frames/voxel/%05d.png" $idx)
delta=$( echo "scale=6 ; ${idx}/360" | bc -l)
echo "Renderbox work on "$dst" delta = " $delta
povray -ishowvoxels.pov -K$idx ${POVOPT} \
-O${TMPNG} 2> WS/toto.err
if [ $? -ne 0 ] ; then
echo "ERROR ERROR ERROR ERROR ERROR ERROR"
tail -15 WS/toto.err
sleep 20
#exit 1
fi
titre='Voxelisation - tTh - avril 2022'
numbers=$(tail -1 WS/camvox.log | \
awk '{printf " %6.3f %6.3f %6.3f", $1, $2, $3}')
echo "$numbers"
convert ${TMPNG} \
-fill Gray70 \
-kerning 1 \
-pointsize 24 \
-font AvantGarde-Book \
-gravity South-West \
-annotate +20+32 "$titre" \
-annotate +20+10 "$numbers" \
$dst
grep 'Parse Time' WS/toto.err
grep 'Trace Time' WS/toto.err
done
./encode.sh frames/voxel/ voxel-2.mp4