Compare commits

..

38 Commits

Author SHA1 Message Date
Tonton Th
cd65855f2c release of the official "full-v2" video 2025-02-14 19:47:29 +01:00
Tonton Th
14a03b78eb add the "hexawood" to the family 2025-02-12 14:09:11 +01:00
Tonton Th
39adef1e90 unused parts update 2025-02-11 18:04:48 +01:00
Tonton Th
a95ff22653 better API 2025-02-10 23:57:32 +01:00
Tonton Th
e7ccaf8089 misc changes 2025-02-10 16:11:51 +01:00
Tonton Th
14c6cbb818 more explanations 2025-02-10 16:10:46 +01:00
Tonton Th
f9755cf0a2 La cabane part en prod' un lundi matin 2025-02-10 04:16:53 +01:00
Tonton Th
7e7f9fbe40 little tweak 2025-02-10 04:15:42 +01:00
Tonton Th
6407a3ed3a cosmetic 2025-02-10 04:15:02 +01:00
Tonton Th
701b6187a5 plot the last timing value 2025-02-10 04:14:38 +01:00
Tonton Th
6f637ca79a more doc, really ? 2025-02-10 02:25:39 +01:00
Tonton Th
97950f2483 cosmetic and addition of "survol" seq 2025-02-10 02:15:10 +01:00
Tonton Th
15eedb2034 change a default value 2025-02-09 22:15:04 +01:00
Tonton Th
f487f35ccd centering 2025-02-09 20:44:55 +01:00
Tonton Th
66f54c283d fine tuning 2025-02-09 20:44:05 +01:00
Tonton Th
955af75151 tune the cam, bro 2025-02-09 19:06:00 +01:00
Tonton Th
e3b13c0631 tuning the groundbase 2025-02-09 19:05:10 +01:00
Tonton Th
72d99f9400 add a "start from here" option 2025-02-09 19:03:26 +01:00
Tonton Th
f737579090 etude pour une cabane 2025-02-09 19:02:32 +01:00
Tonton Th
46bb5ee3da cosmetic: change display of frame number 2025-02-07 23:16:17 +01:00
Tonton Th
8b5dbb7a99 reduction of image height for better aspect ratio 2025-02-07 23:14:59 +01:00
Tonton Th
3117141b52 commit du soir, espoir 2025-02-04 01:06:18 +01:00
Tonton Th
aed3fa6cf7 add done files 2025-02-03 22:49:23 +01:00
Tonton Th
3ab1079214 view from the sky 2025-02-01 17:31:21 +01:00
Tonton Th
32f4b403e2 ready for prime time ? 2025-01-27 16:38:55 +01:00
Tonton Th
949d5b328d preparing the next release, stay tuned 2025-01-27 03:34:51 +01:00
Tonton Th
1944fdd337 add a new sequence : cutoff 2025-01-27 03:33:53 +01:00
Tonton Th
b344d0b762 a lot a better things 2025-01-26 19:32:18 +01:00
Tonton Th
9962480356 remove useless message 2025-01-25 07:05:30 +01:00
Tonton Th
8e02e9e466 very fine tuning 2025-01-23 21:49:59 +01:00
Tonton Th
45ac640ba6 affiner le contexte... 2025-01-22 19:46:55 +01:00
Tonton Th
27891b70dc cosmetic 2025-01-22 19:30:23 +01:00
Tonton Th
05f40fae75 add intertitres 2025-01-22 19:29:20 +01:00
Tonton Th
070679ec5b add a new sequence 2025-01-19 21:45:56 +01:00
Tonton Th
1eac9d4cfc increase video size 2025-01-16 15:07:06 +01:00
Tonton Th
cf899967ce moving the gyrophare to the right file 2025-01-16 13:01:46 +01:00
Tonton Th
af4f9fc282 oups... 2025-01-16 01:11:56 +01:00
Tonton Th
b9299568f4 using anti-aliasing 2025-01-16 01:04:49 +01:00
30 changed files with 934 additions and 272 deletions

1
.gitignore vendored
View File

@@ -9,6 +9,7 @@ datas/*.webp
WS/*timing WS/*timing
WS/log* WS/log*
WS/*.done
*.png *.png
*.gif *.gif

View File

@@ -1,20 +1,25 @@
DIMS = -W1600 -H1200 DIMS = -W1600 -H1200
POVOPT = +q9 +a0.02 -d # POVOPT = +q9 +a0.02 -d
POVOPT = +q9 +A -d
POVDEP = contexte.inc elements.inc hexabenz.inc \ POVDEP = contexte.inc elements.inc hexabenz.inc \
globals.inc datas/hf.png globals.inc hexawood.inc datas/hf.png
CK=180 CK=230
PNG: essai.png scene.png topview.png passage.png \ PNG: essai.png scene.png topview.png passage.png \
orbite.png hexabenz.png escadrille.png \ orbite.png hexabenz.png escadrille.png \
hexacone.png hexacone.png remote.png survol.png cutoff.png
echo "PNG ck=$(CK) done" >> WS/log
topview.png: topview.pov Makefile $(POVDEP) topview.png: topview.pov Makefile $(POVDEP)
povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@ povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@
cutoff.png: cutoff.pov Makefile $(POVDEP)
povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@
essai.png: essai.pov Makefile $(POVDEP) essai.png: essai.pov Makefile $(POVDEP)
povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@ povray $(POVOPT) $(DIMS) -K$(CK) -i$< -o$@
@@ -36,4 +41,8 @@ scene.png: scene.pov Makefile $(POVDEP)
escadrille.png: escadrille.pov Makefile $(POVDEP) escadrille.png: escadrille.pov Makefile $(POVDEP)
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@ povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@
remote.png: remote.pov Makefile $(POVDEP)
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@
survol.png: survol.pov Makefile $(POVDEP)
povray $(POVOPT) $(DIMS) +K$(CK) -i$< -o$@

View File

@@ -9,6 +9,8 @@ et vous pouvez
suivre son évolution par l'intermédiaire de suivre son évolution par l'intermédiaire de
[Mastodon](https://mastodon.tetaneutral.net/@tth) [Mastodon](https://mastodon.tetaneutral.net/@tth)
avec le croisimot `#hexacone`. avec le croisimot `#hexacone`.
Quelques images sont disponibles sur mon serveur
de [cuisine](http://maison.tth.netlib.re/p/hexacone.html).
## Prérequis ## Prérequis

View File

@@ -1,3 +1,3 @@
# Workspace
For intermediates files, and timing log.
workspace

View File

@@ -4,8 +4,185 @@
/* voir aussi le fichier 'globals.inc' */ /* voir aussi le fichier 'globals.inc' */
/* ======================================================= */
/*
* nouveau debut fevrier 2025 - we love raytracing
*
* une cabane pour faire riche.
*/
/*
* deux textures
*/
#declare T_Beton_1 = texture
{
pigment { color <0.9, 0.8, 0.8> }
normal { dents 0.75 scale 0.3 }
finish { roughness 1.00 }
}
#declare T_Beton_2 = texture
{
pigment { color <0.7, 0.6, 0.6> }
normal { dents 0.25 scale 2 }
finish { roughness 1.00 }
}
/*
* une seule forme de cabane pour le moment
*/
#declare Base_cabane_forme = object
{
difference {
#local Hc = 0.90;
box { <-0.90, 0, 0>, <0.90, Hc, 0.80> }
box { <-0.89, 0.01, -1> <0.89, Hc-0.01, 0.79> }
#local Hc = Hc * 0.75;
cylinder { <-1, Hc, -0.23>, <1, Hc, 0.23>, 0.09 }
#undef Hc
}
}
/*
* comparaison des deux textures par le rendu
* de la meme forme de cabane.
*/
#declare Cabane_Base_1 = object
{
object { Base_cabane_forme }
texture { T_Beton_1 }
}
#declare Cabane_Base_2 = object
{
object { Base_cabane_forme }
texture { T_Beton_2 }
}
/* ======================================================= */
#declare GroudBase_coin = object
{
merge {
cylinder { 0, y*0.4, 0.09 }
sphere { 0, 0.09 scale <1, 0.23, 1> translate y*0.4 }
}
}
#declare GroundBase_a = object
{
union {
#local Dx = 1.5;
#local Dz = 1.0;
box { <-Dx, 0, -Dz>, <Dx, H_base, Dz> }
#local Ha = y*(H_base*2);
cylinder { 0, Ha, 0.08 translate <Dx, 0, -Dz> }
#local Hb = Ha * 1.17;
cone { Ha, 0.08, Hb, 0.05 translate < Dx, 0, -Dz> }
cone { Ha, 0.08, Hb, 0.05 translate <-Dx, 0, -Dz> }
#undef Ha
#undef Hb
#undef Dx
#undef Dz
}
texture { T_Stone2 rotate 49 scale 0.22 }
}
#declare GroundBase_b = object
{
#local Sz = SzBase - 0.02;
union {
box { <-SzBase, 0, -SzBase>, <SzBase, H_base, SzBase> }
object { GroudBase_coin translate <-Sz, 0, -Sz> }
object { GroudBase_coin translate < Sz, 0, -Sz> }
object { GroudBase_coin translate <-Sz, 0, Sz> }
object { GroudBase_coin translate < Sz, 0, Sz> }
}
texture { T_Stone6 rotate 9 scale 0.32 }
#undef Sz
}
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
#declare La_GroundBase = object
{
union {
object { GroundBase_b }
/*
* ici, mettre la cabane
*/
#local Dz = <0, 0, -7>;
object { GroundBase_a translate Dz }
object { Cabane_Base_2 rotate y*180 translate Dz }
}
}
/* ======================================================= */
#macro GyroPhare_mat ()
union {
cylinder { 0, y*H_gyro, R_gyro }
intersection {
sphere { 0, R_gyro scale <1, 1.414, 1> }
box { <-1, 0, -1>, <1, 1, 1> }
translate y*(H_gyro+H_gylampe+0.01)
}
#if (rand(Rng1) < 0.5)
texture { T_Stone25 scale 1+rand(Rng1) }
#else
texture { T_Stone6 }
#end
}
#end // macro
#macro GyroPhare_lampe ()
union {
difference {
cylinder { 0, y*0.20, R_gyro }
cylinder { y*0.01, y*0.19, R_gyro*0.97 }
#local WB = 0.015;
box { <-1, 0.03, -WB>, <1, 0.18, WB> }
box { <-WB, 0.03, -1>, <WB, 0.18, 1> }
#undef WB
pigment { color Gray90 }
#local Ro = 0.5-rand(Rng1);
#if (abs(Ro) < 0.01)
#local Ro = Ro * 10;
#end
rotate y*(0.5-rand(Rng1)) * clock
}
light_source { y*0.10
rgb <0.8, 0.9, 0.999999999>
fade_distance 3.96
fade_power 1.55
}
}
#end // macro
#macro GyroPhare ()
union {
object { GyroPhare_mat () }
object { GyroPhare_lampe ()
// rotate y*rand(Rng1)*clock
translate y*(H_gyro+0.02) }
}
#end // macro
#macro Les_GyroPhares ()
union {
#local E = SzSol * 0.485;
object { GyroPhare () translate <-E, 0, -E> }
object { GyroPhare () translate < E, 0, -E> }
object { GyroPhare () translate <-E, 0, E> }
object { GyroPhare () translate < E, 0, E> }
object { GyroPhare () translate <-E, 0, 0> }
object { GyroPhare () translate < E, 0, 0> }
object { GyroPhare () translate < 0, 0, -E> }
object { GyroPhare () translate < 0, 0, E> }
#undef E
}
#end
/* ======================================================= */
#declare Rhxba = 0.30; #declare Rhxba = 0.30;
#declare R2hxba = Rhxba * 0.48; #declare R2hxba = Rhxba * 0.48;
@@ -20,6 +197,7 @@ merge {
sphere { 0, R2hxba translate < 0, E, 0> } sphere { 0, R2hxba translate < 0, E, 0> }
sphere { 0, R2hxba translate < 0, 0, -E> } sphere { 0, R2hxba translate < 0, 0, -E> }
sphere { 0, R2hxba translate < 0, 0, E> } sphere { 0, R2hxba translate < 0, 0, E> }
#undef E
} }
} }
@@ -29,13 +207,13 @@ union {
object { HexaBalls object { HexaBalls
texture { Lightning1 scale 0.33 } texture { Lightning1 scale 0.33 }
rotate <clock/3, clock/6, clock/9> rotate <clock/3, clock/6, clock/9>
translate <5, -1.2+1.01*Cos_010(NormClock), 7> translate <5, -1.1+1.01*Cos_010(NormClock), 7>
} }
object { HexaBalls object { HexaBalls
texture { Lightning2 scale 0.56 } texture { Lightning2 scale 0.56 }
// rotate <-clock, clock*0.33333, clock> // rotate <-clock, clock*0.33333, clock>
translate <7, -1+0.89*Cos_010(NormClock), -6> translate <7, -1+0.92*Cos_010(NormClock), -6>
} }
} }
} }
@@ -60,7 +238,7 @@ blob {
} }
} }
// ======================================================= /* ======================================================= */
#declare Le_Sol = object #declare Le_Sol = object
{ {
@@ -72,48 +250,84 @@ height_field {
texture { texture {
pigment { pigment {
// color DarkGreen // color DarkGreen
image_map { png "datas/cmap.png" } image_map { png "datas/noise.png" }
rotate x*90
translate <-.5, 0, -.5> translate <-.5, 0, -.5>
scale <SzSol, 0.98, SzSol> scale <SzSol, 0.98, SzSol>
} }
// normal { bumps 0.035 scale 0.186 } // normal { bumps 0.035 scale 0.186 }
finish { phong 0.125 } finish { phong 0.105 }
} }
} }
} }
#declare Underground = object
{
plane { y, -1.75 }
texture {
pigment { color Gray20 }
normal { bumps 0.38 scale 4 }
finish { phong 0.125 }
}
}
/* ======================================================= */
#declare Repere = object #declare Repere = object
{ {
union { union {
cylinder { 0, <1, 0, 0>, 0.008 pigment { color Red } } #local R = 0.008;
cylinder { 0, <0, 0, 1>, 0.008 pigment { color Blue } } cylinder { 0, <1, 0, 0>, R pigment { color Red } }
cylinder { 0, <0, 1, 0>, R pigment { color Green } }
cylinder { 0, <0, 0, 1>, R pigment { color Blue } }
} }
} }
/* ======================================================= */
#declare OpenBox = object
{
union {
#local R = 0.010;
/* les verticales */
cylinder { <-1, -1, -1>, <-1, 1, -1>, R }
cylinder { < 1, -1, -1>, < 1, 1, -1>, R }
cylinder { <-1, -1, 1>, <-1, 1, 1>, R }
cylinder { < 1, -1, 1>, < 1, 1, 1>, R }
/* en bas */
cylinder { < 1, -1, 1>, <-1, -1, 1>, R }
cylinder { < 1, -1, -1>, <-1, -1, -1>, R }
cylinder { <-1, -1, 1>, <-1, -1, -1>, R }
cylinder { < 1, -1, 1>, < 1, -1, -1>, R }
/* en haut */
cylinder { < 1, 1, 1>, <-1, 1, 1>, R }
cylinder { < 1, 1, -1>, <-1, 1, -1>, R }
cylinder { <-1, 1, 1>, <-1, 1, -1>, R }
cylinder { < 1, 1, 1>, < 1, 1, -1>, R }
#undef R
texture { WIP_color }
}
}
/* ======================================================= */
#declare Les_Lumieres = object #declare Les_Lumieres = object
{ {
union { union {
#if (1) #if (1)
light_source { light_source {
<0.3, 3.50, 2.8> color Gray90 <2.3, 5.50, 2.8> color Gray70
spotlight spotlight
radius 14 falloff 10 tightness 10 radius 14 falloff 10 tightness 10
point_at <0, 0.95, 0.22222222> point_at <0, 0.95, 0.22222222>
} }
#end #end
#if ( (clock>166) & (clock<213) )
light_source {
<2, 10.30, -2> color Yellow
spotlight
radius 12 falloff 20 tightness 10
point_at <-0.08, 0.80, 0.17>
}
#end
#if (1) #if (1)
light_source { light_source {
<-5, 5.60, 8> <-5, 5.60, 18>
#if ( (clock > 290) & (clock<344) ) #if ( (clock > 290) & (clock<344) )
#local Couleur = rgb <0.20, 0.20, 0.90>; #local Couleur = rgb <0.20, 0.20, 0.90>;
#else #else
@@ -125,9 +339,19 @@ union {
point_at <0, 0.95, -0.22> point_at <0, 0.95, -0.22>
} }
#end #end
light_source {
<-4, 54, -7>
colour Gray50
parallel
point_at 0
}
} }
} }
/* ======================================================= */
// #declare Le_Ciel = object // #declare Le_Ciel = object
// { // {
sky_sphere { sky_sphere {
@@ -140,7 +364,7 @@ sky_sphere {
[ 0.8 color White ] [ 0.8 color White ]
[ 1.0 color Gray10 ] [ 1.0 color Gray10 ]
} }
turbulence 3.14159 + 0.91 * Cos_010(NormClock) turbulence 3.14159 + 0.74 * Cos_010(NormClock)
scale 1.804 scale 1.804
// translate -1 // translate -1
} }
@@ -149,7 +373,7 @@ sky_sphere {
} }
// } // }
/* ------------------------------------------------------------ */ /* ======================================================= */
/* /*
* Et on rassemble tous les éléments... * Et on rassemble tous les éléments...
*/ */
@@ -157,8 +381,11 @@ sky_sphere {
{ {
union { union {
object { Le_Sol } object { Le_Sol }
object { Les_Bibelots } object { Underground }
object { La_GroundBase }
// object { Les_Bibelots }
object { Les_Lumieres } object { Les_Lumieres }
object { Les_GyroPhares () }
} }
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */

42
cutoff.pov Normal file
View File

@@ -0,0 +1,42 @@
/*
* H E X A C O N E - C U T O F F
* nouveau projet du Thu Dec 5 11:37:05 AM UTC 2024
*/
#version 3.7;
#include "globals.inc"
#include "contexte.inc"
#include "elements.inc"
#include "hexabenz.inc"
// =======================================================
// #debug concat("------ cutoff clock = ", str(clock,5,0),"\n")
#declare Kbox = (2.03*NormClock);
/* this one is for debugging */
// object { OpenBox translate <0, 1.5, Kbox> }
difference {
object { HexaCone () }
box { -1, 1 translate z*Kbox }
translate y*1.5
}
// =======================================================
object { Le_Decor }
// object { Repere }
// =======================================================
#local CamX = -2.7 + (1.4*Cos_01(NormClock));
#local CamY = 2.58 + (0.034*sqrt(NormClock));
camera {
location <CamX, CamY, 5.40>
look_at <0, 1.6, 0>
angle 39 - 5*Cos_01(NormClock)
}

View File

@@ -1,4 +1,4 @@
# statics datas
Things like `height_fields` or `image_map` files...
statics datas, like height-fields files...

View File

@@ -168,11 +168,10 @@ merge {
box { <-DXail, -DYail, -DZail> , <DXail, DYail, 0> } box { <-DXail, -DYail, -DZail> , <DXail, DYail, 0> }
} }
#declare Le_rotor = object #macro Le_rotor ()
{
#local Rrot = 0.0034;
#local Lrot = 0.13;
union { union {
#local Rrot = 0.0034;
#local Lrot = 0.13;
sphere { -x*Lrot, Rrot } sphere { -x*Lrot, Rrot }
cylinder { <-Lrot, 0, 0>, <Lrot, 0, 0>, Rrot } cylinder { <-Lrot, 0, 0>, <Lrot, 0, 0>, Rrot }
sphere { x*Lrot, Rrot } sphere { x*Lrot, Rrot }
@@ -183,14 +182,17 @@ union {
rotate (foo*35)*x rotate (foo*35)*x
translate (foo*0.013)*x } translate (foo*0.013)*x }
#end #end
} texture {
// texture { T_Chrome_1C } #if ( rand(Rng1) < 0.333 )
texture { pigment { color Orange }
pigment { color Orange } #else
pigment { color Magenta }
#end
// finish { emission 0.7 } // finish { emission 0.7 }
finish { ambient 0.7 phong 0.5 brilliance 0.9 metallic 0.7 } finish { ambient 0.7 phong 0.5 brilliance 0.9 }
}
} }
} #end
/* ------------------------------------------------------ /* ------------------------------------------------------
* *
@@ -228,7 +230,7 @@ texture { T_Brass_1C }
{ {
union { union {
object { Tuyere } object { Tuyere }
object { Le_rotor rotate x*(clock*5.8) translate -0.06*x } object { Le_rotor () rotate x*(clock*5.8) translate -0.06*x }
} }
} }

View File

@@ -17,36 +17,36 @@
#for (idX, 0, 4) #for (idX, 0, 4)
#for (idZ, 0, 4) #for (idZ, 0, 4)
#local posX = (idX * 4.56) - 6.5; #local posX = (idX * 4.56) - 9.5 + (rand(Rng1)-0.5);
#local posY = 1.3 * (rand(Rng1)-0.5); #local posY = 2.9 + (1.2*(rand(Rng1)-0.5));
#local posZ = (idZ * 4.24) - 8.9; #local posZ = (idZ * 4.24) - 7.9;
#local Ry = (rand(Rng1) - 0.5) * 16; #local Rx = (rand(Rng1) - 0.5) * 8;
#local Ry = (rand(Rng1) - 0.5) * 14;
#local Rz = (rand(Rng1) - 0.5) * 11;
#if (rand(Rng1) < 0.515) #if (rand(Rng1) < 0.515)
object { HexaCone () object { HexaCone ()
rotate y*Ry translate <posX, posY, posZ> } rotate <0, Ry, Rz>
translate <posX, posY, posZ> }
#else #else
object { HexaBenz () object { HexaBenz ()
rotate y*Ry translate <posX, posY, posZ> } rotate <0, Ry, Rz>
translate <posX, posY, posZ> }
#end #end
#end #end
#end #end
// ======================================================= // =======================================================
#if (NormClock < 0.08) object { Le_Decor }
light_source { <-8, 7, -9>, rgb <0.81, 0.65, NormClock> }
#end
light_source { < 11, 7, 4>, rgb <NormClock, 0.48, 0.80> } // object { Repere scale 5 translate y }
// object { Repere scale 5 }
#local CamX = -8.7+(6.6*NormClock); #local CamX = -8.7+(6.6*NormClock);
#local CamY = -5+(11.9*Cos_01(NormClock)); #local CamY = 2.1+(13.37*Cos_01(NormClock));
#local CamZ = 15.06+(2.9*Cos_010(NormClock)); #local CamZ = 15.86+(12.9*Cos_01(NormClock));
camera { camera {
location <CamX, CamY, CamZ> location <CamX, CamY, CamZ>
look_at <0.0, 0.0, 0> look_at <0.0, 0.5, 0>
angle 53 - (3.57 * NormClock) angle 60 - (3.97 * NormClock)
} }

128
essai.pov
View File

@@ -8,102 +8,66 @@
#include "globals.inc" #include "globals.inc"
#include "contexte.inc" #include "contexte.inc"
#include "gadgets.inc"
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc" #include "hexabenz.inc"
#include "hexawood.inc"
// ======================================================= // =======================================================
#macro GyroPhare_mat ()
cylinder {
0, y*H_gyro, R_gyro
#if (rand(Rng1) < 0.5)
texture { T_Stone25 scale 1+rand(Rng1) }
#else
texture { T_Stone6 }
#end
}
#end // macro
#macro GyroPhare_lampe ()
union {
difference {
cylinder { 0, y*0.20, R_gyro }
cylinder { y*0.01, y*0.19, R_gyro*0.97 }
#local WB = 0.015;
box { <-1, 0.03, -WB>, <1, 0.18, WB> }
box { <-WB, 0.03, -1>, <WB, 0.18, 1> }
#undef WB
pigment { color White }
rotate y*(0.5-rand(Rng1))*clock
}
light_source { y*0.10 rgb <0.8, 0.9, 0.999999999> }
}
#end // macro
#macro GyroPhare ()
union {
object { GyroPhare_mat () }
object { GyroPhare_lampe ()
// rotate y*rand(Rng1)*clock
translate y*(H_gyro+0.02) }
}
#end // macro
// ======================================================= // =======================================================
/*
#macro Bubble () * nouvel éclairage du 10 février 2025
sphere { */
0, 0.06 #declare Quad_lampe = object
#if ( rand(Rng1) < 0.333 )
texture { Ruby_Glass }
#elseif ( rand(Rng1) < 0.666 )
texture { Orange_Glass }
#else
texture { Gold_Nugget }
#end
}
#end
#macro Un_Machin ()
union {
#for (Y, 1, 8, 1)
object { Bubble() translate y*Y*0.1 }
#end
}
#end
#declare Les_Machins = object
{ {
union { light_source {
#local Rk = 4.95; 0
#for (foo, 0, 360, 15) color Gray90
#local Xpos = Rk * sin(radians(foo)); fade_distance SzSol / 2
#local Zpos = Rk * cos(radians(foo)); fade_power 1.5
#if ( rand(Rng1) < 0.40 )
object { GyroPhare () translate <Xpos, 0, Zpos> }
#else
object { Un_Machin () translate <Xpos, 0.33, Zpos> }
#end
#end
#undef Rk
} }
} }
object { Les_Machins translate y*0.01} #declare QuadriLight = object
{
#local T = E_QuadriLight;
#local H = H_QuadriLight * 2;
// #local H = 5;
object { Le_Sol } union {
// object { Repere } object { Quad_lampe translate <-T, H, -T> }
object { Quad_lampe translate < T, H, -T> }
object { Quad_lampe translate <-T, H, T> }
object { Quad_lampe translate < T, H, T> }
}
}
// =======================================================
// object { OpenBox translate y*1.30 }
#local RX = -11 + (10*sin(NormClock*9.81) + 3*sin(NormClock*23));
#local RZ = 26 - (14*Cos_010(NormClock));
object { HexaWood rotate <RX, 37, 0> translate y*0.777 }
// object { QuadriPole translate <-3, 0, 2> }
object { QuadriLight }
// object { Le_Decor }
object { Le_Sol }
object { Underground }
// object { La_GroundBase }
object { Les_GyroPhares () }
// object { Repere translate y*2 }
// ======================================================= // =======================================================
// light_source { <-8, 7, -9>, rgb <0.81, 0.65, NormClock> } #local CamX = -2.7 + (3.8*Cos_010(NormClock));
// light_source { < 11, 7, 4>, rgb <1-NormClock, 0.28, 0.80> } #local CamY = 0.81 + (4*sqrt(NormClock));
#local CamZ = 6.9 - (0.8*Cos_010(NormClock));
#local CamX = -12.7 + (5.8*NormClock);
#local CamY = 8.81 + (14*sqrt(NormClock));
camera { camera {
location <CamX, CamY, 9.99> location <CamX, CamY, CamZ>
look_at <0, 0, 0> look_at <0, 0.92, 0>
angle 42 + 8*Cos_01(NormClock) angle 32 + 4*Cos_01(NormClock)
} }

View File

@@ -1,15 +1,19 @@
# Le silo des frames
Avant tout, il faut créer ces répertoires : Avant tout, il faut créer ces répertoires :
``` ```
frames/ frames/
├── essai +--- essai
├── orbite +--- orbite
├── passage +--- passage
├── scene +--- scene
├── scene +--- scene
├── orbite +--- orbite
├── escadrille +--- survol
└── topview +--- escadrille
+--- topview
+--- Spool
```

68
gadgets.inc Normal file
View File

@@ -0,0 +1,68 @@
/*
* H E X A C O N E - G A D G E T S
* nouveau projet du Thu Dec 5 11:37:05 AM UTC 2024
*/
#version 3.7;
#include "globals.inc"
// =======================================================
#declare QuadriPole = object
{
#local R = 0.02;
#local E = 0.25;
#local H = H_cone*2;
union {
cylinder { 0, y*H, R translate -x*E }
cylinder { 0, y*H, R translate x*E }
cylinder { 0, y*H, R translate -z*E }
cylinder { 0, y*H, R translate z*E }
}
texture { WIP_color }
#undef E
#undef H
#undef R
}
// =======================================================
/*
* first written macro for testing the generation of
* differente instances of the same shape.
*/
#macro Bubble ()
sphere {
0, 0.065
#local R = rand(Rng1);
#if ( R < 0.333 )
texture { Ruby_Glass }
#elseif ( R < 0.666 )
texture { Orange_Glass }
#else
texture { Gold_Nugget }
#end
#undef R
}
#end
#macro Un_Machin ()
union {
#for (Y, 1, 8, 1)
object { Bubble() translate y*Y*0.1 }
#end
}
#end
#declare Les_Machins = object
{
union {
#local Rk = 3.95 + NormClock;
#for (foo, 0, 359, 45)
#local Xpos = Rk * sin(radians(foo));
#local Zpos = Rk * cos(radians(foo));
object { Un_Machin () translate <Xpos, 0, Zpos> }
#end
#undef Rk
}
}
// =======================================================

View File

@@ -1,7 +1,7 @@
global_settings { global_settings {
assumed_gamma 1.0 assumed_gamma 1.0
ambient_light rgb <0.18, 0.18, 0.21> ambient_light rgb <0.47, 0.47, 0.47>
max_trace_level 15 max_trace_level 15
} }
@@ -9,11 +9,12 @@ global_settings {
#include "metals.inc" #include "metals.inc"
#include "textures.inc" #include "textures.inc"
#include "stones.inc" #include "stones.inc"
#include "woods.inc"
#declare Rng1 = seed(1337); #declare Rng1 = seed(1337);
#declare foo = rand(Rng1); #declare foo = rand(Rng1);
#declare Rng2 = seed(now*24*60*60); #declare Rng2 = seed(now*24*60*60);
#declare bar = rand(Rng2); #declare bar = rand(Rng2);
#declare NormClock = clock / 360.0; #declare NormClock = clock / 360.0;
@@ -22,13 +23,48 @@ global_settings {
* Some constants... * Some constants...
*/ */
#declare SzSol = 30; #declare SzSol = 34;
#declare SzBase = 2.85;
#declare H_base = 0.10;
#declare R_basecone = 0.117; #declare R_basecone = 0.117;
#declare H_cone = 0.97; #declare H_cone = 0.97;
#declare R_gyro = 0.10; #declare R_gyro = 0.09;
#declare H_gyro = 1.20; #declare H_gyro = 1.20;
#declare H_gylampe = 0.20;
#declare H_QuadriLight = 20;
#declare E_QuadriLight = SzSol * 0.85;
/* ------------------------------------------------------------ */
/*
* Some textures...
*/
#declare WIP_color = texture
{
pigment { color Cyan*0.60 }
finish { phong 0.01 }
}
#declare T_WIP_alert = texture
{
pigment { color Red }
finish { specular 0.90 }
}
#declare T_Planete_A = texture
{
pigment { color rgb <0.20, 0.30, 0.10> }
normal { dents 0.38 scale 0.5}
finish { phong 0.80 reflection 0.05 }
}
#declare T_Planete_B = texture
{
pigment { rgb <0.40, 0.50, 0.70> }
finish { metallic 0.50 reflection 0.55 }
}
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/* /*
@@ -41,4 +77,10 @@ global_settings {
(0.5-0.5*cos( 2 * 3.141592654 * X)) (0.5-0.5*cos( 2 * 3.141592654 * X))
#end #end
/* Interpolate */
#macro Interpolate(A, B, pos)
#local resultat = ( (B-A) * pos) +A;
resultat
#end
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */

View File

@@ -18,7 +18,7 @@ union {
// { // {
union { union {
#for (foo, 0, 360, 60) #for (foo, 0, 360, 60)
#local E = 0.38; #local E = 0.35;
#local Tx = E * sin(radians(foo)); #local Tx = E * sin(radians(foo));
#local Ty = E * cos(radians(foo)); #local Ty = E * cos(radians(foo));
object { object {
@@ -31,20 +31,27 @@ union {
rotate -z*foo rotate -z*foo
translate <Tx, Ty, 0> translate <Tx, Ty, 0>
} }
#end torus { E, E*0.05
scale <1, 2.4, 1> rotate x*90
#if ( rand(Rng1) < 0.5 )
texture { T_Planete_A }
#else
texture { T_Planete_B }
#end
}
#end // end for
} }
// } // }
#end #end
// ------------------------------------------------------ // ------------------------------------------------------
#local R_Tube = 0.20; #declare R_Tube = 0.20;
#local L_Tube = 0.54; #local L_Tube = 0.54;
#declare Benz_Tubules = object #macro Benz_Tubules ()
{
merge { merge {
#local E = R_Tube * 0.0910; #local E = R_Tube * 0.75;
#local R = 0.01; #local R = 0.01;
#for (foo, 0, 360, 20) #for (foo, 0, 360, 20)
#local Tx = E * sin(radians(foo)); #local Tx = E * sin(radians(foo));
@@ -55,13 +62,13 @@ merge {
sphere { -Dza, R*1.8 translate <Tx, Ty, 0> } sphere { -Dza, R*1.8 translate <Tx, Ty, 0> }
sphere { Dzb, R*1.8 translate <Tx, Ty, 0> } sphere { Dzb, R*1.8 translate <Tx, Ty, 0> }
#end #end
#if ( rand(Rng1) < 0.333)
texture { Orange_Glass }
#else
texture { Yellow_Glass }
#end
} }
#if ( rand(Rng1) < 0.333)
texture { Orange_Glass }
#else
texture { Yellow_Glass }
#end #end
}
#declare Benz_Fuseau = object #declare Benz_Fuseau = object
{ {
@@ -109,7 +116,7 @@ texture { Soft_Silver scale 6.0 }
// #declare Benz_Tube = object // #declare Benz_Tube = object
// { // {
union { union {
object { Benz_Tubules } object { Benz_Tubules () }
object { Benz_Fuseau_Flash translate z*0.40 } object { Benz_Fuseau_Flash translate z*0.40 }
object { Benz_Cylindre } object { Benz_Cylindre }
} }

View File

@@ -17,22 +17,24 @@
#local K = 1.48; #local K = 1.48;
object { HexaBenz () rotate y*90 translate -x*K } object { HexaBenz () rotate y*90 translate <-K, 1.85, 0> }
object { HexaBenz () translate x*K } object { HexaBenz () translate < K, 1.67, 0> }
// ======================================================= // =======================================================
light_source { <19, 7, 14>, rgb <0.77, 0.79, 0.80> } object { Le_Decor }
light_source { <19, 9, -14>, rgb <0.87, 0.79, 0.70> }
// light_source { <19, 7, 14>, rgb <0.77, 0.79, 0.80> }
// light_source { <19, 9, -14>, rgb <0.87, 0.79, 0.70> }
// object { Repere scale 2 } // object { Repere scale 2 }
camera { camera {
location <-1.9+(8*NormClock), 0.70, 7.59-NormClock> location <-1.9+(8*NormClock), 0.90, 7.59-NormClock>
look_at <0.37, 0.0, 0> look_at <0.37, 1.37, 0>
focal_point <0.37, 0.0, 0> // focal_point <0.37, 0.0, 0>
aperture 0.046 // aperture 0.046
blur_samples 30 // blur_samples 30
angle 60 - 28 * Cos_01(NormClock) angle 60 - 28 * Cos_01(NormClock)
} }

View File

@@ -6,27 +6,23 @@
#include "globals.inc" #include "globals.inc"
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
#include "stones.inc"
#include "contexte.inc" #include "contexte.inc"
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc" #include "hexabenz.inc"
#declare Cone_Repere = object #declare Cone_Repere = object
{ {
union { union {
object { HexaCone () } object { HexaCone () }
object { Repere translate <-0.4, -0.2, -0.5> } // object { Repere translate <-0.4, -0.2, -0.5> }
} }
} }
#local K = 1.48; #local K = 1.48;
object { Cone_Repere rotate y*90 translate -x*K } object { Cone_Repere rotate y*90 translate <-K, 1.7, 1> }
object { Cone_Repere translate x*K } object { Cone_Repere translate < K, 1.6, 1> }
object { Le_Decor }
// ======================================================= // =======================================================
@@ -37,10 +33,10 @@ light_source { <19, 9, -14>, rgb <0.87, 0.79, 0.70> }
camera { camera {
location <-1.9+(8*NormClock), 0.70, 7.59-NormClock> location <-1.9+(8*NormClock), 0.70, 7.59-NormClock>
look_at <0.37, 0.0, 0> look_at <0.37, 1.25, 0>
focal_point <0.37, 0.0, 0> // focal_point <0.37, 0.90, 0>
aperture 0.046 // aperture 0.046
blur_samples 30 // blur_samples 30
angle 55 - 28 * Cos_01(NormClock) angle 55 - 28 * Cos_01(NormClock)
} }

115
hexawood.inc Normal file
View File

@@ -0,0 +1,115 @@
/*
* H E X A W O O D
*/
// =======================================================
#declare Hc_ep = 0.42; // epaisseur chassis
#declare Hc_rad = 0.70; // rayon du chassis
#declare Hc_elo = 1.85; // elongation sur x
// -------------------------------------------------------
#macro HW_Un_Cone ()
merge {
#local RA = R_basecone * 0.92;
cone { 0, RA, y*0.91, 0.000001 }
sphere { 0, RA }
#undef RA
}
#end
#macro HW_Cones ()
union {
#for (foo, 0, 360, 60)
#local E = Hc_rad * 0.85;
#local Tx = Hc_elo * E * sin(radians(foo));
#local Tz = E * cos(radians(foo));
object {
HW_Un_Cone ()
#if ( rand(Rng1) < 0.5 )
texture { T_Wood32 rotate 37 scale 1.30 }
// texture { WIP_color }
#else
texture { T_Wood23 rotate x*87 scale 1.23 }
// texture { T_WIP_alert }
#end
// rotate -z*foo
translate <Tx, Hc_ep - 0.22, Tz>
}
#end // end for
}
#end
#macro HW_Chassis ()
difference {
#local El = Hc_elo;
merge {
torus { Hc_rad, 0.20 translate y*0.20 }
cylinder { 0, y*0.40, Hc_rad }
scale <El, 0.5, 1>
}
/* trou pour mettre une lampe */
cylinder { -1*y, 0.12*y, 0.08 }
torus { Hc_rad*0.30, 0.18 scale <1, 1.45, 1>
translate y*0.39 }
#for (foo, 0, 360, 60)
#local E = Hc_rad * 0.85;
#local Tx = El * E * sin(radians(foo));
#local Tz = E * cos(radians(foo));
sphere { 0, 0.17 translate <Tx, 0.20, Tz> }
#end
#for (foo, 0, 360, 60)
#local E = Hc_rad * 1.14;
#local Tx = El * E * sin(radians(foo+30));
#local Tz = E * cos(radians(foo+30));
cylinder { -y, y, 0.05 translate <Tx, 0, Tz> }
#end
translate y*0.10
texture { T_Wood17 scale 0.82 }
}
#end
#macro HW_une_patte ()
merge {
sphere { 0, 0.02 scale <1, 0.24, 1> translate 0.30*y }
cylinder { 0, 0.30*y, 0.02 }
sphere { 0, 0.07 scale <1, 0.29, 1> }
}
#if ( rand(Rng1) < 0.3 )
texture { Tinny_Brass }
#else
texture { New_Penny }
#end // if
#end // macro
#declare HW_les_pattes = object
{
union {
#local E = Hc_rad * 1.14;
#local El = Hc_elo;
#for (foo, 0, 360, 60)
#local Tx = El * E * sin(radians(foo+30));
#local Tz = E * cos(radians(foo+30));
object { HW_une_patte () translate <Tx, 0, Tz> }
#end
}
}
#declare HexaWood = object
{
union {
object { HW_Chassis () }
object { HW_les_pattes }
#if (mod(clock, 10) < 6)
light_source { 0.20*y rgb <0, 0.20, 0.95> }
#end
object { HW_Cones () translate y*0.15 }
}
}
// =======================================================

View File

@@ -11,13 +11,13 @@
#include "hexabenz.inc" #include "hexabenz.inc"
// ======================================================= // =======================================================
#declare R_planete = 1.42; #declare R_planete = 1.45;
#declare Croute = object #declare Croute = object
{ {
#local R1 = R_planete * 1.05; #local R1 = R_planete * 1.05;
#local R2 = R_planete * 1.03; #local R2 = R_planete * 1.03;
#local HC = R_planete * 0.11; #local HC = R_planete * 0.12;
#local BN = R_planete * 3; #local BN = R_planete * 3;
difference { difference {
@@ -28,8 +28,9 @@ difference {
box { <-BN, -BN, -HC>, <BN, BN, HC> } box { <-BN, -BN, -HC>, <BN, BN, HC> }
} }
texture { texture {
pigment { color rgb <0.20, 0.40, 0.10> } pigment { color rgb <0.20, 0.30, 0.10> }
finish { reflection 0.25 } normal { dents 0.38 scale 0.5}
finish { phong 0.80 reflection 0.05 }
} }
} }
@@ -37,8 +38,8 @@ texture {
{ {
sphere { 0, R_planete } sphere { 0, R_planete }
texture { texture {
pigment { rgb <0.70, 0.50, 0.70> } pigment { rgb <0.40, 0.50, 0.70> }
finish { reflection 0.25 } finish { metallic 0.50 reflection 0.55 }
} }
} }
@@ -52,28 +53,28 @@ union {
// ======================================================= // =======================================================
#local RO = 4.15; #local RO = 4.15;
#local CK = NormClock * 7.87; #local CK = NormClock * 13.37;
#declare PosX = RO * sin(CK); #declare PosX = RO * sin(CK);
#declare PosY = 0; #declare PosY = 0;
#declare PosZ = RO * cos(CK); #declare PosZ = RO * cos(CK);
object { HexaBenz () object { HexaBenz ()
rotate -y*CK*2.333 translate <PosX, PosY, PosZ> rotate -y*CK*42.3 translate <PosX, PosY, PosZ>
} }
#declare PosX = RO * sin(CK+2.12); #declare PosX = RO * sin(CK+2.12);
#declare PosY = 0; #declare PosY = 0;
#declare PosZ = RO * cos(CK+2.23); #declare PosZ = RO * cos(CK+2.23);
object { HexaCone () object { HexaCone ()
rotate y*CK*3.222 translate <PosX, PosY, PosZ> rotate y*CK*49.22 translate <PosX, PosY, PosZ>
} }
object { Planete rotate (-clock*0.21)*y } object { Planete rotate (-clock*0.21)*y }
light_source { <19, 6, 15>, rgb <0.77, 0.79, 0.80> } light_source { <19, 6, 15>, rgb <0.77, 0.79, 0.80> }
camera { camera {
location <3, 1.50, 7.59> location <3, -1.0+(2*NormClock), 10.59>
look_at <0.0, 0.0, 0> look_at <0.0, 0.0, 0>
focal_point <0.07, 0.0, 0> focal_point <0.0, 0.0, 0>
aperture 0.046 aperture 0.046
blur_samples 30 blur_samples 30
angle 62 angle 62

View File

@@ -19,8 +19,8 @@
object { Le_Decor } object { Le_Decor }
#declare PosX = 0.333; #declare PosX = 1.55;
#declare PosY = 1.10 + (NormClock*0.24); #declare PosY = 2.20 + (NormClock*0.28);
#declare PosZ = (NormClock-0.5) * 53.27; #declare PosZ = (NormClock-0.5) * 53.27;
object { HexaBenz () translate <PosX, PosY, PosZ> } object { HexaBenz () translate <PosX, PosY, PosZ> }

55
remote.pov Normal file
View File

@@ -0,0 +1,55 @@
/*
* H E X A C O N E - R E M O T E
* nouveau projet du Thu Dec 5 11:37:05 AM UTC 2024
*/
#version 3.7;
#include "globals.inc"
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
#include "contexte.inc"
#include "elements.inc"
#include "hexabenz.inc"
#include "hexawood.inc"
object { Le_Decor }
#declare A = <-SzSol, 16, -8>;
#declare B = <SzSol+4, 18, -11>;
#declare P = Interpolate(A, B, NormClock);
object { HexaCone () rotate y*((6*NormClock)+80) translate P }
// object { HexaCone () rotate z*9.1 translate <5, 3, -8> }
object { HexaBenz () rotate y*(clock/9) translate <-4, 2, -5> }
// ---------------------------------------------------------
#declare A = <-21, -0.9, SzSol+9>;
#declare B = < 33, -0.7, SzSol+7>;
#declare P = Interpolate(A, B, NormClock);
object { HexaWood translate P }
// cylinder { A, B, 0.10 pigment { color Cyan } }
// ---------------------------------------------------------
// object { Repere scale 3 translate y }
#local DistCam = 239;
#local CK = 0.70 * NormClock;
#declare CamX = DistCam * sin(CK);
#declare CamY = 28;
#declare CamZ = DistCam * cos(CK);
camera {
location <CamX, CamY, CamZ>
look_at <0, 0.3, 0>
// focal_point <2, 1, 12>
// aperture 0.046
// blur_samples 30
angle 10
}

View File

@@ -7,11 +7,6 @@
#include "globals.inc" #include "globals.inc"
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
#declare NormClock = clock / 360.0;
#include "contexte.inc" #include "contexte.inc"
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc" #include "hexabenz.inc"
@@ -19,24 +14,24 @@
object { Le_Decor } object { Le_Decor }
object { HexaCone () object { HexaCone ()
rotate < 3, 0, -4> rotate y*17 translate y*1.11 } rotate < 3, 0, -4> rotate y*17 translate y*1.41 }
object { HexaBenz () object { HexaBenz ()
rotate <6, 40, -7> translate <-8, 3, 7> } rotate <6, 40, -7> translate <-8, 3, 7> }
#declare CK = 96 + (clock * 1); #declare CK = 96 + (clock * 1);
#declare Dcam = 2.22; #declare Dcam = 2.42;
#declare CamX = Dcam * sin(radians(CK)); #declare CamX = Dcam * sin(radians(CK));
#declare CamZ = Dcam * 1.20 * cos(radians(CK)); #declare CamZ = Dcam * 1.20 * cos(radians(CK));
#declare CamZ = CamZ - 0.11; #declare CamZ = CamZ - 0.11; // why ?
#declare Lat = <0.03, 1.08, 0.17>; #declare Lat = <0.03, 1.18, 0.17>;
camera { camera {
location <CamX, 1.23, CamZ> location <CamX, 1.23, CamZ>
look_at Lat look_at Lat
focal_point Lat // focal_point Lat
aperture 0.046 // aperture 0.046
blur_samples 30 // blur_samples 30
angle 70 angle 70
} }

53
survol.pov Normal file
View File

@@ -0,0 +1,53 @@
/*
* H E X A C O N E - S U R V O L
* nouveau projet du Thu Dec 5 11:37:05 AM UTC 2024
*/
#version 3.7;
#include "globals.inc"
#include "contexte.inc"
#include "elements.inc"
#include "hexabenz.inc"
#include "hexawood.inc"
// =======================================================
/*
* on fait passer un hexatruc
*/
#declare A = <-SzSol, 16, 8>;
#declare B = < SzSol+4, 18, 7>;
#declare P = Interpolate(A, B, NormClock);
object { HexaCone () rotate y*((12*NormClock)+80) translate P }
/*
* nouveau 11 fevrier 2025
*/
#declare A = <-21, -0.9, (SzSol/2)+1>;
#declare B = < 24, 0.7, (SzSol/2)+9>;
#declare P = Interpolate(B, A, NormClock);
object { HexaWood translate P }
object { Le_Decor }
// object { Repere translate y*2 }
// =======================================================
#declare Debut = <-3, 47, 47> ;
#declare Fin = < 2, 43, 7> ;
#declare Pos = Cos_01(NormClock);
#declare PosCam = Interpolate(Debut, Fin, Pos);
#declare LatCam = PosCam + <-1, -20, -(NormClock+9)>;
camera {
location PosCam
look_at LatCam
angle 54
}

View File

@@ -2,10 +2,31 @@
Build system and utilities. Build system and utilities.
## Make a sequence
Un argument pour construire la séquence entière ou deux pour démarrer au milieu, c'est pratique quand le disjoncteur fait un *beu-beu*. Exemples :
```
$ tools/mkloop.sh survol
$ tools/mkloop.sh survol 133
```
## Linkfarming ## Linkfarming
C'est le directeur de la production, le grand
[script](./linkfarmer.sh)
d'assemblage des séquences avec générique et intertitres.
Hélas, il n'est pas encore configurable.
## Encoding ## Encoding
Le [script](./encode.sh) n'est qu'un wrapper autour de
la fonction `ff_encodage()` de la lib des tools :
[fonctions.sh](fonctions.sh). Par défaut, il encode
la séquence *essai*.
Le fichier de sortie s'appelle *wip.mp4* dans tous les cas.
## Plot the timing ## Plot the timing

9
tools/config.sh Normal file
View File

@@ -0,0 +1,9 @@
Img_Width=1024
Img_Height=720
TEXTCOL="orange"
STROKOL="darkblue"
NBFRAMES=360

View File

@@ -2,11 +2,12 @@
set -e ; set -u set -e ; set -u
# set default value's)
srcdir="essai"
if [ $# == 1 ] if [ $# == 1 ]
then then
srcdir=$1 srcdir=$1
else
srcdir="essai"
fi fi
source tools/fonctions.sh source tools/fonctions.sh

View File

@@ -4,8 +4,14 @@ set -eu
# -------------------------------------------------------------- # --------------------------------------------------------------
visual_sleep () visual_sleep ()
{ {
for foo in $(seq 0 $1) ; do msg="$1"
printf '*' nbre="$2"
# echo $msg ; echo $nbre
for foo in $(seq 0 $nbre) ; do
local bar=$(( $nbre - $foo ))
printf "======== %-20s %3d\r" "$msg" $bar
sleep 1 sleep 1
done done
echo echo
@@ -42,7 +48,6 @@ ffmpeg -nostdin \
-tune film \ -tune film \
$FILMNAME $FILMNAME
# wc -c $FILMNAME | tee -a WS/log
} }
# -------------------------------------------------------------- # --------------------------------------------------------------
# #

View File

@@ -2,13 +2,13 @@
set -e ; set -u set -e ; set -u
source tools/config.sh
IDX=0 IDX=0
SPOOL="frames/Spool" SPOOL="frames/Spool"
SEQNAME="none" SEQNAME="none"
TMP="WS/tmp.png" TMP="WS/tmp.png"
FONTE="Helvetica-Bold" FONTE="Helvetica-Bold"
TEXTCOL="yellow"
STROKOL="darkblue"
source tools/fonctions.sh source tools/fonctions.sh
@@ -32,13 +32,25 @@ linkfarm ()
{ {
SRC="frames/$1" SRC="frames/$1"
echo "linkfarm $SRC" | tee -a WS/log echo "linkfarm $SRC" | tee -a WS/log
local INTER="/dev/shm/tmp-intertitre.png"
tools/plot-timing.sh $1 tools/plot-timing.sh $1
local NBRE=60 local NBRE=75
convert "WS/negatif.png" \
-gravity north \
-font $FONTE \
-pointsize 96 \
-kerning 8 \
-fill $TEXTCOL \
-strokewidth 2 -stroke $STROKOL \
-annotate +0+530 "$1" \
${INTER}
for foo in $(seq 0 $NBRE) for foo in $(seq 0 $NBRE)
do do
copy_a_file "WS/negatif.png" copy_a_file $INTER
done done
for foo in $(seq 0 $NBRE) for foo in $(seq 0 $NBRE)
@@ -61,8 +73,8 @@ faire_le_titre ()
{ {
echo "faire le titre" echo "faire le titre"
local NBRE=180 local NBRE=320
local SRC="frames/passage/00059.png" local SRC="frames/passage/00099.png"
local GRAY="/dev/shm/tmp-titre.png" local GRAY="/dev/shm/tmp-titre.png"
convert -colorspace gray -colors 27 $SRC $GRAY convert -colorspace gray -colors 27 $SRC $GRAY
@@ -70,14 +82,14 @@ convert -colorspace gray -colors 27 $SRC $GRAY
for foo in $(seq 0 $NBRE) for foo in $(seq 0 $NBRE)
do do
Ypos=$(( -175 + foo )) Ypos=$(( -175 + foo ))
convert ${GRAY} \ convert ${GRAY} \
-gravity north \ -gravity north \
-font $FONTE \ -font $FONTE \
-pointsize 172 \ -pointsize 140 \
-kerning 6 \ -kerning 6 \
-fill $TEXTCOL \ -fill $TEXTCOL \
-strokewidth 3 -stroke $STROKOL \ -strokewidth 3 -stroke $STROKOL \
-annotate +0+${Ypos} "HexaCone" \ -annotate +0+${Ypos} "La famille\nHexaCone" \
${TMP} ${TMP}
# identify ${TMP} # identify ${TMP}
copy_a_file ${TMP} copy_a_file ${TMP}
@@ -92,10 +104,14 @@ local NBRE=180
datetime=$(LANG=fr date -u +"%Y/%m/%d") datetime=$(LANG=fr date -u +"%Y/%m/%d")
echo $datetime | tee -a WS/log echo $datetime | tee -a WS/log
local SRC="frames/escadrille/00299.png"
local GRAY="/dev/shm/tmp-titre.png"
convert -colorspace gray -colors 27 $SRC $GRAY
for foo in $(seq 0 $NBRE) for foo in $(seq 0 $NBRE)
do do
Ypos=$(( foo + 20 )) Ypos=$(( foo + 20 ))
convert "WS/negatif.png" \ convert ${GRAY} \
-gravity north \ -gravity north \
-font $FONTE \ -font $FONTE \
-pointsize 86 \ -pointsize 86 \
@@ -107,7 +123,7 @@ do
-pointsize 48 \ -pointsize 48 \
-strokewidth 1 \ -strokewidth 1 \
-gravity south \ -gravity south \
-annotate +0+170 "${datetime}" \ -annotate +0+110 "${datetime}" \
${TMP} ${TMP}
# identify ${TMP} # identify ${TMP}
copy_a_file ${TMP} copy_a_file ${TMP}
@@ -121,17 +137,18 @@ figlet "Link farmer"
rm -f frames/Spool/*.png rm -f frames/Spool/*.png
# tools/plot-timing.sh
faire_le_titre faire_le_titre
linkfarm hexabenz linkfarm hexabenz
linkfarm hexacone linkfarm hexacone
linkfarm escadrille linkfarm escadrille
linkfarm survol
linkfarm cutoff
linkfarm topview linkfarm topview
linkfarm passage linkfarm passage
linkfarm scene linkfarm scene
linkfarm orbite linkfarm orbite
linkfarm remote
linkfarm essai linkfarm essai
tools/plot-timing.sh tools/plot-timing.sh

View File

@@ -1,21 +1,27 @@
#!/bin/bash #!/bin/bash
set -e ; set -u set -e ; set -u
source tools/config.sh
source tools/fonctions.sh source tools/fonctions.sh
SEQNAME="$1" SEQNAME="$1"
NBFRAMES=360 START=0
if [ $# == 2 ]
then
START=$2
fi
echo "Running $0 $SEQNAME" >> WS/log echo "$0 $SEQNAME from $START" >> WS/log
DIMS="-W1024 -H768" DIMS="-W$Img_Width -H$Img_Height"
POVOPT="+q9 -a -d ${DIMS} -WT6" POVOPT="+q9 +A0.02 -d ${DIMS} -WT5"
echo $POVOPT ; echo ; sleep 2 echo $POVOPT ; echo ; sleep 2
TMPIMG=/dev/shm/${SEQNAME}-tmp.png TMPIMG=/dev/shm/${SEQNAME}-tmp.png
for frame in $(seq 0 $((NBFRAMES-1))) for frame in $(seq $START $((NBFRAMES-1)))
do do
img=$(printf "frames/%s/%05d.png" $SEQNAME $frame) img=$(printf "frames/%s/%05d.png" $SEQNAME $frame)
@@ -25,27 +31,30 @@ do
err=$? err=$?
if [ $err != 0 ] ; then if [ $err != 0 ] ; then
echo "$SEQNAME fail $frame" >> WS/log echo "$SEQNAME fail $frame" >> WS/log
mogrify -colorspace gray $img mogrify -colorspace gray -blur 5x5 $img
visual_sleep 12 visual_sleep "render fail" 12
continue continue
fi fi
set -e set -e
txt=$(printf "%s %03d" ${SEQNAME} $frame | tr '0' 'o') txt=$(printf "%s %03d" ${SEQNAME} $frame | tr '01' 'ol')
# echo $frame $img $txt # echo $frame $img $txt
convert ${TMPIMG} \ convert ${TMPIMG} \
-font Courier-Bold \ -font Courier-Bold \
-pointsize 18 \ -pointsize 15 \
-fill Gray80 \ -kerning 7 \
-gravity south \ -fill ${TEXTCOL} \
-annotate +0+5 "$txt" \ -gravity north \
-annotate +12+5 "$txt" \
${img} ${img}
fin=$(date +%s) fin=$(date +%s)
echo echo
echo ${SEQNAME} $frame $(( fin - debut )) | \ printf "%-12s %4d %4d\n" \
tee -a WS/mp4.timing ${SEQNAME} $frame $(( fin-debut )) | \
echo ; sleep 3 tee -a WS/mp4.timing
echo ; sleep 2
done done
date --utc > WS/$SEQNAME.done
echo echo
ff_encodage $SEQNAME wip-${SEQNAME}.mp4 ff_encodage $SEQNAME wip-${SEQNAME}.mp4

View File

@@ -2,6 +2,8 @@
set -ue set -ue
source tools/config.sh
TMPFILE="/dev/shm/plot-timing.tmp" TMPFILE="/dev/shm/plot-timing.tmp"
IMAGE="timing.png" IMAGE="timing.png"
@@ -12,41 +14,46 @@ else
sequence="escadrille" sequence="escadrille"
fi fi
echo "plot timing $sequence" | tee -a WS/log # echo "plot timing $sequence" >> WS/log
# wc WS/mp4.timing | tee -a WS/log
grep $sequence WS/mp4.timing | tail -3600 | awk ' \ grep $sequence WS/mp4.timing | tail -3600 | awk \
-v nbframes=$NBFRAMES \
' \
BEGIN { \ BEGIN { \
nbrames=360; \ # print "nb frames = ", nbframes; \
for (foo=0; foo<nbrames; foo++) { \ for (foo=0; foo<nbframes; foo++) { \
mini[foo] = 666; \ mini[foo] = 666; \
maxi[foo] = -42; \ maxi[foo] = -42; \
count[foo] = 0; \ count[foo] = 0; \
} \ } \
} \ } \
\
# for every line \
{ \ { \
accu[$2] += $3; \ accu[$2] += $3; \
count[$2]++; \ count[$2]++; \
if (mini[$2] > $3) mini[$2] = $3; \ if (mini[$2] > $3) mini[$2] = $3; \
if (maxi[$2] < $3) maxi[$2] = $3; \ if (maxi[$2] < $3) maxi[$2] = $3;
last[$2] = $3 \
} \ } \
\ \
END { \ END { \
for (foo=0; foo<nbrames; foo++) { \ for (foo=0; foo<nbframes; foo++) { \
if (count[foo] > 0) { \ if (count[foo] > 0) { \
mean = accu[foo] / count[foo]; \ mean = accu[foo] / count[foo]; \
printf "%4d %4f %4d %4d\n", foo, mean, \ printf "%4d %4f %4d %4d %4d\n",
mini[foo], maxi[foo]; \ foo, mean,
mini[foo], maxi[foo],
last[foo];
} \ } \
} \ } \
} \ } \
' > $TMPFILE ' > $TMPFILE
# cat -n $TMPFILE | tail # ; exit # head $TMPFILE ; exit
gnuplot << __EOC__ gnuplot << __EOC__
set term png size 1024,768 set term png size $Img_Width,$Img_Height
set output "timing.png" set output "timing.png"
set grid set grid
set xrange [:360] set xrange [:360]
@@ -54,10 +61,15 @@ gnuplot << __EOC__
set title "Séquence '${sequence}'" set title "Séquence '${sequence}'"
set xlabel "numéro de la trame" set xlabel "numéro de la trame"
set ylabel "temps en secondes" set ylabel "temps en secondes"
plot "/dev/shm/plot-timing.tmp" u 1:4 w l lc "#ff0000" t "maximum", \ plot "/dev/shm/plot-timing.tmp" u 1:4 w l \
"/dev/shm/plot-timing.tmp" u 1:3 w l lc "#0000ff" t "minimum", \ lc "#ff0000" t "maximum", \
"/dev/shm/plot-timing.tmp" u 1:2 w l lc "#000000" t "moyenne", "/dev/shm/plot-timing.tmp" u 1:3 w l \
lc "#0000ff" t "minimum", \
"/dev/shm/plot-timing.tmp" u 1:2 w l \
lc "#00aa00" t "moyenne", \
"/dev/shm/plot-timing.tmp" u 1:5 w l \
lc "#000000" t "last"
__EOC__ __EOC__
convert -negate -colorspace gray -level -33% $IMAGE WS/negatif.png convert -negate -level -33% $IMAGE WS/negatif.png

View File

@@ -7,18 +7,13 @@
#include "globals.inc" #include "globals.inc"
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
#include "contexte.inc" #include "contexte.inc"
#include "elements.inc" #include "elements.inc"
#include "hexabenz.inc" #include "hexabenz.inc"
#include "hexawood.inc"
object { Le_Decor } object { Le_Decor }
#declare TrX = 1.84 * sqrt(NormClock); #declare TrX = 1.84 * sqrt(NormClock);
#declare TrY = 0.90 + (3.5 * Cos_01(NormClock)); #declare TrY = 0.90 + (3.5 * Cos_01(NormClock));
#declare TrZ = 9.999 * sqrt(NormClock); #declare TrZ = 9.999 * sqrt(NormClock);
@@ -29,17 +24,25 @@ object { HexaCone () rotate y*RrY translate TrH }
object { HexaCone () rotate z*9.1 translate <5, 3, -8> } object { HexaCone () rotate z*9.1 translate <5, 3, -8> }
object { HexaBenz () translate <-4, 2, -6> } object { HexaBenz () translate <-4, 2, -6> }
light_source { <-16, 17, -24>, rgb <0.51, 0.65, 0.40> } /*
* nouveau 11 fevrier 2025
*/
#declare A = <-21, -0.9, (SzSol/2)+9>;
#declare B = < 33, -0.7, (SzSol/2)+7>;
#declare P = Interpolate(A, B, NormClock);
object { HexaWood translate P }
// light_source { <-16, 17, -24>, rgb <0.51, 0.65, 0.40> }
// object { Repere scale 2 } // object { Repere scale 2 }
#declare CamY = 19 - (4.5*NormClock); #declare CamY = 31 + (13.37*Cos_01(NormClock));
#declare LatY = -3 + NormClock; #declare LatY = -3 + NormClock;
camera { camera {
location <-3.60, CamY, 21.09> location <-3.60, CamY, 21.09>
look_at <0, LatY, 0> look_at <0, LatY, 0>
focal_point <2, 1, 12> // focal_point <2, 1, 12>
aperture 0.046 // aperture 0.046
blur_samples 30 // blur_samples 30
angle 45 + (5*NormClock) angle 45 + (6*NormClock)
} }