# How can I do volumetric lighting?

**URL:** <https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616>\
**Category:** Rendering\
**Tags:** exponential-heightfo, unreal-engine, Lighting, volumetric-fog, question\
**Created:** [October 8, 2019, 11:57am UTC](https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616 "2019-10-08T11:57:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![divine123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@divine123](https://forums.unrealengine.com/u/divine123)\
**Post date:** [October 8, 2019, 11:57am UTC](https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616/1 "2019-10-08T11:57:39Z")

</div>

With an empty project I delete all the light sources and or gives a bit of light on the level

- Directional light
- Skylight

Built it and all I got is a black level. Where do I start from here on setting up a simple spotlight casting a volumetric light shaft?

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 8, 2019, 12:36pm UTC](https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616/2 "2019-10-08T12:36:32Z")

</div>

Your scene needs “Exponential Height Fog” Actor, in the details of this actor check the “Volumetric Fog” property. Now you still need a volumetric fog material and actors to catch the light.

Documentation:

> **[Volumetric Fog](https://docs.unrealengine.com/4.27/en-US/BuildingWorlds/FogEffects/VolumetricFog/)**
>
> An overview of the Volumetric Fog features available when using Exponential Height Fog.

Further reading for extra awesomeness of your volumetric materials:

> **[Post Page](https://shaderbits.com/blog/ue4-volumetric-fog-techniques)**

---

<div class="post-metadata">

**Author:** ![divine123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@divine123](https://forums.unrealengine.com/u/divine123)\
**Post date:** [October 9, 2019, 10:33am UTC](https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616/3 "2019-10-09T10:33:30Z")

</div>

Why is it not as easy as the tutorials where they just drop “Exponential Height Fog” make sure to enable necessary settings and thats it. I’m watching this tutorial which is really popular back 2018:

[![]( " - YouTube") ](https://www.youtube.com/watch?v=9tkPIGXJEGg)

PS: non of these tutorials and documentation works for me ☹

 ![289610-volumetricfogquestion.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/4/0b44c31469c5feac06c0b1e3a1a65602adb6a2f6.png)

this is what it looks like on me following the documentations and tutorials

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 9, 2019, 11:03am UTC](https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616/4 "2019-10-09T11:03:47Z")

</div>

Is your scene still black?

---

<div class="post-metadata">

**Author:** ![divine123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@divine123](https://forums.unrealengine.com/u/divine123)\
**Post date:** [October 9, 2019, 11:25am UTC](https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616/5 "2019-10-09T11:25:33Z")

</div>

No. The volumetric fog effect is working. Its the light shaft that comes out of a point light that I can’t make.

 ![289623-fogworking.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/f/b/2fb7f4b5d698e6e995c669275b7d2958a3b7f64a.png)

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 9, 2019, 12:27pm UTC](https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616/6 "2019-10-09T12:27:34Z")

</div>

Did you check the box “Cast Volumetric Shadows” on the light source?

Did you place a mesh and applied a volumetric material to it?

---

<div class="post-metadata">

**Author:** ![divine123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@divine123](https://forums.unrealengine.com/u/divine123)\
**Post date:** [October 12, 2019, 5:32am UTC](https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616/7 "2019-10-12T05:32:31Z")

</div>

Did you check the box “Cast Volumetric Shadows” on the light source? - Yes

Did you place a mesh and applied a volumetric material to it?

- that I don’t know how to do. I never heard that being mentioned on the tutorials.

---

<div class="post-metadata">

**Author:** ![CrispClover](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crispclover/32/1140157_2.png) [@CrispClover](https://forums.unrealengine.com/u/CrispClover)\
**Post date:** [October 14, 2019, 11:40am UTC](https://forums.unrealengine.com/t/how-can-i-do-volumetric-lighting/456616/8 "2019-10-14T11:40:14Z")

</div>

Oddly enough I have no clue how to get the global fog to be as dense as in the video or your picture. Maybe it’s something with the lighting I do wrong… So I always control it locally:

This is how you control volumetric fog locally: Create a material

![289990-volumemat.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/8/c682f4b32fc95e79efdc5262cf4e23cff38526d1.png)

![290003-volumematgraph.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/1/8c138c2de45e540cb20444094911e97a85cbd775.png)

Drag a Mesh into the scene (e.g. a cube, the fog will fill the bounding box of the mesh, so it will be a cube anyways unless you edit the extinction.) Apply your material to the mesh, scale it up to the desired size. This should produce light shafts. Particles work with volumetric materials as well.

 ![290005-lightshaftsinscene.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/1/5218df24ba8cc15f47b2ac517a06d739f32cc565.png)
