Lights do not work, cannot change the material color

I made the 3D model from blender. I exported it as .gltf file. Then if I just use point lights, the model will be full black, but hemispheric light works. I want to use point lights.

Then another problem is that I cannot change the texture color no matter what. I tried to manipulate the “material.diffuseColor” but nothing is changed.

Please someone help me.

This is my playground link Jersey model

This is my github 3D model link Jersey 3D model .gltf

Hi. 100 meters for light is very big distance and if you use simple lightbulb in real world you dont lighting nothing in distance 100 meters. Babylon works with physically ‘correct’ lighting. Unit size 1 meter… so decrease distance between light and model… I think 1-1.5 meters new BABYLON.Vector3(0,1,-1) place your light in position 1 meter above model and 1 meter before model


Your material is a PBR material, so the property is named albedoTexture and not diffuseTexture (which is used for the standard material).

1 Like

Building on what @kvasss said, if you increase the Intensity on your point lights to a really large number like 3000, you can see that they are in fact working. They were just too dim for your scale.
(But definitely go with changing the scale instead of the intensity as a solution.)

1 Like

Thank you @kvasss, @Evgeni_Popov & @tbunker, it works now. I have to set the light intensity to 50000. I will resize my model later.

Then there is another issue with albedoTexture. So I have logo materials attached to the model. I need to write text in it. But why is my logo material background color black? I cannot change it into transparent.

Please help Writing albedo texture playground

Please ignore the rotation of the canvas, I will correct it later in my model.

Sorry but why you move your lights and increase intensity? Total calculation of lights in shader take same results but i think you get problems with shadows and other problems in future

Try setting the opacity texture of your material based on your drawText.

I added mat.opacityTexture = dynamicTexture to the example below, along with setting the words to white and the background to black.

Playground Link