|
|
Here is the media for the cloud sphere, which is the inner of the two
volumes. What I need is to be able to "clip" the media to "InnerRadius"
and "OuterRadius" so that I can then simply copy/move the media to the
larger atmosphere sphere.
-Mike
//BEGIN
#local InnerRadius = EarthRadius + CloudMinRad;
#local OuterRadius = InnerRadius + CloudMaxRad;
#local BoundRadius = sin(acos(EarthRadius/OuterRadius)) * OuterRadius;
#local ScaleAmount = Width/2;
// #local testpattern = function {mod(sqrt(Sqr(X) + Sqr(Y) + Sqr(Z)), 1.0)}
#local CloudPigment = pigment
{
average
pigment_map
{
[2 onion scale CloudMaxRad/ScaleAmount phase
-mod(OuterRadius,CloudMaxRad)/CloudMaxRad/ScaleAmount]
[2 granite scale 1024 * 32/ScaleAmount]
}
}
#local CloudMedia = media
{
scattering {1, 0.5 * 1/ScaleAmount / 320}
method 3
intervals 1
// samples 30 //30, 100
samples 4
density
{
pigment_pattern {CloudPigment}
density_map {[0.60 rgb 0][0.61 rgb 1]}
}
}
#local CloudSphere = difference
{
sphere {0, OuterRadius}
sphere {0, InnerRadius}
bounded_by {cylinder {<0,EarthRadius,0,>, <0,OuterRadius,0,>,
BoundRadius}}
hollow
material
{
texture {pigment {rgbt 1}}
interior
{
media {CloudMedia}
}
scale ScaleAmount
}
translate -y * EarthRadius
}
//END
Post a reply to this message
|
|