Material and light relationship

I create Standard Material and give this material a texture. My request is that this material will not be affected by light, but will preserve its colors on it, briefly appear in its own color instead of black.

this.av_no = new BABYLON.StandardMaterial(“avn”, this.scene);
this.av_no.backFaceCulling = false;
this.av_no.disableLighting = true;

	this.av_no.diffuseTexture = new BABYLON.Texture(STORAGE_SERVER + "/gltf/avatar/shape1.png", this.scene);
	this.av_no.diffuseTexture.hasAlpha = true;

disableLighting = true should do it.

Could you setup a repro in the Playground so we can better see what’s going on?

You need to add your texture as an emissiveTexture if you want to disable lights (either with disableLighting or exclude from all lights). Else, since there is no emitting color/texture your material will look plain black.

2 Likes

Thank you very much

1 Like