essai du trolldi sur le voxel

This commit is contained in:
tth
2022-04-15 17:13:07 +02:00
parent 85c12a1064
commit 285257cfac
5 changed files with 189 additions and 69 deletions

View File

@@ -10,20 +10,22 @@ if [ $? -ne 0 ] ; then
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
NBIMG=1500
printf "#declare NbImg = %d;\n" $NBIMG | tee WS/nbimg.inc
for idx in $( seq 0 $(( NBIMG - 1)) )
do
dst=$(printf "frames/voxel/%05d.png" $idx)
delta=$( echo "scale=6 ; ${idx}/360" | bc -l)
delta=$( echo "scale=6 ; ${idx}/${NBIMG}" | bc -l)
echo "Renderbox work on "$dst" delta = " $delta
./voxelize "WS/voxels.inc" $delta
grep 'NbrVox' "WS/voxels.inc"
povray -ishowvoxels.pov -K$idx ${POVOPT} \
-O${TMPNG} 2> WS/toto.err
if [ $? -ne 0 ] ; then
@@ -33,24 +35,30 @@ do
#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"
titre='Voxelisation - tTh - Avril 2022'
numbers=$(tail -1 WS/camvox.log | \
awk '{printf " K=%5d : %6.3f %6.3f %6.3f", \
$1, $2, $3, $4}')
echo "numbers " "$numbers" " txtidx " $txtidx
convert ${TMPNG} \
-fill Gray70 \
-kerning 1 \
-pointsize 24 \
-fill Orange \
-kerning 2 \
-pointsize 32 \
-font AvantGarde-Book \
-gravity South-West \
-annotate +20+32 "$titre" \
-annotate +20+45 "$titre" \
-pointsize 24 \
-annotate +20+10 "$numbers" \
\
$dst
grep 'Parse Time' WS/toto.err
grep 'Trace Time' WS/toto.err
echo ; sleep 15
done
./encode.sh frames/voxel/ voxel-2.mp4
./encode.sh frames/voxel/ voxel-3.mp4