Mesh as Light Source, Area Lights

Hi.

I am working on some things and I thought that it would be so great if I could use meshes as lighting source.

Something like this for example

Or is it possible to have some kind of area light. To give some perspective on what do I mean here is my scene I work on.

At the moment there is point light that lights that wall behind and shelves on it (I tried every type of light in my testing). You can see the effect of that light in red circle.

What I want is to light that whole section where shelves are (blue circle). So something like spotlight that can be spread independently in horizontal and vertical direction (instead of spreading in cone shape).

At the moment my ideas how to light that section is to set several point lights (which I want to avoid). Or to set some directional light and with the separation of the mesh (that wall) control which part is lighten with that directional light.

I hope I explained everything properly. My general intention is to make it look like neon lights are emitting light and lighting that small portion of the wall where shelves are.

Hi @nogalo,
I don’t know how to make this happen with real time lighting in Babylon, but an alternative approach to have this kind of “wall-washing” lighting effect is to bake it into the texture of the wall or use light mapping. This is a very restricted method and need some extra work with asset creation but in my opinion will give you the best looking result with no real time lighting cost.
Hope this can help you somehow. By the way, cool-looking scene you got there​:+1::sunglasses:

1 Like

@nogalo,

I wholly agree. This has been a staple of rendering for 20 years, and a valuable lighting tool. From my experience, I know this would be used in scenes at least 50% of the time if available. However, I’m not certain that this is the highest priority for the babylon.js dev team; as there are many tools remaining to bring the framework up to desktop shading specs (tools that is). Of course, perhaps a shader might be in the works somewhere?

But my vote is definitely in!

Galen

1 Like

Me too, imagine a cyberpunk demo where the roads have area light strips and the light bounces off the cars as they pass by. My vote too is in.