commit video full-v0

This commit is contained in:
Tonton Th 2024-12-31 12:51:12 +01:00
parent 929d59b169
commit d16132de30
13 changed files with 166 additions and 45 deletions

2
.gitignore vendored
View File

@ -1,6 +1,8 @@
frames/*
datas/*.xcf
datas/*.ttf
datas/*.jpg
WS/*timing
WS/log*

View File

@ -15,7 +15,7 @@ essai.png: essai.pov Makefile $(POVDEP)
povray $(POVOPT) -W1280 -H1024 -i$< -o$@
passage.png: passage.pov Makefile $(POVDEP)
povray $(POVOPT) -W1280 -H1024 -K300 -i$< -o$@
povray $(POVOPT) -W1280 -H1024 -K340 -i$< -o$@
CK=175
scene.png: scene.pov Makefile $(POVDEP)

View File

@ -6,6 +6,17 @@
#declare Rng2 = seed(now*24*60*60);
#declare foo = rand(Rng2);
#declare NormClock = clock / 360.0;
/* ------------------------------------------------------------ */
#macro Cos_01( X )
(0.5-0.5*cos( 3.141592654 * X))
#end
#macro Cos_010( X )
(0.5-0.5*cos( 2 * 3.141592654 * X))
#end
/* ------------------------------------------------------------ */
#declare Rhxba = 0.30;
@ -73,7 +84,7 @@ light_source {
#if ( (clock>166) & (clock<213) )
light_source {
<2, 0.30, -2> color Orange
<2, 0.30, -2> color Yellow
spotlight
radius 12
falloff 20

View File

@ -34,7 +34,7 @@ union {
cylinder {-z, z, 0.10 }
}
// clignotement de la lumiere \o/
#local kR = 0.083;
#local kR = 0.073;
#local xR = (rand(Rng2)-0.5000) * kR;
#local yR = (rand(Rng2)-0.5000) * kR;
#local zR = (rand(Rng2)-0.5000) * kR;

View File

@ -1,5 +1,8 @@
#!/bin/bash
set -e ; set -u
source ./fonctions.sh
ff_encodage essai wip.mp4
ff_encodage passage wip.mp4

View File

@ -1,5 +1,5 @@
/*
* H E X A C O N E
* H E X A C O N E - E S S A I
* nouveau projet Thu Dec 5 11:37:05 AM UTC 2024
*/
@ -10,6 +10,7 @@
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
#include "stones.inc"
#declare NormClock = clock / 360.0;
#include "contexte.inc"
@ -17,21 +18,56 @@
// =======================================================
#declare RHBlo = 0.25;
#declare RHBlo2 = RHBlo * 0.55;
#declare HexaBlob = object
{
blob {
// threshold 0.01 + NormClock
threshold 0.01
sphere { <0, 0, 0>, RHBlo, 1 }
#local E = RHBlo * 1.210;
#local W = 0.1;
sphere { <-E, 0, 0>, RHBlo2, W }
sphere { < E, 0, 0>, RHBlo2, W }
sphere { < 0, -E, 0>, RHBlo2, W }
sphere { < 0, E, 0>, RHBlo2, W }
sphere { < 0, 0, -E>, RHBlo2, W }
sphere { < 0, 0, E>, RHBlo2, W }
}
}
// =======================================================
object {
HexaBlob
#local SC = 1.111 + abs(sin(NormClock * 4 * 3.14159));
texture { T_Stone26
scale SC
translate 2*y*NormClock
}
translate < 0, 1, 0>
}
object { Repere }
#if (0)
object { HexaBalls
#local SC = 0.10 + abs(sin(NormClock * 3.14159));
#local SC = 0.10 + abs(sin(NormClock * 4 * 3.14159));
texture { Lightning2 scale SC }
translate <0, 1, 0> }
translate <-0.80, 1, 0> }
#end
// =======================================================
light_source { <-6, 7, -5>, rgb <0.81, 0.65, NormClock> }
light_source { <-6, 7, 5>, rgb <0.31, NormClock, 0.80> }
light_source { < 6, 7, 4>, rgb <1-NormClock, 0.28, 0.80> }
light_source { <-8, 7, -9>, rgb <0.81, 0.65, NormClock> }
// light_source { <-11, 7, 9>, rgb <0.31, NormClock, 0.80> }
light_source { < 11, 7, 4>, rgb <1-NormClock, 0.28, 0.80> }
camera {
location <-1.20, 1.81, 1.59>
look_at <0, 1.0, 0>
angle 90
location <-0.7+NormClock, 1.81, 2.59>
look_at <0.0, 1.0, 0>
angle 64
}

View File

@ -1,10 +1,25 @@
set -eu
# --------------------------------------------------------------
ralentisseur ()
{
temps=$1
echo "#+++ ralentisseur $temps +++#" | tee -a WS/log
sleep $temps
}
# --------------------------------------------------------------
ff_encodage()
{
SRCDIR="$1"
FILMNAME="$2"
echo "Encoding $SRCDIR to $FILMNAME" | tee -a WS/log
ffmpeg -nostdin \
-y -r 30 -f image2 -i frames/${SRCDIR}/%05d.png \
-metadata artist='--[ tTh ]--' \
@ -14,13 +29,15 @@ ffmpeg -nostdin \
-tune film \
$FILMNAME
echo "$SRCDIR -> $FILMNAME" | tee -a WS/log
wc -c $FILMNAME | tee -a WS/log
# wc -c $FILMNAME | tee -a WS/log
}
# --------------------------------------------------------------
mp_encodage()
{
#
# NOT WORKING !
#
mencoder 'mf://frames/*.png' \
-mf \
fps=24 \
@ -29,3 +46,5 @@ mencoder 'mf://frames/*.png' \
-o output.avi
}
# --------------------------------------------------------------
# --------------------------------------------------------------

View File

@ -2,5 +2,5 @@
global_settings {
assumed_gamma 1.0
ambient_light rgb <0.18, 0.14, 0.17>
max_trace_level 10
max_trace_level 15
}

View File

@ -1,28 +1,61 @@
#!/bin/bash
set -e ; set -u
source ./fonctions.sh
IDX=0
SPOOL="frames/Spool"
# -------------------------------------------------------
addfile ()
{
src="$1"
dstname=$(printf "%s/%05d.png" $SPOOL $IDX)
# echo "$src -> $dstname"
# ln --force --symbolic $src $dstname
cp -f $src $dstname
IDX=$(( IDX + 1 ))
}
# -------------------------------------------------------
linkfarm ()
{
SRC="frames/$1"
echo "linkfarm $SRC" | tee -a WS/log
local NBRE=36
for foo in $(seq 0 $NBRE)
do
addfile "$SRC/00000.png"
done
for src in "$SRC"/*
do
dstname=$(printf "%s/%05d.png" $SPOOL $IDX)
echo "$src -> $dstname"
# ln --force --symbolic $src $dstname
cp -f $src $dstname
IDX=$(( IDX + 1 ))
addfile $src
done
for foo in $(seq 0 $NBRE)
do
addfile "$SRC/00359.png"
done
sync
}
# -------------------------------------------------------
faire_le_titre ()
{
echo "faire le titre"
local NBRE=80
for foo in $(seq 0 $NBRE)
do
addfile "datas/cover.png"
done
}
# -------------------------------------------------------
faire_le_titre
ralentisseur 10
linkfarm topview
linkfarm passage

View File

@ -12,6 +12,9 @@ case $TYPE in
"gif89a") DIMS="-W640 -H480" ;;
"mp4") DIMS="-W1024 -H768" ;;
esac
echo "Running $0 $TYPE $SEQNAME" >> WS/log
POVOPT="+q9 +a0.02 -d ${DIMS} -WT6"
echo $POVOPT ; echo ; sleep 2
@ -19,6 +22,7 @@ TMPIMG=/dev/shm/${SEQNAME}-tmp.png
for frame in $(seq 0 $((NBFRAMES-1)))
do
figlet -k $frame
img=$(printf "frames/%s/%05d.png" $SEQNAME $frame)
debut=$(date +%s)
@ -27,14 +31,15 @@ do
err=$?
if [ $err != 0 ] ; then
echo "$SEQNAME fail $frame" >> WS/log
sleep 4
sleep 6
continue
fi
set -e
txt=$(printf "#%03d" $frame)
txt=$(printf "%s %03d" ${SEQNAME} $frame)
echo $frame $img $txt
convert ${TMPIMG} \
-pointsize 16 \
-font Courier \
-pointsize 14 \
-fill orange \
-gravity south \
-annotate +0+0 "$txt" \

0
orbite.pov Normal file
View File

View File

@ -11,21 +11,29 @@
#include "metals.inc"
#include "textures.inc"
#declare NormClock = clock / 360.0;
#include "contexte.inc"
#include "elements.inc"
// ---------------------------------------
#declare PosX = 0;
#declare PosY = 1.20 + (NormClock*0.20);
#declare PosZ = (NormClock-0.5) * 8.44;
#declare PosX = 0.333;
#declare PosY = 1.20 + (NormClock*0.22);
#declare PosZ = (NormClock-0.5) * 29.22;
object { HexaCone translate <PosX, PosY, PosZ> }
#if ( clock > 130 )
light_source {
<2, 0.30, -2> color Red
spotlight
radius .044
falloff 2
tightness 10
point_at <PosX, PosY, PosZ>
}
#end
camera {
location <-1.50, 1.23, 9>
look_at <PosX, 1.50, PosZ>
location <-1.56, 1.03, 9.76>
look_at <PosX, PosY, PosZ>
// focal_point <0, 1, 0>
// aperture 0.046
// blur_samples 30

View File

@ -1,5 +1,5 @@
/*
* H E X A C O N E
* H E X A C O N E - T O P V I E W
* nouveau projet Thu Dec 5 11:37:05 AM UTC 2024
*/
@ -11,24 +11,28 @@
#include "metals.inc"
#include "textures.inc"
#declare NormClock = clock / 360.0;
#include "contexte.inc"
#include "elements.inc"
light_source { <-16, 17, -24>, rgb <0.51, 0.65, 0.40> }
#declare TrX = 2 * sqrt(NormClock);
#declare TrY = 1.11 + (5 * sqrt(NormClock));
#declare TrZ = 3 * sqrt(NormClock);
#declare TrX = 1.4 * sqrt(NormClock);
#declare TrY = 0.90 + (3.5 * sqrt(NormClock));
#declare TrZ = 9.9 * sqrt(NormClock);
#declare TrH = <TrX, TrY, TrZ>;
#declare RrY = 57 * sqrt(NormClock);
object { HexaCone translate TrH }
object { HexaCone rotate y*RrY translate TrH }
// object { Repere scale 2 }
#declare CamY = 19 - (5*NormClock);
#declare LatY = -4 + NormClock;
camera {
location <-3.60, 19.60-NormClock, 21.09>
look_at <0, -4, 0>
focal_point <0, 1, 0>
aperture 0.046
blur_samples 30
angle 50
location <-3.60, CamY, 21.09>
look_at <0, LatY, 0>
// focal_point <0, 1, 0>
// aperture 0.046
// blur_samples 30
angle 47
}