2024-12-16 03:53:42 +11:00
|
|
|
/*
|
|
|
|
* nouveau projet Thu Dec 5 11:37:05 AM UTC 2024
|
|
|
|
*/
|
|
|
|
|
2025-01-05 10:18:06 +11:00
|
|
|
/* voir aussi le fichier 'globals.inc' */
|
2024-12-29 14:56:10 +11:00
|
|
|
|
2025-02-10 14:16:53 +11:00
|
|
|
/* ======================================================= */
|
|
|
|
/*
|
|
|
|
* nouveau debut fevrier 2025 - we love raytracing
|
2025-02-15 05:47:29 +11:00
|
|
|
*
|
|
|
|
* une cabane pour faire riche.
|
2025-02-10 14:16:53 +11:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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 }
|
|
|
|
}
|
|
|
|
|
2025-02-04 11:06:18 +11:00
|
|
|
/* ======================================================= */
|
|
|
|
|
|
|
|
#declare GroudBase_coin = object
|
|
|
|
{
|
|
|
|
merge {
|
2025-02-10 05:05:10 +11:00
|
|
|
cylinder { 0, y*0.4, 0.09 }
|
|
|
|
sphere { 0, 0.09 scale <1, 0.23, 1> translate y*0.4 }
|
2025-02-04 11:06:18 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-02-10 14:16:53 +11:00
|
|
|
#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
|
2025-02-04 11:06:18 +11:00
|
|
|
{
|
|
|
|
#local Sz = SzBase - 0.02;
|
|
|
|
union {
|
2025-02-10 14:16:53 +11:00
|
|
|
box { <-SzBase, 0, -SzBase>, <SzBase, H_base, SzBase> }
|
2025-02-04 11:06:18 +11:00
|
|
|
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> }
|
|
|
|
}
|
2025-02-10 05:05:10 +11:00
|
|
|
texture { T_Stone6 rotate 9 scale 0.32 }
|
2025-02-04 11:06:18 +11:00
|
|
|
#undef Sz
|
|
|
|
}
|
|
|
|
|
2025-02-10 14:16:53 +11:00
|
|
|
/* ------------------------------------------------------------ */
|
|
|
|
|
|
|
|
#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 }
|
|
|
|
}
|
|
|
|
}
|
2025-02-04 11:06:18 +11:00
|
|
|
/* ======================================================= */
|
2024-12-29 14:56:10 +11:00
|
|
|
|
2025-01-16 23:01:46 +11:00
|
|
|
#macro GyroPhare_mat ()
|
2025-02-04 11:06:18 +11:00
|
|
|
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)
|
|
|
|
}
|
2025-01-16 23:01:46 +11:00
|
|
|
#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
|
2025-01-23 05:46:55 +11:00
|
|
|
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
|
2025-01-16 23:01:46 +11:00
|
|
|
}
|
2025-01-23 05:46:55 +11:00
|
|
|
light_source { y*0.10
|
|
|
|
rgb <0.8, 0.9, 0.999999999>
|
|
|
|
fade_distance 3.96
|
|
|
|
fade_power 1.55
|
|
|
|
}
|
2025-01-16 23:01:46 +11:00
|
|
|
}
|
|
|
|
#end // macro
|
|
|
|
|
|
|
|
#macro GyroPhare ()
|
|
|
|
union {
|
|
|
|
object { GyroPhare_mat () }
|
|
|
|
object { GyroPhare_lampe ()
|
|
|
|
// rotate y*rand(Rng1)*clock
|
|
|
|
translate y*(H_gyro+0.02) }
|
|
|
|
}
|
|
|
|
#end // macro
|
|
|
|
|
2025-01-23 05:46:55 +11:00
|
|
|
#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
|
2025-02-04 11:06:18 +11:00
|
|
|
/* ======================================================= */
|
2025-01-16 23:01:46 +11:00
|
|
|
|
2024-12-29 14:56:10 +11:00
|
|
|
#declare Rhxba = 0.30;
|
|
|
|
#declare R2hxba = Rhxba * 0.48;
|
|
|
|
|
|
|
|
#declare HexaBalls = object
|
|
|
|
{
|
|
|
|
merge {
|
|
|
|
sphere { 0, Rhxba }
|
|
|
|
#local E = Rhxba * 1.260;
|
|
|
|
sphere { 0, R2hxba translate <-E, 0, 0> }
|
|
|
|
sphere { 0, R2hxba translate < E, 0, 0> }
|
|
|
|
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> }
|
2025-01-23 05:46:55 +11:00
|
|
|
#undef E
|
2024-12-29 14:56:10 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-01-02 02:20:23 +11:00
|
|
|
#declare Les_Bibelots = object
|
|
|
|
{
|
|
|
|
union {
|
|
|
|
object { HexaBalls
|
|
|
|
texture { Lightning1 scale 0.33 }
|
|
|
|
rotate <clock/3, clock/6, clock/9>
|
2025-01-23 05:46:55 +11:00
|
|
|
translate <5, -1.1+1.01*Cos_010(NormClock), 7>
|
2025-01-02 02:20:23 +11:00
|
|
|
}
|
2024-12-29 14:56:10 +11:00
|
|
|
|
2025-01-02 02:20:23 +11:00
|
|
|
object { HexaBalls
|
|
|
|
texture { Lightning2 scale 0.56 }
|
2025-01-05 10:18:06 +11:00
|
|
|
// rotate <-clock, clock*0.33333, clock>
|
2025-01-23 05:46:55 +11:00
|
|
|
translate <7, -1+0.92*Cos_010(NormClock), -6>
|
2025-01-02 02:20:23 +11:00
|
|
|
}
|
2024-12-29 14:56:10 +11:00
|
|
|
}
|
2025-01-02 02:20:23 +11:00
|
|
|
}
|
2024-12-29 14:56:10 +11:00
|
|
|
/* ------------------------------------------------------------ */
|
2025-01-02 11:27:23 +11:00
|
|
|
#declare RHBlo = 0.24;
|
2025-01-05 10:18:06 +11:00
|
|
|
#declare RHBlo2 = RHBlo * 0.666;
|
2025-01-02 11:27:23 +11:00
|
|
|
|
|
|
|
#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 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-02-04 11:06:18 +11:00
|
|
|
/* ======================================================= */
|
2024-12-29 14:56:10 +11:00
|
|
|
|
2025-01-02 02:20:23 +11:00
|
|
|
#declare Le_Sol = object
|
|
|
|
{
|
2024-12-16 03:53:42 +11:00
|
|
|
height_field {
|
|
|
|
png "datas/hf.png"
|
|
|
|
smooth
|
|
|
|
translate <-.5, 0, -.5>
|
2025-01-12 12:33:39 +11:00
|
|
|
scale <SzSol, 0.98, SzSol>
|
2024-12-20 05:26:49 +11:00
|
|
|
texture {
|
2025-01-12 12:33:39 +11:00
|
|
|
pigment {
|
|
|
|
// color DarkGreen
|
2025-02-04 11:06:18 +11:00
|
|
|
image_map { png "datas/noise.png" }
|
|
|
|
rotate x*90
|
|
|
|
translate <-.5, 0, -.5>
|
2025-01-12 12:33:39 +11:00
|
|
|
scale <SzSol, 0.98, SzSol>
|
|
|
|
}
|
|
|
|
// normal { bumps 0.035 scale 0.186 }
|
2025-02-04 11:06:18 +11:00
|
|
|
finish { phong 0.105 }
|
2024-12-20 05:26:49 +11:00
|
|
|
}
|
2024-12-16 03:53:42 +11:00
|
|
|
}
|
2025-01-02 02:20:23 +11:00
|
|
|
}
|
2024-12-16 03:53:42 +11:00
|
|
|
|
2025-01-23 05:46:55 +11:00
|
|
|
#declare Underground = object
|
|
|
|
{
|
2025-02-04 11:06:18 +11:00
|
|
|
plane { y, -1.75 }
|
2025-01-23 05:46:55 +11:00
|
|
|
texture {
|
|
|
|
pigment { color Gray20 }
|
2025-02-04 11:06:18 +11:00
|
|
|
normal { bumps 0.38 scale 4 }
|
|
|
|
finish { phong 0.125 }
|
2025-01-23 05:46:55 +11:00
|
|
|
}
|
|
|
|
}
|
2025-02-04 11:06:18 +11:00
|
|
|
|
|
|
|
/* ======================================================= */
|
2025-01-23 05:46:55 +11:00
|
|
|
|
2024-12-30 05:02:14 +11:00
|
|
|
#declare Repere = object
|
|
|
|
{
|
|
|
|
union {
|
2025-01-27 13:33:53 +11:00
|
|
|
#local R = 0.008;
|
|
|
|
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 } }
|
2024-12-30 05:02:14 +11:00
|
|
|
}
|
|
|
|
}
|
2025-01-27 13:33:53 +11:00
|
|
|
|
2025-02-04 11:06:18 +11:00
|
|
|
/* ======================================================= */
|
|
|
|
|
2025-01-27 13:33:53 +11:00
|
|
|
#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 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-02-04 11:06:18 +11:00
|
|
|
/* ======================================================= */
|
2024-12-16 03:53:42 +11:00
|
|
|
|
2025-01-02 02:20:23 +11:00
|
|
|
#declare Les_Lumieres = object
|
|
|
|
{
|
|
|
|
union {
|
|
|
|
#if (1)
|
|
|
|
light_source {
|
2025-02-04 11:06:18 +11:00
|
|
|
<2.3, 5.50, 2.8> color Gray70
|
2025-01-02 02:20:23 +11:00
|
|
|
spotlight
|
|
|
|
radius 14 falloff 10 tightness 10
|
|
|
|
point_at <0, 0.95, 0.22222222>
|
|
|
|
}
|
|
|
|
#end
|
|
|
|
|
|
|
|
#if (1)
|
|
|
|
light_source {
|
2025-02-04 11:06:18 +11:00
|
|
|
<-5, 5.60, 18>
|
2025-01-02 02:20:23 +11:00
|
|
|
#if ( (clock > 290) & (clock<344) )
|
|
|
|
#local Couleur = rgb <0.20, 0.20, 0.90>;
|
|
|
|
#else
|
|
|
|
#local Couleur = rgb <0.80, 0.80, 0.70>;
|
|
|
|
#end
|
|
|
|
color Couleur
|
|
|
|
spotlight
|
2025-01-12 12:33:39 +11:00
|
|
|
radius 12 falloff 10 tightness 5
|
|
|
|
point_at <0, 0.95, -0.22>
|
2025-01-02 02:20:23 +11:00
|
|
|
}
|
|
|
|
#end
|
2025-01-23 05:46:55 +11:00
|
|
|
|
|
|
|
light_source {
|
|
|
|
<-4, 54, -7>
|
2025-02-04 11:06:18 +11:00
|
|
|
colour Gray50
|
2025-01-23 05:46:55 +11:00
|
|
|
parallel
|
|
|
|
point_at 0
|
|
|
|
}
|
|
|
|
|
2024-12-16 03:53:42 +11:00
|
|
|
}
|
2025-01-02 02:20:23 +11:00
|
|
|
}
|
2024-12-20 05:26:49 +11:00
|
|
|
|
2025-02-04 11:06:18 +11:00
|
|
|
/* ======================================================= */
|
|
|
|
|
2025-01-02 02:20:23 +11:00
|
|
|
// #declare Le_Ciel = object
|
|
|
|
// {
|
|
|
|
sky_sphere {
|
|
|
|
pigment {
|
|
|
|
gradient y
|
|
|
|
color_map {
|
2025-01-02 11:27:23 +11:00
|
|
|
[ 0.2 color Gray10 ]
|
2025-01-05 10:18:06 +11:00
|
|
|
[ 0.4 color Gray60 ]
|
|
|
|
[ 0.7 color Black ]
|
|
|
|
[ 0.8 color White ]
|
|
|
|
[ 1.0 color Gray10 ]
|
2025-01-02 02:20:23 +11:00
|
|
|
}
|
2025-02-15 05:47:29 +11:00
|
|
|
turbulence 3.14159 + 0.74 * Cos_010(NormClock)
|
2025-01-05 10:18:06 +11:00
|
|
|
scale 1.804
|
|
|
|
// translate -1
|
2025-01-02 02:20:23 +11:00
|
|
|
}
|
2025-01-12 12:33:39 +11:00
|
|
|
#local Kem = 0.09;
|
2025-01-05 10:18:06 +11:00
|
|
|
emission rgb <Kem, Kem, Kem>
|
2024-12-20 05:26:49 +11:00
|
|
|
}
|
2025-01-02 02:20:23 +11:00
|
|
|
// }
|
2024-12-16 03:53:42 +11:00
|
|
|
|
2025-02-04 11:06:18 +11:00
|
|
|
/* ======================================================= */
|
2025-01-02 02:20:23 +11:00
|
|
|
/*
|
|
|
|
* Et on rassemble tous les éléments...
|
|
|
|
*/
|
|
|
|
#declare Le_Decor = object
|
|
|
|
{
|
|
|
|
union {
|
|
|
|
object { Le_Sol }
|
2025-01-23 05:46:55 +11:00
|
|
|
object { Underground }
|
2025-02-10 14:16:53 +11:00
|
|
|
object { La_GroundBase }
|
2025-02-15 05:47:29 +11:00
|
|
|
// object { Les_Bibelots }
|
2025-01-02 02:20:23 +11:00
|
|
|
object { Les_Lumieres }
|
2025-01-23 05:46:55 +11:00
|
|
|
object { Les_GyroPhares () }
|
2024-12-18 00:36:26 +11:00
|
|
|
}
|
2025-01-02 02:20:23 +11:00
|
|
|
}
|
|
|
|
/* ------------------------------------------------------------ */
|