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)
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).
Yes this is the best looking effect, but it has many restrictions:
Only works in outside areas (I think they test on the depthbuffer).
Only works for directional lights (no spotlights or pointlights (although documentation mentions pointlights).
Only works (best) when you add fog (atmospheric or exponential height fog) to your scene
1 effect only works when the light source is in your screenspace
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!!!:
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.