Sign in to follow this  

Atmosphere look-up table

This topic is 3487 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

as a reply to this post:
Quote:
I've been thinking about the use of look-up tables to solve the in-scattering integral in atmospheric rendering. In this Gamedev article O'Neil correctly notes that the problem is 4-dimensional. There's the altitude of the point being considered, the direction (theta and phi) to the sun, and the direction (theta and phi) to the viewer, where the whole system can be rotated to eliminate the view theta. A 4D problem can't be mapped nicely onto a texture lookup, so the in-scattering integral always has to be evaluated iteratively. But then there's the paper Real-Time Rendering of Planets with Atmospheres [www.vis.uni-stuttgart.de]. These guys claim to reduce the problem to 3 dimensions, making it possible to encode the solution in a 3D texture to be accessed by a fragment shader. I'm having trouble wrapping my head around this, and coming to believe that it's correct. Has anyone successfully implemented this technique? How can the sun theta be eliminated? A correct mapping of the in-scattering integral to a lookup table would be very significant. It would solve the problem of atmospheric rendering completely. It would become possible to recursively precompute multiple scattering events, finally resulting in a speedy algorithm giving a nice bright blue sky at the zenith.
to our knowledge it is not possible to reduce the problem to 3 dimensions (the paper "Real-Time Rendering of Planets with Atmospheres " ignores the sun theta, although they do not state that explicitely). But a 4D table can be stored in a 3D texture. You just need 2 lookups in this 3D texture to get a linearly interpolated sample in the 4D table. In fact we published an article about this in EGSR 2008, that will take place in June. It also precomputes multiple scattering as suggested above. Here are some results of our proposed method: If you want to try it, see the demo source code here (see also my web page). Eric

Share this post


Link to post
Share on other sites
absolutely amazing looking... The multiple scattering makes all the difference. I got the code compiling and running and I must say, its extremely fast as well!

Running on an 8800gtx at 1680x1050, atmosphere fully in view, i get a solid 350 fps. If I turn off non linear scattering and transmitance, i get 450fps. Again amazing work.

One thing you might look into is computing the mie phase function per pixel rather than storing it in the lookup table, that way you can have a much more defined sun spot.

[Edited by - coderchris on May 26, 2008 7:47:57 PM]

Share this post


Link to post
Share on other sites
Got it compiled, but I have to wait for my 8800GT to arrive (along with the rest of my new comp in a few days) before I can run it. On my 6800GT the program does not fail gracefully, but I know this is only a demo, so no hard feelings ;-) program crashes upon first attempt to compile a geometry shader.

Share this post


Link to post
Share on other sites

This topic is 3487 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this