How do I get God Rays in UE4?

Hopefully it should be a simple command somewhere right?
How do i get rays like the ones in Bioshock infinite and The Last of Us? (Look at sources below)

Thank you

30 second mark: The Last of Us Walkthrough Part 11 - Bill's Town: The Woods - YouTube
Bioshock Infinite:
http://prohardver.hu/dl/kba/306_bioinfgron.jpg

http://cloud-2.steampowered.com/ugc/595882854002429958/55BE3EB33FD8D7095E1973B2270D3F549B862D24/1024x640.resizedimage

If I had to take a guess, the three images you linked showcase 3 different ways of doing god rays. You can set up a sun light and tweak post process/world process settings to get natural god rays, but sometimes you’ll want to take it a step further and make a particle to assist in the process.

If you open the blueprint examples project you’ll find a pretty awesome blueprint that shows you how to take a light shaft particle and have it match the angle of your current “sun” angle, so that when you move your sun (either dynamically during the game or just messing around in the editor) the god ray angle follows. I wouldn’t consider this a solution if you want god rays in a wide expansive forest (for that you’ll just need to tweak post process settings, which someone else can chime in for), but this works great for emphasizing sun through windows and hard surface openings (i.e. a hole in the roof of a building).

is this what you’re looking for? Light Shafts | Unreal Engine Documentation

Don’t need to do any of that.

Just turn the light shafts on in your direct light or skylight. Done

Take a look at the Blueprint Office example:

You guys are awesome, thank you!

I just wrote a tutorial on that, feel free to have a look :slight_smile:

Marketplace: Volumetric Spotlight with Shadow

Yes this is the best looking effect, but it has many restrictions:

  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.

If you want any of the above you have to work with emissive shaders on geometry. The Blueprint office example (as mentioned) by epic in the ‘Epic Games Launcher’ Library section is the most simple one. If you want volumetric spotlights take a look at my asset in the Marketplace, which gives you drag-and-drop blueprints that do all this for spotlights!!!:

&d=1468672849

1 Like

Hello! I need some help. I create a new scene and turn on this “LightShafts”. And nothing! I spent a lot of time to fix it. Help :frowning: UE 4.13.2ï»ż

Hello all, sory for my bad english


to Artem1988,
If your Quality Settings (Settings – Engine Scalability Settings (Quality) ) set to “Low” or “Medium” you can’t see this effects. Set, please, quality to “High” ot “Epic”, to see it.