You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

Atmospheric Scattering - Blender Game Engine


EaMartinsh has once again raised the bar, this time he's taken the spectacular mountain demo we saw a while back and added... well... the rest of the planet?

Martinsh explains:

Hello, I haven`t posted anything for too long time
So, here I present you a shader i`ve recently been busy with.

It is based on the chapter "Accurate Atmospheric Scattering" of the "GPU Gems 2" I found here:

Scene contains 4 spheres: 2 for ground & 2 for atmosphere, as there are 4 shaders (Ground from Space/Atmopshere & Skies from Space/Atmosphere).

Feel free to use this in your own projects, but the setup may be a headache.
Moving, scaling etc. operations of the spheres will cause strangeness

Yet to do:
• easier setup
• skydome only (if you dont need a view from space)

• cloud coverage
• normal-mapped lighting for ground
• ocean material


You can download the file and see it for yourself from this link. Controls listed below:

WASD - move camera
Mouse movement - mouselook
Left mouse button&mouse movement - grab&move sun
Mousewheel up/down - scattering exposure
Up/Down - scattering samples

Youtube video -

Thread on -


  1. woah holycrap...the lighting is just super uber awesome!!!...i'm speechless at the look of this!
    great work on the shader...already downloading it.
    Much appreeciation for sharing this i imagine its been a huge effort that went into it. It's amazing!

  2. Hi, The first images look very nice, but it is so slow to load in streaming on my PC that I gave up very early. I'd really want to see it completely.

    On Vimeo, it is possible to download the video files, to watch them off line. Is it possible on YouTube ? I have never found out a link.

    Thanks in advance !


  3. Oh my god. The beginning was really nice and then the takeoff to space was even cooler.

    I remember several years ago when I worked in Terragen to render images like this, and it took a couple of minutes per frame. Realtime in BGE is great.

  4. @fboyer : Thanks, but this kind of software only saves what is played in streaming, so it is not faster. I asked if there is a feature on Youtube allowing to download directly the source file, like at Vimeo. I can download files at 8 or 9 Mbs, but This Youtube streaming seems to deliver the video at 56kbs !

    Anyway I left my computer running, and after my shower and cooking, I finally got the video.

    Very good lighting effects ! I really like the halo when the sun is going to disappear behind the earth, and the thickness of the atmosphere.

    Excellent work ! Thanks for sharing !

  5. whoa, this is amazing work. thanks also for all your hard work porting shaders to ATi too. this piece is VERY fine work indeed. kudos

  6. man, that's just so friggin' beautiful! I see you're also responsible for the previously equally impressive bathroom demo. You got my respect.

    BTW, care to disclose the author and the name of the music playing on? Just as beautiful as the demo itself...

  7. i think i will stop watching starwars once in a day because of maya ressources and not because of the story after having seen this...btw i am a blenderfan anyway...

  8. I remember doing a little test like that in Blender Internal, and being able to get just as good a result with the game engine. I haven't looked at the links, but I think it's the same method.

  9. I can't believe it.
    This looks so real! And that in real time!

    BigPilot is right: Now realistic clouds and you do't have to leave your PC to take a walk.

  10. This is a great post and its very creative indeed but if only you people would properly give cubefield a shot. Its a great game. Very addicitve and very entertaining to all age groups.

Leave A Reply

To add a profile picture to your message, register your email address with To protect your email address, create an account on BlenderNation and log in when posting a message.