From 2a983b8335a4391f8f1cde526f9230f6d5c02fbc Mon Sep 17 00:00:00 2001 From: le vieux Date: Tue, 23 Mar 2021 09:55:20 +0100 Subject: [PATCH] pfeueue... --- README.md | 5 +++++ incs/benne.inc | 5 +---- incs/citerne.inc | 10 +++++----- incs/constantes.inc | 19 ++++++++++++++++++- incs/ridelles.inc | 2 +- incs/train.inc | 6 +++--- monde.inc | 12 +++++++++++- tools/mk_anim.sh | 8 ++++---- train.pov | 7 ++++--- 9 files changed, 52 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 9f93802..5223e03 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,8 @@ Un très très vieux projet POVray qui revient dans le triste monde de 2021. http://la.buvette.org/POV/jouets/ https://git.tetalab.org/tTh/PovJouets + +## TODO + +- bien revoir la hiérarchie des includes +- définir un jeu de textures cohérent diff --git a/incs/benne.inc b/incs/benne.inc index d08095d..0b7704f 100644 --- a/incs/benne.inc +++ b/incs/benne.inc @@ -18,10 +18,7 @@ union { cylinder { <0, 4.5, 9.75>, <0, 4.5, 12>, .8 } } translate y*6 -texture { - pigment { color Green } - finish { phong 0.5 } - } +texture { Vert_Train_1 } } //----------------------------------------------------------------- diff --git a/incs/citerne.inc b/incs/citerne.inc index f794005..8e17f23 100644 --- a/incs/citerne.inc +++ b/incs/citerne.inc @@ -3,6 +3,9 @@ * Une citerne de St Chinian */ //----------------------------------------------------------------- + +#include "incs/constantes.inc" + #declare Diam_Citerne = 4.6; #declare Epp_Cerclage = 0.233; #declare Diam_Cerclage = (Diam_Citerne+Epp_Cerclage); @@ -40,11 +43,8 @@ union { } } scale <1, 0.882, 1> -translate y*10.7 -texture { - pigment { color rgb <0.96, 0.25, 0.2> } - finish { phong 0.6 } - } +translate y*10.7 // ??? +texture { Rouge_Train_1 } } //----------------------------------------------------------------- diff --git a/incs/constantes.inc b/incs/constantes.inc index 58e7005..e3d1c43 100644 --- a/incs/constantes.inc +++ b/incs/constantes.inc @@ -5,7 +5,7 @@ #ifdef(Jouets_Constantes) // do nothing -#error "constantes deja definies\n" +#warning "*** constantes deja definies\n" #else #declare Jouets_Constantes=version; @@ -23,6 +23,23 @@ /* ------------------------------------------------------------ */ /* il nous faut quelques textures 'standards' */ +#declare Vert_Train_1 = texture +{ +// pour la benne + pigment { color Green } + normal { bumps 0.33 scale 0.42 } + finish { phong 0.5 } + +} + +#declare Rouge_Train_1 = texture +{ +// pour la citerne + pigment { color rgb <0.96, 0.25, 0.2> } + normal { bumps 0.33 scale 0.42 } + finish { phong 0.5 } +} + /* ------------------------------------------------------------ */ #end // #ifdef diff --git a/incs/ridelles.inc b/incs/ridelles.inc index bf7ef58..d5ed2b1 100644 --- a/incs/ridelles.inc +++ b/incs/ridelles.inc @@ -19,7 +19,7 @@ texture { pigment { color MediumWood } finish { roughness .83 } } -translate y*5.75 +translate y*5.85 } /* avant et arriere */ diff --git a/incs/train.inc b/incs/train.inc index 65a9a26..cc037be 100644 --- a/incs/train.inc +++ b/incs/train.inc @@ -14,7 +14,7 @@ #declare Texture_Chassis = texture { pigment { color Yellow } - finish { phong 0.6 ambient 0.4 } + finish { phong 0.5 ambient 0.4 } } //----------------------------------------------------------------- @@ -105,7 +105,7 @@ union { #declare Chassis_Court = object { union { - box { <-3.5, 0, -12>, <3.5, 2, 12> } + box { <-3.5, 0.2, -12>, <3.5, 1.8, 12> } box { <-3.6, 0.7, -12.5>, <3.6, 1.3, 12.5> } } translate y*4.1 @@ -115,7 +115,7 @@ texture { Texture_Chassis } #declare Chassis_Long = object { union { - box { <-3.5, 0, -15.5>, <3.5, 2, 15.5> } + box { <-3.5, 0.2, -15.5>, <3.5, 1.8, 15.5> } box { <-4, 0.5, -16>, <4, 1.5, 16> } } translate y*4.1 diff --git a/monde.inc b/monde.inc index 0fe90d9..3f8c4c9 100644 --- a/monde.inc +++ b/monde.inc @@ -4,8 +4,10 @@ */ /*------------------------------------------------------------------*/ +#declare R_monde = 290; /* le rayon du monde */ + cylinder { - <0, -0.2, 0>, 0, 400 + <0, -0.2, 0>, 0, R_monde pigment { image_map { png "picz/plancher.png" interpolate 2 @@ -16,6 +18,14 @@ cylinder { } } +#for (foo, 0, 360, 1) + #local R2 = R_monde - 1.5; + #local xpos = R2 * sin(radians(foo)); + #local zpos = R2 * cos(radians(foo)); + cylinder { <0, 0, 0>, <0, 5, 0>, 0.40 pigment { color Blue } + translate } +#end + sky_sphere { pigment { diff --git a/tools/mk_anim.sh b/tools/mk_anim.sh index daa91a3..a7b8235 100755 --- a/tools/mk_anim.sh +++ b/tools/mk_anim.sh @@ -3,8 +3,8 @@ SPOOL="$HOME/TMP" mkdir "$SPOOL" -NBRE=279 -POVOPT=" -w768 -h576 +q9 +a -d " +NBRE=599 +POVOPT=" -w1280 -h960 +q9 -a -d " SRCFILE="train.pov" for idx in $(seq 0 $NBRE) @@ -13,7 +13,7 @@ do outfile=$(printf "%s/%04d.png" $SPOOL $idx) horloge=$(echo "$idx / $NBRE" | bc -l) - printf "%-20s %.3f\n" $outfile $horloge + printf "%-20s %.4f\n" $outfile $horloge povray -i${SRCFILE} ${POVOPT} -K${horloge} -o${outfile} @@ -21,6 +21,6 @@ done ffmpeg -nostdin \ -loglevel error \ - -y -r 30 -f image2 -i $SPOOL/%04d.png \ + -y -r 25 -f image2 -i $SPOOL/%04d.png \ -c:v libx264 -pix_fmt yuv420p \ $SPOOL/foo.mp4 diff --git a/train.pov b/train.pov index 1a16aa1..687f518 100644 --- a/train.pov +++ b/train.pov @@ -45,12 +45,13 @@ union object { Locomotive_Vapeur translate <0, 2, -52> } object { Wagon_Citerne translate <0, 2, -21> } object { Wagon_Benne translate <0, 2, 6> } - object { Wagon_Ridelles translate <0, 2, 41> } + object { Wagon_Ridelles translate <0, 2, 35> } #local XS = 60; object { Trois_rails translate x*XS } - #local DZ = 60 - (clock*33); + #local K = Cos_01(clock); + #local DZ = 50 - (K * 85); object { Train_Electric translate } } @@ -68,7 +69,7 @@ camera { location <260, 38, 25> right image_width/image_height*x - look_at <0, 3, 10> + look_at <0, 3, -10> angle ANGLE_CAM }