POV-Ray : Newsgroups : povray.binaries.animations : Media sun-sky day-night cycle (Divx 5.1 270KB) Server Time
1 Nov 2024 13:21:25 EDT (-0400)
  Media sun-sky day-night cycle (Divx 5.1 270KB) (Message 1 to 1 of 1)  
From: Ryan Bennitt
Subject: Media sun-sky day-night cycle (Divx 5.1 270KB)
Date: 13 Oct 2003 12:11:12
Message: <3f8acea0@news.povray.org>
OK, so it's been done many times before, but here's a day/night cycle movie I
was working on using a media sky. It uses three shells, a lower layer
(scattering white representing humidity close to the ground), a middle layer
containing 'pollution' (resulting in the reddish sunset) and the large upper
atmosphere layer (which makes the sky blue). The sky itself will ultimately form
part of a bigger project, but I just wanted to see how it worked during the full
day/night cycle.

I decided to model these layers on the earth's atmosphere, the bottom two layers
form the troposphere (which is where I would have added clouds, but not for this
render as it takes too long), while the blue sky layer extends from the
stratosphere up to the thermosphere (I decided to ignore the exosphere as it's
very large and represents the transition to vacuum so is very low density too).

The sun is not full scale, instead being 3000 times closer than in real life in
order for POV-Ray to actually render it (I assume problems with floating point
accuracy and view distance). The sun itself is an emitting media, with density
falling rapidly at the edges in an attempt to mimic the sun's corona, though
I've been a bit artistic rather than scientific here and made the fade a lot
more
noticeable than it should be.

It certainly takes a lot of trial and error to get things working even close to
what you desire. While adding the sky layers I was basically reducing the
scattering by factors of 10 until it actually rendered something other than
total white-out. Given the size of the atmospheric layers (the thermosphere
extends up to 600km, add to that the radius of the earth itself @ 6360km), I
ended up
with scattering values in the order of 10^-6.

It took about 8 hours to render all 180 frames on my second PC (a mere athlon
900). Would be a lot quicker on my main PC, but I was busy playing with clouds
for at
least some of that time...

One thing you'll notice is that when the sun sets there are some rather hideous
banding artefacts. These can be eliminated by increasing the media's intervals
and/or samples (For speed, I was only using 1 sample and 1 interval). I did a
series of test renders (with timings), from 1-6 intervals and 4-32 samples. For
the upper atmosphere, 2 intervals with 20 samples seems to eliminate the banding
while minimizing the rendering time (trading intervals and samples any more
seems to produce either noticeably worse results or unnecessarily greater render
times). For the much smaller lower layers you can get away with 1 interval and a
few samples.

Some day I might get round to animating the water...

Ryan


Post a reply to this message


Attachments:
Download 'suncycle.zip' (271 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.