Jump to content
  • Advertisement
Sign in to follow this  
Harry Hunt

Sunbeam effect - how does it work

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

I've played Crysis and now I've seen a video of the upcoming FarCry 2 and both of those games feature a pretty neat volumetric sun ray effect.Check out this screenshot to see what I mean. I'm not entirely sure how this is implemented. I read somewhere that it's done using raytracing but of course that's pretty vague. Does anybody know of any papers or articles explaining the effect? Thanks a lot in advance.

Share this post


Link to post
Share on other sites
Advertisement
I believe that there is a nice article in GPU gems 3 that explains a technique that is close to, if not basically the same, as the technique used in crysis. I dont believe that the technique mentioned in GPU gems is based on raytracing, though i dont have the book on me so im not completely sure

Share this post


Link to post
Share on other sites
My guess would be that they do it by blurring towards the sun, checking the depth buffer along the way for occlusion.

Share this post


Link to post
Share on other sites
The article coderchris refers to is "Volumetric Light Scattering as a Post-Process" by Kenny Mitchell, in GPU Gems 3. The basic idea is to trace a ray from each pixel to the light source in image-space, and use the number of occluders you hit as an attenuation factor. There are a bunch of other small details, but that's the general idea. You can pick up a copy of the book for more information, it's definitely worth it :)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!