Texture on button 3D is too dark

I am assigning a texture to the button 3D of GUI class. The texture looks too dark. I tried increasing light intensity but that did not have any effect. How do I make my texture bright?

https://playground.babylonjs.com/#2YZFA0#191

The button 3D is existing in its own scene in a utility layer, and this scene has its own light. You can access this light with manager.utilityLayer.utilityLayerScene.lights[0]:

https://playground.babylonjs.com/#2YZFA0#198

You can also change the emissive color of the material. However, the button mouse over handler is also updating the emissive color to apply a red filter on the picture, and reset the emissive color to black when leaving the button. You will need to override the pointerOutAnimation handler to re-set your own emissive color:

https://playground.babylonjs.com/#2YZFA0#193

2 Likes

Thank you, I really did not know that GUI3DManager has its own utility layer.