Compare commits

..

3 Commits

Author SHA1 Message Date
le vieux
e4df9e1299 shuffling textures 2021-03-23 10:09:22 +01:00
le vieux
2a983b8335 pfeueue... 2021-03-23 09:55:20 +01:00
le vieux
40f7b689db added two "cos" macro 2021-03-16 11:34:06 +01:00
10 changed files with 77 additions and 32 deletions

View File

@ -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/ http://la.buvette.org/POV/jouets/
https://git.tetalab.org/tTh/PovJouets https://git.tetalab.org/tTh/PovJouets
## TODO
- bien revoir la hiérarchie des includes
- définir un jeu de textures cohérent

View File

@ -16,6 +16,18 @@ global_settings { assumed_gamma 1.0 }
#declare ANGLE_CAM = 33; #declare ANGLE_CAM = 33;
//---------------------------------------
/*
* deux macros pour des variations plus 'touchy'
*/
#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
//---------------------------------------
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* /*
* outils de mise au point (smart tools) * outils de mise au point (smart tools)

View File

@ -18,10 +18,7 @@ union {
cylinder { <0, 4.5, 9.75>, <0, 4.5, 12>, .8 } cylinder { <0, 4.5, 9.75>, <0, 4.5, 12>, .8 }
} }
translate y*6 translate y*6
texture { texture { Vert_Train_1 }
pigment { color Green }
finish { phong 0.5 }
}
} }
//----------------------------------------------------------------- //-----------------------------------------------------------------

View File

@ -3,6 +3,9 @@
* Une citerne de St Chinian * Une citerne de St Chinian
*/ */
//----------------------------------------------------------------- //-----------------------------------------------------------------
#include "incs/constantes.inc"
#declare Diam_Citerne = 4.6; #declare Diam_Citerne = 4.6;
#declare Epp_Cerclage = 0.233; #declare Epp_Cerclage = 0.233;
#declare Diam_Cerclage = (Diam_Citerne+Epp_Cerclage); #declare Diam_Cerclage = (Diam_Citerne+Epp_Cerclage);
@ -40,11 +43,8 @@ union {
} }
} }
scale <1, 0.882, 1> scale <1, 0.882, 1>
translate y*10.7 translate y*10.7 // ???
texture { texture { Rouge_Train_1 }
pigment { color rgb <0.96, 0.25, 0.2> }
finish { phong 0.6 }
}
} }
//----------------------------------------------------------------- //-----------------------------------------------------------------

View File

@ -5,7 +5,7 @@
#ifdef(Jouets_Constantes) #ifdef(Jouets_Constantes)
// do nothing // do nothing
#error "constantes deja definies\n" #warning "*** constantes deja definies\n"
#else #else
#declare Jouets_Constantes=version; #declare Jouets_Constantes=version;
@ -23,6 +23,36 @@
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
/* il nous faut quelques textures 'standards' */ /* 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 }
}
#declare Texture_Roues = texture
{
pigment { color LightSteelBlue }
finish { phong 0.7 }
}
#declare Texture_Chassis = texture
{
pigment { color Yellow }
finish { phong 0.5 ambient 0.4 }
}
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
#end // #ifdef #end // #ifdef

View File

@ -19,7 +19,7 @@ texture {
pigment { color MediumWood } pigment { color MediumWood }
finish { roughness .83 } finish { roughness .83 }
} }
translate y*5.75 translate y*5.85
} }
/* avant et arriere */ /* avant et arriere */

View File

@ -5,17 +5,7 @@
*/ */
//----------------------------------------------------------------- //-----------------------------------------------------------------
#declare Texture_Roues = texture #include "incs/constantes.inc"
{
pigment { color LightSteelBlue }
finish { phong 0.7 }
}
#declare Texture_Chassis = texture
{
pigment { color Yellow }
finish { phong 0.6 ambient 0.4 }
}
//----------------------------------------------------------------- //-----------------------------------------------------------------
@ -105,7 +95,7 @@ union {
#declare Chassis_Court = object #declare Chassis_Court = object
{ {
union { 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> } box { <-3.6, 0.7, -12.5>, <3.6, 1.3, 12.5> }
} }
translate y*4.1 translate y*4.1
@ -115,7 +105,7 @@ texture { Texture_Chassis }
#declare Chassis_Long = object #declare Chassis_Long = object
{ {
union { 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> } box { <-4, 0.5, -16>, <4, 1.5, 16> }
} }
translate y*4.1 translate y*4.1

View File

@ -4,8 +4,10 @@
*/ */
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
#declare R_monde = 290; /* le rayon du monde */
cylinder { cylinder {
<0, -0.2, 0>, 0, 400 <0, -0.2, 0>, 0, R_monde
pigment { pigment {
image_map { image_map {
png "picz/plancher.png" interpolate 2 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 <xpos, 0, zpos> }
#end
sky_sphere { sky_sphere {
pigment pigment
{ {

View File

@ -3,8 +3,8 @@
SPOOL="$HOME/TMP" SPOOL="$HOME/TMP"
mkdir "$SPOOL" mkdir "$SPOOL"
NBRE=279 NBRE=599
POVOPT=" -w768 -h576 +q9 +a -d " POVOPT=" -w1280 -h960 +q9 -a -d "
SRCFILE="train.pov" SRCFILE="train.pov"
for idx in $(seq 0 $NBRE) for idx in $(seq 0 $NBRE)
@ -13,7 +13,7 @@ do
outfile=$(printf "%s/%04d.png" $SPOOL $idx) outfile=$(printf "%s/%04d.png" $SPOOL $idx)
horloge=$(echo "$idx / $NBRE" | bc -l) 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} povray -i${SRCFILE} ${POVOPT} -K${horloge} -o${outfile}
@ -21,6 +21,6 @@ done
ffmpeg -nostdin \ ffmpeg -nostdin \
-loglevel error \ -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 \ -c:v libx264 -pix_fmt yuv420p \
$SPOOL/foo.mp4 $SPOOL/foo.mp4

View File

@ -45,12 +45,13 @@ union
object { Locomotive_Vapeur translate <0, 2, -52> } object { Locomotive_Vapeur translate <0, 2, -52> }
object { Wagon_Citerne translate <0, 2, -21> } object { Wagon_Citerne translate <0, 2, -21> }
object { Wagon_Benne translate <0, 2, 6> } object { Wagon_Benne translate <0, 2, 6> }
object { Wagon_Ridelles translate <0, 2, 41> } object { Wagon_Ridelles translate <0, 2, 35> }
#local XS = 60; #local XS = 60;
object { Trois_rails translate x*XS } 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 <XS, 0, DZ> } object { Train_Electric translate <XS, 0, DZ> }
} }
@ -68,7 +69,7 @@ camera
{ {
location <260, 38, 25> location <260, 38, 25>
right image_width/image_height*x right image_width/image_height*x
look_at <0, 3, 10> look_at <0, 3, -10>
angle ANGLE_CAM angle ANGLE_CAM
} }