Fortraneries/Fraktalism/mkvoxvidz.sh

55 lines
1.1 KiB
Bash
Raw Normal View History

2022-04-03 06:44:24 +02:00
#!/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
2022-04-05 05:46:51 +02:00
TMPNG="/dev/shm/voxvidz.png"
NBIMG=360
for idx in $( seq 0 $(( NBIMG - 1)) )
2022-04-03 06:44:24 +02:00
do
dst=$(printf "frames/voxel/%05d.png" $idx)
2022-04-05 05:46:51 +02:00
delta=$( echo "scale=3 ; ${idx}/360" | bc -l)
echo "Renderbox work on " $dst " tu" $delta
2022-04-03 06:44:24 +02:00
povray -ishowvoxels.pov -K$idx ${POVOPT} \
2022-04-05 05:46:51 +02:00
-O${TMPNG} 2> WS/toto.err
2022-04-03 06:44:24 +02:00
if [ $? -ne 0 ] ; then
echo "ERROR ERROR ERROR ERROR"
2022-04-05 05:46:51 +02:00
tail -15 WS/toto.err
sleep 20
#exit 1
2022-04-03 06:44:24 +02:00
fi
2022-04-05 05:46:51 +02:00
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 Cyan \
-kerning 1 \
-pointsize 16 \
-font AvantGarde-Book \
-gravity South-West \
-annotate +20+32 "$titre" \
-annotate +20+10 "$numbers" \
$dst
2022-04-03 06:44:24 +02:00
grep 'Parse Time' WS/toto.err
grep 'Trace Time' WS/toto.err
done
2022-04-05 05:46:51 +02:00
./encode.sh frames/voxel/ voxel-1.mp4