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, increase
fog density; optionally, increase
fog height falloffso that the fog is concentrated at lower altitude.
- For the directional light, to make the god rays more obvious, increase the
intensity, for example to
20 lux; to create light shafts between leaves, check
light shaft bloom.
- Critical: Ensure that the
mobilityproperty of both the tree and directional light is set to
movable. 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.