# Volumetric Spot Light (not scattering !)

**URL:** <https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786>\
**Category:** Questions\
**Tags:** lighting, material\
**Created:** [April 17, 2024, 9:57pm UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786 "2024-04-17T21:57:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenKuper](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/benkuper/32/31834_2.png) [@BenKuper](https://forum.babylonjs.com/u/BenKuper)\
**Post date:** [April 17, 2024, 9:57pm UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/1 "2024-04-17T21:57:31Z")

</div>

Hello,  
i’m trying to achieve this effect, that was done using threeJS : [jeromeetienne.github.io/threex.volumetricspotlight/examples/basic.html](https://jeromeetienne.github.io/threex.volumetricspotlight/examples/basic.html)

This comes from this repo : [jeromeetienne/threex.volumetricspotlight: three.js extension to provide a volumetric spot light (github.com)](https://github.com/jeromeetienne/threex.volumetricspotlight?tab=readme-ov-file)

I searched for a BabylonJS equivalent but since Volumetric Light Scattering has been released, this is taking all the search result and I can’t find anything related to showing the light cone (with blurry edges) of a spot light.

Use case is creating a stage lighting editor / simulator for my software [https://benjamin.kuperberg.fr/blux](https://benjamin.kuperberg.fr/blux)

Thank you !

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 19, 2024, 12:35am UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/2 "2024-04-19T00:35:09Z")

</div>

This looks like a really cool thing to add and support 🙂

We do not support it at the moment.

---

<div class="post-metadata">

**Author:** ![BenKuper](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/benkuper/32/31834_2.png) [@BenKuper](https://forum.babylonjs.com/u/BenKuper)\
**Post date:** [April 24, 2024, 3:38pm UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/3 "2024-04-24T15:38:27Z")

</div>

Thank you for the reply.  
So there is absolutely no way to achieve this ?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [April 24, 2024, 4:29pm UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/4 "2024-04-24T16:29:39Z")

</div>

Sorry for the misunderstanding, you can totally develop the feature as it has been done in three. It is mainly a mesh and a custom shader. It would even be an amazing contrib for the community. I can totally assist in the process.

---

<div class="post-metadata">

**Author:** ![waverider404](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/waverider404/32/17464_2.png) [@waverider404](https://forum.babylonjs.com/u/waverider404)\
**Post date:** [April 24, 2024, 11:08pm UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/5 "2024-04-24T23:08:46Z")

</div>

I have a working example on my laptop, I will see if i can find it once i get home 🙂

---

<div class="post-metadata">

**Author:** ![waverider404](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/waverider404/32/17464_2.png) [@waverider404](https://forum.babylonjs.com/u/waverider404)\
**Post date:** [April 25, 2024, 6:37am UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/6 "2024-04-25T06:37:21Z")

</div>

here:  
[https://playground.babylonjs.com/#2L8UDE#1](https://playground.babylonjs.com/#2L8UDE#1)

https://playground.babylonjs.com/#2L8UDE#1

---

<div class="post-metadata">

**Author:** ![BenKuper](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/benkuper/32/31834_2.png) [@BenKuper](https://forum.babylonjs.com/u/BenKuper)\
**Post date:** [August 29, 2024, 10:34pm UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/7 "2024-08-29T22:34:23Z")

</div>

Hey,  
sorry for the late answer, this is an amazing first step !  
Do you reckon that modifying the shader would allow for more customization like fading the edge of the beam, and the projected light ellipse ?

Thank you for this already !

---

<div class="post-metadata">

**Author:** ![waverider404](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/waverider404/32/17464_2.png) [@waverider404](https://forum.babylonjs.com/u/waverider404)\
**Post date:** [August 30, 2024, 11:30pm UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/8 "2024-08-30T23:30:31Z")

</div>

Yes this is very much possible!  
I already made a PR here for more edge smoothness using depth texture, PR is not ready yet, needs some changes! ([Volumetric spotlight by ademola-lou · Pull Request #15046 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/pull/15046))

I will find some time next week to add those changes and do some polishing.

cheers!

---

<div class="post-metadata">

**Author:** ![regna](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/regna/32/23915_2.png) [@regna](https://forum.babylonjs.com/u/regna)\
**Post date:** [August 30, 2024, 11:52pm UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/9 "2024-08-30T23:52:21Z")

</div>

Amazing, thank you for all your efforts here, @waverider404 !

---

<div class="post-metadata">

**Author:** ![BenKuper](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/benkuper/32/31834_2.png) [@BenKuper](https://forum.babylonjs.com/u/BenKuper)\
**Post date:** [October 22, 2024, 3:15pm UTC](https://forum.babylonjs.com/t/volumetric-spot-light-not-scattering/49786/10 "2024-10-22T15:15:02Z")

</div>

hello, again sorry for the late answer, I don’t get notified from babylon forum…

the PR has been set to stale, does that mean this work is not going further ?
