GTD – Atmospheric scattering

I’ve almost finished implementing the base for the sky, using the SkyDome technique. Instead of a skymap or a colour table I decided to use a simulation of how light actually scatters in our own atmosphere for a (hopefully) more realistic approach. This means that I also have a day/night cycle, albeit currently it takes a total of one minute to complete the cycle as opposed to 24 hours! Screenshots below.

Wireframe of the SkyDome

009-skydome-wireframe

The sunrise (NB: the actual sun itself isn’t drawn yet)

010-skydome-atmospheric-scattering010b-skydome-atmospheric-scattering010c-skydome-atmospheric-scattering010d-skydome-atmospheric-scattering010e-skydome-atmospheric-scattering010f-skydome-atmospheric-scattering

I also had a few rather interesting glitches while implementing this. When I tried to first display it I put every colour value of the SkyDome’s vertices to red (um.. because it’s the standard sky colour…? Don’t ask me why!). However I made my colours were stored as RGBA and I was accidentally making the colour pointer read the values as RGB, this resulted in alternating between full red/green/blue colours due to incorrect offsets.

Glitch – Rainbow sky?

008b-skydome-rainbow008c-skydome-rainbow

Not very realistic but interesting as far as glitches go!

My next steps with this sky will be to make it a bit more realistic, there are no planetary objects currently (sun, stars etc) so that would probably be a good next step. Clouds might be added too.

Leave a Reply