ebruneton / precomputed_atmospheric_scattering

This project provides a new implementation of our EGSR 2008 paper "Precomputed Atmospheric Scattering".
BSD 3-Clause "New" or "Revised" License
908 stars 120 forks source link

Is there any reason to start fading out light shaft so early? #28

Closed 10110111 closed 6 years ago

10110111 commented 6 years ago

Currently, when the Sun is 1° above horizon, the light shaft (and shadow) is already gone. This looks not nice, e.g. when you look at the sphere in the direction of the Sun (the shadowed part): the sphere seems to start glowing for a while until the Sun goes below horizon.

With smoothstep edges of -0.026, -0.0035 instead of the current 0.02, 0.04 this looks much better but, when you look how the shadow extends into infinity, it goes into the sky:

screenshot

I suppose this is normal, given this real-life photo (source):

real light shaft from smoke after sunset

Of course, the light shaft in the demo looks a bit wrong due to the lack of penumbra and corresponding too sharp shape. But was this the only reason to avoid extending light shaft into the sky by too early fading out?

ebruneton commented 6 years ago

This was the main reason. The light shafts are computed with crude approximations. In particular, we assume there is no scattering at all in the shadow volume, whereas only single scattering is removed. Because of this, our light shafts are darker than they should be when multiple scattering dominates (i.e. when the Sun is low). To remove single scattering only, we would need to separate single and multiple scattering into separate precomputed textures, which would increase memory requirements and decrease the frame rate.

10110111 commented 6 years ago

Thanks for clarification.

ghost commented 4 years ago

hello eric bruneton how i can implement new atmosphere on application website even forking and implementing teach me this procedure