Jump to content
  • Advertisement
Sign in to follow this  
ZealGamedev

Precomputed atmospheric scattering...

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

Has anyone implemented 'Precomputed atmospheric scattering'?

http://www.google.com/search?sourceid=c ... scattering

I have been researching it these past couple days, and it definitely looks like the 'top' technique for nice looking scattering from both ground and space. However, I remember playing around with a demo based on Sean O'Neils method, and I recall it was very difficult to tweak the colors. You cant really expect an artist (or most of us for that matter) to understand how Rayleigh and Mie scattering work, so your only option is to blindly change the numbers and hope you get lucky. This always seemed silly to me, because an artist already knows (in his mind, or from a photograph) what color he wants the sky to be at a given time. It just seems like a more 'artist friendly' version of atmospheric scattering would be nice, especially in situations where you wanted to control the colors for non earth alien worlds.

A while back I played around with ways to achieve atmospheric scattering with simple 'artist drawn' lookup tables (basically the same idea from the "A fast, simple model to render sky color using gradient maps" paper, just adapted to planet rendering) . It had some problems, but it 'worked' (the entire sky was colored based on a simple hand drawn texture). I wonder if anyone has any thoughts on alternative strategies like this?

Thanks

Share this post


Link to post
Share on other sites
Advertisement
I did not implement that particular method, but I implemented a version similar to O'Neils except I did the numeric integration on the GPU, but only updated it when the Sun moved.

It worked OK, but where I hit problems with that method was when management wanted to achieve some other sky and sunset looks. In other words, the Rayleigh and Mie single scattering are good for producing a typical ordinary blue sky and typical sunset, but nature produces LOTS of different kinds of sunsets, and the basic model cannot achieve these. Sure you can tweak the constants, but they are dependent and it is really hard to achieve the overall look you want--you get part of your sky to look how you want, but it messes up another part, and you tend to get alien looking atmospheres.

If I were to do it again, I would probably have it all artist based and just keyframe the colors based on time of day. This way the artists have full control of what they want.

Share this post


Link to post
Share on other sites
This is EXACTLY what I am talking about. Say a artist has some 'vision' for how he wants a scene to look (maybe from a photograph from a recent vacation). It is near impossible to get the results you want just by tweaking Rayleigh and Mie variables.

So I am wondering if anyone has played around with any alternative techniques when it comes to atmospheric scattering. The 'Gradient maps' paper I mentioned contains a great technique for ground views, but I am looking for something that works from ground to space.

Share this post


Link to post
Share on other sites
Pretty nifty... Anyone tried implementing that approach? It looks great for most views, although the dusk/dawn colors seem less than spectacular. Maybe that could be addressed with a higher resolution gradient map, or some other trick?

Share this post


Link to post
Share on other sites
Try to look at Eric Bruneton's precomputed atmospheric scattering. It's great and you can extend on it. I believe Halo 3 and Reach use an improve version of his method.

Share this post


Link to post
Share on other sites
Quote:
Original post by b_thangvn
Try to look at Eric Bruneton's precomputed atmospheric scattering. It's great and you can extend on it. I believe Halo 3 and Reach use an improve version of his method.


I think that's the paper for why this thread got started ;)

Share this post


Link to post
Share on other sites
Yeah I am aware of that paper. Although you said Halo used a 'improved' version? Can you elaborate?

In the meantime I have been playing around with the method venzon linked, and I am having trouble getting good results around dusk/dawn. Midday looks fine, but dusk/dawn with that method just doesnt come close to more advanced techniques like Erics...

Share this post


Link to post
Share on other sites
Quote:
Original post by ZealGamedevIn the meantime I have been playing around with the method venzon linked, and I am having trouble getting good results around dusk/dawn. Midday looks fine, but dusk/dawn with that method just doesnt come close to more advanced techniques like Erics...


It's an inherent limitation of the algorithm.

A 2-dimensional texture is not sufficient to adequately capture all the variables that affect sky coloration.

Share this post


Link to post
Share on other sites
Quote:
Original post by ZealGamedev
Yeah I am aware of that paper. Although you said Halo used a 'improved' version? Can you elaborate?

In the meantime I have been playing around with the method venzon linked, and I am having trouble getting good results around dusk/dawn. Midday looks fine, but dusk/dawn with that method just doesnt come close to more advanced techniques like Erics...


So have you tried to implement Eric's method ? I remember reading a paper about lighting effect on Halo 3 where they talked about their way of pre-computed atmospheric scattering. Maybe you can do a quick search on that.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!