|
![](/i/fill.gif) |
/*
SUNSET.POV
Date: Feb. 2, 1999
Created by: Abe Madey abe### [at] atmos albany edu
Required support files: basic.png (if you are going to use a HF and don't have
your own)
Description & Comments:
This scene is an attempt at applying media to achieve atmosphereic effects.
The approach
is a painterly one rather than a real world modeling attempt (see Michael
Andrews' "clouds.pov"
for an approach that uses more realisic parameters). BTW Micheal's work gave
me inspiration to do this scene.
While this is a working script which has not been refined for general use
and may contain some
odd applications of scene elements, there are a few principles which I adhered
to in order to
achieve my end. These include some of the following. Media are all in
container objects - this allowed
better control over the extent of the media effects and reduced the
"speckledness" for low sample values.
I tried to keep density effects monotonic along the line of sight which also
seemed to produce smoother
effects at low sample values (i.e. faster render times). Finally I tried to
separate the variouse effects
of blue scattering, red scattering, absorption, etc. for better control.
Finally if you intend to fiddle with this scene or incorporate it in one of
your own (and if you do,
please give credit where credit is due) I suggest turning off all media, and
then, in sequence, set the
blue color first, add red and trim that and finally add clouds and ground
haze. BTW 1 pov unit is roughly
one mile.
If this pov file turns out to be of any help to you in working with media,
then I feel it has made my
efforts _really_ worth while!
*/
//******** PRELIMINARY SETTINGS ********
//Suggest using mosaic preview (eg add +SP8 in POVRAY.INI) to get a faster
preview of the results
global_settings { assumed_gamma 1.8 } //seemed to work OK for me, but twiddle
with it
global_settings { max_trace_level 15 } //because of all the media container objects
//
#macro atmos_media_params ()
intervals 5 //Set to 3 or 5 for preview; 8 or 10 for final rendering
samples 1, 40
variance 1/256
confidence .999
#end
#macro cloud_media_params ()
intervals 5 //Set to 5 or so for preview; 10 or 12 for final rendering
samples 1, 40
variance 1/256
confidence .999
#end
// ******** CAMERA ********
camera {
location <0, .01, 0> // found it easiest to work from near the origin
direction z
rotate y*0 rotate -x*10
angle 80
}
// ******** LIGHTS ********
// used to give the landscape a little better ilumination since the main light
angle is so low
light_source {<1000, 10000, 10000> rgb <.5, .5, 1>*1 media_interaction off}
// light for the sun and the object used to represent the sun
light_source {z*9000000 rgb 2.0 rotate -x*5 rotate y*20 media_interaction on }
disc {0, -z, 30 pigment{spherical poly_wave 3 color_map{[0 rgb 0][.9 rgb 15]}}
scale 200000 translate z*1000000
rotate -x*5 rotate y*20 no_shadow}
// BLUE SKY
#declare BlueSky =
media {
scattering {4, rgb <.1, .15, .3>*.2 extinction 1.1 }
density {planar poly_wave 2 color_map {[0 rgb 0][1 rgb 1 ]} scale 20}
atmos_media_params()
}
// comment out the next line to turn off blue sky
sphere {0, 20 hollow pigment {rgbf 1} interior {media {BlueSky}}}
//RED GLOW
#declare RedGlow =
media {
scattering {5, rgb <1, .8, 0>*.05 extinction 0 eccentricity .5}
absorption rgb <.05, .7, .95>*.2
density {planar poly_wave .7 color_map {[0 rgb 0][1 rgb 1]} scale <20, 1, 20>}
atmos_media_params()
}
// comment out the next line to turn off red glow
sphere {0, 20 hollow pigment {rgbf 1} scale <1, .8/20, 1> interior {media {RedGlow}}}
//GROUND HAZE
#declare GroundHaze =
media {
absorption rgb <.5, .7, 1>*.5
density {planar color_map{[.35 rgb 0][.5 rgb 1]} scale <1, 2, 1> translate -y*1}
atmos_media_params()
}
// comment out the next line to turn off ground haze
difference {cylinder {-y*1, y*1, 20} cylinder {-y*1.1, y*1.1, 2} hollow
pigment {rgbf 1} interior {media {GroundHaze}}}
//CLOUD PATTERN
//Getting this right is a whole project in itself!
#macro CloudPat ()
granite color_map{[.5 rgb 0][.5001 rgb 1]} scale 5
scale 7 warp {turbulence .03 lambda 1.4 omega 2.0 octaves 5} scale 1/7
scale <1, 1, 1> translate z*3 translate -x*.6
scale <2, .5, 2>
#end
#declare Clouds =
// the container object is highly dependent on your own preference
sphere {0, 2 scale <4, 2/40, 4> translate y*.75 hollow
pigment {color rgbf 1}
interior {
media {
scattering {1, rgb 6 extinction 1.0}
emission rgb <.6, .5, .9>*1 // used to try to lighten the color of the clouds
density {
CloudPat()
}
cloud_media_params()
}
}
translate -y*.75 rotate -x*4 translate y*.75 // attempt to tilt twds sun for
better illumination
}
object {Clouds} // comment out this line to turn off the clouds
#declare basic_HF = //can be replaced with a plane or ground object of your choice
height_field {
png "basic.png" smooth
translate <-.5, -.5+(.208*.3), 0>
scale <2, .3, 2>
translate <.08, 0, 0>
pigment {color rgb <0.631,0.816,0.231>}
finish {diffuse 1}
}
object {basic_HF}
Post a reply to this message
Attachments:
Download 'basic.png' (17 KB)
Preview of image 'basic.png'
![basic.png](/povray.binaries.scene-files/attachment/%3C36B86BF4.B1FA4C3%40atmos.albany.edu%3E/basic.png?ttop=441393&toff=1450&preview=1)
|
![](/i/fill.gif) |