Atmospheric Scattering

Hello, I havent posted anything for too long time :). So, here I present you a shader ive recently been busy with.

It is based on the chapter “Accurate Atmospheric Scattering” of the “GPU Gems 2” I found here: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html

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 :slight_smile:

Yet to do:

• easier setup
• skydome only (if you dont need a view from space)

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


screenshots:

http://img230.imageshack.us/img230/9279/earth5.jpg

http://img35.imageshack.us/img35/3664/earth1z.jpg

http://img688.imageshack.us/img688/3717/earth3.jpg

panoramic 360° views of setting Sun (thanks to dfelinto`s Dome rendering):
http://img42.imageshack.us/img42/6623/sunsetfx.jpg

a view from ground:
http://img513.imageshack.us/img513/6499/earth6.jpg

Videos:

http://img25.imageshack.us/img25/126/youtubedl.jpg

http://img33.imageshack.us/img33/7567/vimeos.jpg


and a blend :
http://dl.dropbox.com/u/11542084/atmosphere.blend
controls:

wasd - move camera
mouse movement - mouselook
left mouse button&mouse movement - grab&move sun
mousewheel up/down - scattering exposure
Up/Down - scattering samples

Enjoy!

That is really cool!!!

And very realistic.

Thanks for sharing!

you are crazy, very crazy …:spin:
congratulations you deserve!

thanks for sharing:D

Fantastic martinsh!
As always… xD
Thanks Martinsh you´re the Master of BGE Graphics!

Congratulations mate, you did it! I looks great, that’s what I’ve been looking for!

5* as allways
very nice and realistic…
many thanks for sharing

wondering what would be next :slight_smile:

wow … damn usefull and elegant … thanks for sharing !

… wow …
I was impressed at the screen shots when I thought it was a rendered effect. I nearly had an accident when I realized it was real-time!

Absolutely beautiful.

wooot I just watched those procedural clouds video on youtube… pure awesomness
can’t believe my eyes

Wow this is incredible. And runs quite well. Most things like this hardly run on my comp, but this runs at 15 fps. Doesn’t sound like much, but its great for me.

you are freaking awersome!

Thank you :smiley:

here are a video:
(YouTube and Vimeo versions)

http://img25.imageshack.us/img25/126/youtubedl.jpg

http://img33.imageshack.us/img33/7567/vimeos.jpg

A couple of general questions…

Are these videos being made with screen capture?

Is there a way to use game engine / GLSL shaders directly in still/video renders?

Yeah Fraps at 30 frames per second.

Yup, but the captured image size is limited by your monitor size.

Wow, you really deserve the title “BGE God”, martinsh. Awesome as always!

Would that method be to use FRAPS to capture OpenGL directly? Not a conventional F12 Blender Internal render?

Fraps or any other screen capturing software, yeah.
Though there is a way to to render images of each frame to specified folder. The python code were quite simple as I remember.

Awesome, thanks to suply us, your work on this filters are are, are i dont know, it saves my life every day, i use your filters on my job, they are excelent. Thanks, realy thanks for this

Daaaammmm, thats awesome.