I've created a macro called SkySim (I'll post it in p.b.s-f once I've
tidied it up and added comments) that creates a realistic looking sky
pigment in a sky_sphere based on the sun position and the "haziness" of
the sky.
The algorithm used is from this paper:
www.cs.utah.edu/~shirley/papers/sunsky/sunsky.pdf
It is the same algorithm used by the open-source software Stellarium, so
I already had a starting point in code for the POV version.
If you also use "sunpos.inc" to get the sun position then you can create
the correct sky based on just the longitude/latitude and time of day
(this is how I've done it in the test scene).
The renders below are from the test scene with an isosurface ground and
fog, however I've patched my version of POV so that the fog colour
matches the sky_sphere and is not a constant colour. I think this gives
a realistic perception of depth and renders very quickly.
Obviously in a real scene you may want to add clouds, but I hope it's a
useful starting point for a realistic looking sky.
Post a reply to this message
Attachments:
Download 'skysimtestground1.png' (351 KB)
Download 'skysimtestground2.png' (237 KB)
Download 'skysimtestground3.png' (259 KB)
Download 'skysimtestground4.png' (262 KB)
Download 'skysimtestground5.png' (301 KB)
Download 'skysimtestground6.png' (197 KB)
Download 'skysimtestground7.png' (173 KB)
Preview of image 'skysimtestground1.png'
![skysimtestground1.png](/povray.binaries.images/attachment/%3C51b18d7d%40news.povray.org%3E/skysimtestground1.png?preview=1)
Preview of image 'skysimtestground2.png'
![skysimtestground2.png](/povray.binaries.images/attachment/%3C51b18d7d%40news.povray.org%3E/skysimtestground2.png?preview=1)
Preview of image 'skysimtestground3.png'
![skysimtestground3.png](/povray.binaries.images/attachment/%3C51b18d7d%40news.povray.org%3E/skysimtestground3.png?preview=1)
Preview of image 'skysimtestground4.png'
![skysimtestground4.png](/povray.binaries.images/attachment/%3C51b18d7d%40news.povray.org%3E/skysimtestground4.png?preview=1)
Preview of image 'skysimtestground5.png'
![skysimtestground5.png](/povray.binaries.images/attachment/%3C51b18d7d%40news.povray.org%3E/skysimtestground5.png?preview=1)
Preview of image 'skysimtestground6.png'
![skysimtestground6.png](/povray.binaries.images/attachment/%3C51b18d7d%40news.povray.org%3E/skysimtestground6.png?preview=1)
Preview of image 'skysimtestground7.png'
![skysimtestground7.png](/povray.binaries.images/attachment/%3C51b18d7d%40news.povray.org%3E/skysimtestground7.png?preview=1)
|