|
|
On 10-5-2019 17:53, Norbert Kern wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> Last February, I presented some early renders of this scene. It has now
>> been "finished" (my scenes are never finished).
>>
>> --
>> Thomas
>
>
>
> The sky is really nice - how did you made it?
>
> Regards,
> Norbert
>
>
Three elements compose the sky (and atmosphere) from base to top:
1) a ground fog, slightly tilted to fill the distant valleys more);
2) An atmospheric haze;
3) a cloud layer.
All three are made up of non-interpenetrating media. The code looks like
this (watch out for unwanted line feeds!):
//--start code------------------------------------------
#if (Atmos)
// An atmosphere composed of a ground fog and an haze:
#local Murkiness = 1.5; //best somewhere between 0.5 and 2.9 approximately
#local GroundFog =
difference {
sphere {<0,0,0>, 6.0}
plane {<0,1,0>, 0.0}
scale <1, 0.14/6, 1>
//scale 5000
rotate -1.5*x
}
//----------------------------------------
#if (Debug)
#declare Min = min_extent(GroundFog);
#declare Max = max_extent(GroundFog);
#debug concat("\n min_extent GroundFog: <",vstr(3, Min, ", ", 0,3),">\n")
#debug concat(" max_extent GroundFog: <",vstr(3, Max, ", ", 0,3),">\n\n")
#end
//----------------------------------------
#local Haze =
difference {
sphere {<0,0,0>, 6.0}
plane {<0,1,0>, 0.0}
scale <1, 0.15/6, 1>
//scale 5000
rotate -1.5*x
translate 0.14002*y
}
//----------------------------------------
#if (Debug)
#declare Min = min_extent(Haze);
#declare Max = max_extent(Haze);
#debug concat("\n min_extent Haze: <",vstr(3, Min, ", ", 0,3),">\n")
#debug concat(" max_extent Haze: <",vstr(3, Max, ", ", 0,3),">\n\n")
#end
//----------------------------------------
#declare Atmosphere =
union {
object {
GroundFog
hollow
pigment {rgb <1,1,1> transmit 1.0}
interior {
media {
scattering {5 rgb <0.6, 0.6, 0.8>*Murkiness/5000 extinction 1.0
eccentricity 0.01
}
samples 20
density {
spherical
density_map {
[0.00 rgb 0.1]
[0.45 rgb 1.0]
[0.50 rgb 0.1]
[0.60 rgb 0.1]
[0.65 rgb 0.9]
[1.00 rgb 1.0]
}
scale 11
warp {turbulence <2.0, 3.0, 2.0>}
scale <1.0, 1.0, 2.0>
scale 1/11
}
}
}
scale 5000
translate <CamLoc.x, 0.0, CamLoc.z>
}
object {
Haze
hollow
pigment {rgb <1,1,1> transmit 1.0}
interior {
media {
scattering {5, rgb <1,1,1>*0.10/5000
eccentricity 0.4
}
samples 20
density {
spherical
density_map {
[0.00 rgb 1.0]
[0.90 rgb 0.0]
}
}
}
}
scale 5000
translate <CamLoc.x, 0.0, CamLoc.z>
}
} //end of Atmosphere union
//----------------------------------------
#if (Debug)
#declare Min = min_extent(Atmosphere);
#declare Max = max_extent(Atmosphere);
#debug concat("\n min_extent Atmosphere: <",vstr(3, Min, ", ", 0,3),">\n")
#debug concat(" max_extent Atmosphere: <",vstr(3, Max, ", ", 0,3),">\n\n")
#end
//----------------------------------------
Atmosphere
#end //of Atmos
//--------------------------------------------------
#if (Clouds)
#local CloudScale = 1000*10;
#declare Density_in =
density {
wrinkles
frequency 4
color_map {
[0.30 rgb <0.00, 0.00, 0.00>]
[0.48 rgb 0.9]
[0.52 rgb 0.9]
[0.70 rgb <0.00, 0.00, 0.00>]
}
scale 0.5
//rotate 90*x //when using spirals; either here or:
scale 30
warp {turbulence <3, 4, 2>*0.9}
scale 1/30
//rotate 90*x //when using spirals; here
}
#declare Density_out =
density {
rgb <0.00, 0.00, 0.00>
}
#declare CloudScape =
difference {
sphere {0, 1.0}
sphere {0, 0.75}
hollow
material {
texture {pigment {rgb 1 transmit 1.0} finish {ambient 0 diffuse 0}}
interior {
media {
// (---general values---)
intervals 1
samples 50
//absorption rgb <0.5, 0.5, 0.5>*0.00001/CloudScale
scattering {1, rgb <1, 1, 1>*8.00/CloudScale}
// (---density---)
density {
spherical
density_map {
[0.1 Density_out]
[0.9 Density_in]
}
warp {turbulence 0.3}
scale 1
}
}
}
}
scale CloudScale
scale <5, 1.0, 5>
rotate -20*z
rotate 15*y
translate <CamLookAt.x, CamLoc.y, 0>
}
CloudScape
#end //of Clouds
//--end code------------------------------------------
--
Thomas
Post a reply to this message
|
|