Jump to content
  • Advertisement
Sign in to follow this  
Patrik Svensson

Spectral rendering of the rainbow

This topic is 4881 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'm implementing a path-tracer to simulate the earths atmosphere using Rayleigh and Mie scattering. Is the following correct? To properly render the rainbow I need to use Mie scatterig theory applied to water drops of some diameter. The reason we see a rainbow is that the phase function for raindrops has two backwards pointing peaks at approx 42 deg and 50 deg (or something like that) AND that these peaks changes a little for different wavelengths. So if I got this right I can't use for example the Henyey Greenstein phase function because it does not have these peaks and is not wavelength dependant. Correct? So, I will need a more accurate phase function to properly simulate the rainbow and possibly other atmospheric effects such as halos. I found a program called MiePlot that can be used to calculate alot of stuff on Mie scattering. Can this be used to create a lookup table for a more accurate phase function for different particle sizes? If so, can someone give me some directions on how to use MiePlot for this? Can I create some kind of batch file to calculate the phase function for alot of different wavelenghts and particle sizes and export this to a file? Thanks in advance, Patrik

Share this post


Link to post
Share on other sites
Advertisement
I don't have much background to give any guidance to your question, however I believe I remember seeing a rainbow demo as part of the nvidia sdk. Parameters addressing key phrases in your question.

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!