Hey all,
I have implemented O'Neils atmospheric scattering from space as described in GPU Gems 2. I have got it working the way I want except that I having trouble making the atmosphere larger/bigger. O'Neils implementation uses a predefined scale function which limits the atmosphere to be 2.5% larger than the planet itself. Currently this is what I have:
What I want to achieve is a larger atmosphere, as seen in Spore for instance:
It is obvious that in the screenshot above the atmosphere is much larger than 2.5% of the planet..
So my question is: how to adapt O'Neil atmospheric scattering approach to account for a larger atmosphere.
O'Neil Atmospheric scattering scale function
Somewhere in your shaders , you should adapt the exponentials : exp(-h/H) h = your altitude , H = the height where the considered quantity is the highest concentrated for example there are two values : one for mie scattering and one for rayleigh scattering.
If you simply integrate the shaders as they are provided in Gpu Gems2 in your renderer , try to find the constants that are used in the denominator of the previous exponentials...
You can put what you want in it if you stay in the same coordinate range in the full pipeline of calculation.
Oh and just to comment the pic of spore, there is no atm scattering in there...
If you simply integrate the shaders as they are provided in Gpu Gems2 in your renderer , try to find the constants that are used in the denominator of the previous exponentials...
You can put what you want in it if you stay in the same coordinate range in the full pipeline of calculation.
Oh and just to comment the pic of spore, there is no atm scattering in there...
Oh and just to comment the pic of spore, there is no atm scattering in there...
Thats very interesting, what I want to achieve is more of a 'spore-like' planet than a correct solution. Can you maybe provide me with more information on how the sky in spore is rendered?
[quote name='boubi' timestamp='1305669717' post='4812119']
Oh and just to comment the pic of spore, there is no atm scattering in there...
Thats very interesting, what I want to achieve is more of a 'spore-like' planet than a correct solution. Can you maybe provide me with more information on how the sky in spore is rendered?
[/quote]
From what i see i guess they render a second sphere with alpha blending , and modulate alpha by dot(N,L) L being sundir and N sphere normal...
You might find this interesting:
http://petrocket.blogspot.com/2010/01/simple-flexibile-atmosphere-shaders.html
There's also some newer posting on the same blog that you might find useful.
http://petrocket.blogspot.com/2010/01/simple-flexibile-atmosphere-shaders.html
There's also some newer posting on the same blog that you might find useful.
You might find this interesting:
http://petrocket.blo...re-shaders.html
There's also some newer posting on the same blog that you might find useful.
Thanks that is very useful indeed!
For other people reading this:
http://petrocket.blo...-treegrass.html
Thats the link with the improved sky shader.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement