To create the god ray / light shaft effect through trees, we should use the volumetric fog feature recently added to Unreal Engine. Google search will give us the following 3 references:
The thing is even after perusing the first 2 references you may still have a hard time implementing the desired effect. Here is a summary of the right steps that you need to follow to avoid hours of trial-and-errors:
- Add the tree, directional light, exponential height fog to the map.
- For the exponential height fog, check the option
volumetric fog
; to make the god rays more obvious, increasefog density
; optionally, increasefog height falloff
so that the fog is concentrated at lower altitude. - For the directional light, to make the god rays more obvious, increase the
intensity
, for example to20 lux
; to create light shafts between leaves, checklight shaft bloom
. - Critical: Ensure that the
mobility
property of both the tree and directional light is set tomovable
. Without this step, the tree would have wrong, static shadow, and the directional light would not be able to create the god rays in the fog.
The above steps end up applying volumetric fog effect on a global scale. Optionally we may follow the great presentation (starting at 14:24) to implement the local volumetric fog effect via the particle system.