precomputed_atmospheric_scattering icon indicating copy to clipboard operation
precomputed_atmospheric_scattering copied to clipboard

Airglow/atmospheric scattering at night

Open mdkdy opened this issue 7 years ago • 4 comments

Currently, the sky after sunset becomes completely dark. However, atmosphere is never completely dark and during night, when rayleigh scattering stops dominating, some phenomena appear like airglow or moonlight scattering which gives tint of blue or green, of course very subtle when compared to rayleigh scattering during day.

Is it possible to conduct some research and add such experimental feature which would enrich the project and wouldn't hurt real time performance?

mdkdy avatar Jun 20 '17 21:06 mdkdy

Interesting, I wouldn't say it's completely dark. This is my attempt to use precomputed_atmospheric_scattering (ported to DirectX/HLSL):

The night sky (it's better to open it in fullscreen) The sun is opposite to the zenith point now. You can see that even at the top it has some bluish tint. However I wonder if presence of stars would affect significantly the sky color.

ziab avatar Jun 20 '17 23:06 ziab

Do you use code based on demo? I increased exposure to 1000 and gamma to 2.5, but it doesn't look lik this.

mdkdy avatar Jun 21 '17 09:06 mdkdy

Well, it's not exactly the demo code that I'm using, as I mentioned, I had to change the CPU code so it works with DirectX, the GPU code is adjusted to be compatible with HLSL. Except that, it's the same implementation.

Did you try to play with AtmosphereParameters? I guess increasing top_radius might affect airglow in the night.

ziab avatar Jun 21 '17 10:06 ziab

This parameter didn't affect night for me. I'd rather leave it as it is. I played with mie parameters to get some hazy summer skies.

mdkdy avatar Jun 29 '17 08:06 mdkdy