• Advertisement
Sign in to follow this  

O'Neil Atmospheric scattering scale function

This topic is 2473 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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:

sick2.png

What I want to achieve is a larger atmosphere, as seen in Spore for instance:

Spore%20Planet.jpg

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.

Share this post


Link to post
Share on other sites
Advertisement
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...

Share this post


Link to post
Share on other sites

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?


Share this post


Link to post
Share on other sites

[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...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement