Volumetric Spot Light (not scattering !)

Hello,
i’m trying to achieve this effect, that was done using threeJS : 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)

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

Thank you !

1 Like

This looks like a really cool thing to add and support :slight_smile:

We do not support it at the moment.

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

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.

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

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

4 Likes

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 !

2 Likes

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)

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

cheers!

2 Likes

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

2 Likes

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 ?