How do you guys test the materials

We are working on with GLTF, Blender, Trimesh in our pipeline and yesterday we stumbled upon a bug where we did not take proper care of our materials.

We wanted to write some tests to make sure that our materials are correct, but we started wondering how.

First we make a render in blender of our material set to a cube, but then if the image your are testing against is bad the test will be bad and there is no easy way to generate good images for all test cases.

Next we wanted to test all the nodes of the material in Blender, but that meant that we would have infinite amount of possibilities and we dropped it.

We were wondering how does BABYLON JS test it’s materials and if they loaded the proper thing, but we did not find anything in the GitHub repo.

In Babylon.js we use validation tests which are small PGs that produce a picture and we test against a saved picture of this PG (that we generated when we knew the output was ok!) to check that there were no regression in the code. You can find this in: