Download

Volumetric Spotlight with Shadow

I’ve seen that many people define their scene by atmospheric lights, but there is no standard way to do that in Unreal. This is mainly because it requires volumetric rendering, which has a very high render cost.

Unreal came up with tricks that use emissive messes for indoor scenes, which work well but require quite some manual labour. The other effect is their directional light bloom and oclussion effect, but these have some requirements, which do not always work for you:

  1. Only works in outside areas (I think they test on the depthbuffer).
  2. Only works for directional lights (no spotlights or pointlights (although documentation mentions pointlights).
  3. Only works (best) when you add fog (atmospheric or exponential height fog) to your scene
  4. 1 effect only works when the light source is in your screenspace
  5. 1 effect only works when the camera direction is within 90 degrees of the light source direction.

Now for indoor scenes I came up with a way that automatically generates planes inside the volume of a light-shaft and this is ideal for spotlights or windows.

You can find all the details in the marketplace description:

This is the best you can get, without adjusting the render-pipeline. It is just made in blueprint and a material shader. But getting a nice uniform brightness and optimize rendering and have a good looking fall-off took me quite some time to figure out. I also added an option to put in a mask, so you can have the spinning bunker fan! It manipulates quite some transforms (even in the material shader) so that you can place the fan and spotlight in any direction and the light is automatically correctly culled.

I based this technique on the following video: https://www.youtube.com/watch?v=a81fIkBb5tg

And to demonstrate it, I recreated the scene which is shown in this showcase of the game https://www.youtube.com/watch?v=PpDoSu-d6SE
The video is from 2011. It is the game Overdose based on the Quake 2 Engine :eek:, but almost completely rewritten and they have volumetric lights in the core of their engine and I think they can get 4 times better efficiency I guess when doing it in-engine. And in 2016 the game is still in development! That’s dedication! Would be nice if Unreal would get in-engine volumetric lighting as well.

Well for now, if you want volumetric light effects inside of rooms, you can get most effects done with the asset I have on the marketplace. Check out the video and screenshot:

5a66dd9071336ba4c832b872e3c98f324a5ce263.jpeg

hey I just bought this, but I cant get the red fan to show the shadows when spinning, they just stay in the same place even though the fan is spinning the shadows dont

is there something else I need to do or check?