Render lights inside a mesh

Hi there,

I’m trying to add some spot lights on a transparent mesh. The lights go through the mesh, but the mesh itself doesn’t have any diffuse reflection at all. Babylon.js Playground

Imagine the material of the box is frosted glass. I’m looking for something like this:
image

Thanks!

Hi R. Errr… Hi N. :slight_smile:

I’m not very good with materials/textures… but what the heck… I’ll try one.

https://www.babylonjs-playground.com/#J91TY5#3

shrug. Something to play-with. :slight_smile: I hear those fancy “PBR materials” are pretty hot, too… https://www.babylonjs-playground.com/#8MGKWK#80 [docs]. I know VERY little about those.

Stay tuned for more/better comments (and maybe some more textured glass attempts by others.) :slight_smile:

Hi W. :laughing:
I didn’t realise I can use opacityTexture. Thank you for replying.
But my objective is actually showing the color of lights without the bottom plane.
Something like this… :thinking:

1 Like

Ahh… volume lights. [even more]

Is that the wanted effect?

https://www.babylonjs-playground.com/#1EZDPB#3

In the above PG, those “volumes” are fake. So, I got nuthin’. :slight_smile: Sorry.

I’m not sure BJS can do volume lights, though. Stay tuned… smarter people are nearby.

2 Likes

Aha!:rofl: That’s clever. It’s absolutely a solution. Thanks!

2 Likes