Jump to content
  • Advertisement
Sign in to follow this  
laeuchli

Question about wavelength of moonlight

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

Dear All, I'm currently using an atmospheric scattering model to render the sky in my program. It looks good during the day, however I'm not currently calculating the moon contribution, so the night doesnt look right. So I think if I add the moon in as another light source, and do the integration for it, things will look fine. However I'm not sure what wavelength I should use for the moon light. I realize that the moon only reflects light from the sun, but wouldnt absorbtion or what not chance the spectrum of the moon's light? One idea I had was to use a BRDF of the moon(I have one that supposed to be fairly realisitc), and convert the RGB values in that. Does this sound reasonable? Is there a better way to do it?

Share this post


Link to post
Share on other sites
Advertisement
The moon is white and much dimmer than the Sun. For all practical purposes in a game, I think that description should be enough.

Share this post


Link to post
Share on other sites
Well now, there's more to it than that. There's more than one sort of white. The Sun's white is very orange, whereas the moon is much more towards the blue side of the spectrum.

Share this post


Link to post
Share on other sites
<The moon is white and much dimmer than the Sun. For all practical purposes in a game, I think that description should be enough./>
I'm writing more of a simulation then a game. I need to be a little more accurate then this.

Share this post


Link to post
Share on other sites
Actually, the sun's white peaks in the green part of the spectrum (480 nm), it's just that our eyes are not as sensitive to the green light, so it is percieved as a sort of yellow.

As far as moonlight goes, it's probably at the same wavelength as the sun, because all moonlight is a reflection of sunlight. Reflection does not alter the wavelenth of light, only it's polarization and phase, so the wavelength should not change.

In fact, the real spectrum of the sun is a sort of continuous bell curve see Wien's Displacement Law for more details. The moon's reflected spectrum should look similar, with small absorption bands where the light was absorbed, rather than reflected.

Don't quote me on this, however. If you really want to know for sure, go outside with a spectroscope on a clear night and point it at the moon.

Share this post


Link to post
Share on other sites
The Sun is actually pretty white. You think it's yellow because a lot of the blue light gets scattered around and gets to you from many different angles (a.k.a. "sky"). The same thing will happen to light from the Moon.

It's not that hard to find the spectrum of the Moon using Google Images. This is a good one:

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!