Hi, I’m using a mesh that I have exported from Blender as a .babylon file that has in total 4 submeshes within it, and I want to use this one mesh with different shaders, each displaying different parts of the main model.
The idea is that 1 submesh will be displayed with every material, and then 1 of the other three submeshes (at different positions on the model) will be shown with another material on it. The other 2 submeshes will be invisible.
Currently im doing this by creating a new standard material, setting it’s alpha to 0, and then using that to fill in the gaps in the multiMaterial array:
const transparentMaterial = new StandardMaterial('testMaterial', scene); transparentMaterial.alpha = 0; const multiMaterial = new MultiMaterial(`MultiMaterial`, scene); multiMaterial.subMaterials.push(mainMaterial, transparentMaterial, moveableMaterial, transparentMaterial);
Im concerned about optimisation, as creating a Standard material for this purpose seems a bit heavy, but i cant leave gaps in the multimaterial array.
Any suggestions on the lightest way to create this invisible placeholder material?