2022-04-03 15:44:24 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo
|
|
|
|
source "./common.sh"
|
|
|
|
|
|
|
|
make voxelize
|
|
|
|
if [ $? -ne 0 ] ; then
|
|
|
|
echo
|
|
|
|
echo "Make error " $?
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2022-04-05 14:46:51 +11:00
|
|
|
TMPNG="/dev/shm/voxvidz.png"
|
2022-04-17 21:44:43 +11:00
|
|
|
NBIMG=1600
|
2022-04-16 02:13:07 +11:00
|
|
|
|
|
|
|
printf "#declare NbImg = %d;\n" $NBIMG | tee WS/nbimg.inc
|
2022-04-10 10:41:42 +11:00
|
|
|
|
2022-04-05 14:46:51 +11:00
|
|
|
for idx in $( seq 0 $(( NBIMG - 1)) )
|
2022-04-03 15:44:24 +11:00
|
|
|
do
|
|
|
|
|
|
|
|
dst=$(printf "frames/voxel/%05d.png" $idx)
|
2022-04-16 02:13:07 +11:00
|
|
|
delta=$( echo "scale=6 ; ${idx}/${NBIMG}" | bc -l)
|
2022-04-10 10:41:42 +11:00
|
|
|
echo "Renderbox work on "$dst" delta = " $delta
|
2022-04-05 14:46:51 +11:00
|
|
|
|
2022-04-16 02:13:07 +11:00
|
|
|
./voxelize "WS/voxels.inc" $delta
|
|
|
|
grep 'NbrVox' "WS/voxels.inc"
|
|
|
|
|
2022-04-03 15:44:24 +11:00
|
|
|
povray -ishowvoxels.pov -K$idx ${POVOPT} \
|
2022-04-05 14:46:51 +11:00
|
|
|
-O${TMPNG} 2> WS/toto.err
|
2022-04-03 15:44:24 +11:00
|
|
|
if [ $? -ne 0 ] ; then
|
2022-04-10 10:41:42 +11:00
|
|
|
echo "ERROR ERROR ERROR ERROR ERROR ERROR"
|
2022-04-05 14:46:51 +11:00
|
|
|
tail -15 WS/toto.err
|
|
|
|
sleep 20
|
|
|
|
#exit 1
|
2022-04-03 15:44:24 +11:00
|
|
|
fi
|
2022-04-05 14:46:51 +11:00
|
|
|
|
2022-04-16 02:13:07 +11:00
|
|
|
titre='Voxelisation - tTh - Avril 2022'
|
|
|
|
numbers=$(tail -1 WS/camvox.log | \
|
2022-04-17 21:44:43 +11:00
|
|
|
awk '{printf " K=%5d : %6.3f %6.3f %6.3f", \
|
2022-04-16 02:13:07 +11:00
|
|
|
$1, $2, $3, $4}')
|
|
|
|
|
|
|
|
echo "numbers " "$numbers" " txtidx " $txtidx
|
2022-04-05 14:46:51 +11:00
|
|
|
|
|
|
|
convert ${TMPNG} \
|
2022-04-16 02:13:07 +11:00
|
|
|
-fill Orange \
|
|
|
|
-kerning 2 \
|
|
|
|
-pointsize 32 \
|
2022-04-05 14:46:51 +11:00
|
|
|
-font AvantGarde-Book \
|
|
|
|
-gravity South-West \
|
2022-04-16 02:13:07 +11:00
|
|
|
-annotate +20+45 "$titre" \
|
|
|
|
-pointsize 24 \
|
2022-04-05 14:46:51 +11:00
|
|
|
-annotate +20+10 "$numbers" \
|
2022-04-16 02:13:07 +11:00
|
|
|
\
|
2022-04-05 14:46:51 +11:00
|
|
|
$dst
|
|
|
|
|
2022-04-03 15:44:24 +11:00
|
|
|
grep 'Parse Time' WS/toto.err
|
|
|
|
grep 'Trace Time' WS/toto.err
|
|
|
|
|
2022-10-29 06:53:57 +11:00
|
|
|
echo
|
2022-04-16 02:13:07 +11:00
|
|
|
|
2022-04-03 15:44:24 +11:00
|
|
|
done
|
|
|
|
|
2022-04-16 02:13:07 +11:00
|
|
|
./encode.sh frames/voxel/ voxel-3.mp4
|