How best to use God Ray effect off-axis? #435
-
Hello! 👋 I'm wondering how to achieve God Ray effects when the "sun" source is not directly within the camera's frame. When I use this effect, my goal is to achieve a subtle overlay over the entire canvas, not only when the camera is directed towards the sun. When the camera is pointed directly at the sun, the sun source washes out the view of the scene behind it. My goal is to achieve the look of 'volumetric fog' rather than sun flare on a camera lens. With threejs' built-in post-processing God Rays effect , I am able to see the effect even when the sun source is outside of the camera view: With postprocessings' God Ray effect, the effect is only visible with the sun is within the frame of the camera. Are there settings I could adjust within the postprocessing God Rays effect to achieve the look from the threejs God Rays? Or best-practices for creating a scene where the sun is not as present, but the effect is? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
The
GodRaysEffect
works by blurring the light source, so if the source isn't on screen, there's nothing to blur. The version in the three.js examples blurs the depth buffer and uses that as the light source. I'm considering moving to that approach with the next major release, but there are pros and cons for both approaches.