Scene become black when highlight an object with an invalid video texture


First, thanks for this beautiful framework.
I am very impressed by the work you have done …

I have a problem, and I would like you to confirm me or not if it is a bug …
Code is here : Babylon.js Playground

Steps to reproduce :

  • Run : you see a scene with a plane, a cube and a sphere in gray.
  • Mouve over the plane : all the objects of my scene becomes black.
  • Mouse out the plance : all the objects of my scene are now ok.

Note something : the video is ‘invalid’.
In my real application (here is only an extract to reproduce my bug), the stream of the video is KO (network problem, or other problem…).
I understand, that the plane becomes black, but I do not understand why all my scene is affected by this problem.

1°/ Could you to confirm me or not if it is a bug …
2°/ Do you have an idea of workaround ?

Thanks for advance

In order to draw the material, the texture needs to be ready which was causing trouble. PR is here: Fix highlight on unready meshes by sebavan · Pull Request #5747 · BabylonJS/Babylon.js · GitHub

This will be fixed on the next nightly.


Thanks for your answer. Happy to see you have fixed that so quickly…
I have not tested yet.
Do I have to download/clone the gitbug babylonjs repo to make a test, or there is an easiest way ?

I just take a quick look on the pull request, I am very surprised : I was thinking there was some code to test if video was invalid…


You can directly test on the playground you provided it is deployed at least once a day from master.

The issue was not related to video but to the presences of none ready materials.

Wonderful. I was not aware that playground uses the latests sources.
I suppose if I want this in my project, I can use

Thank you very much for a so quick fix…