Showing the Fallback Texture

Hi,

I saw that the engine has a fallback texture (the red-black checkerboard texture).

Like in this example, where I deliberately try to load a non existing texture.

https://www.babylonjs-playground.com/#CZ9EMB

Is there a way to assign this fallback texture to a material via the API on purpose? I want to show it in certain scenarios even when I am not trying to load a texture, but also if I am trying to create an invalid material.

We have a high level material description that must follow some rules and I want to unify the appearance of invalid materials in the scene.

Thus I was thinking using what is already available would be a good way to do it. However, I don’t want to cause it to perform an http request, so the approach in the playground is not really satisfying.

Kind Regards
Jacques

Here we are:
https://www.babylonjs-playground.com/#CZ9EMB#1

Hi Deltakosh,

perfect, that was what I was looking for :slight_smile:

1 Like