Hello!
So i have a problem in topic - i have a simle shirt model, and have two different texture for front and inside. For me is important that these textures must be separated, each is diffuse png, because the front texture is showing to user for redacting by the fabricjs.
How can i set a texture for front side and another texture for inside side, if the model is simple mesh but the texture is two different png image?
i tied
chest = result.meshes[0];
back = result.meshes[1];
result.meshes[0].overrideMaterialSideOrientation = 2;
result.meshes[1].overrideMaterialSideOrientation = 2;
result.meshes[0].sideOrientation = BABYLON.Mesh.DOUBLESIDE;
result.meshes[1].sideOrientation = BABYLON.Mesh.DOUBLESIDE;
let a = new BABYLON.Vector4(0,0, 1, 1);
let b = new BABYLON.Vector4(0,0, 1, 1);
result.meshes[1].frontUVs = new BABYLON.Vector4(0,0, 1, 1);
result.meshes[1].backUVs = new BABYLON.Vector4(0,0, 1, 1);
result.meshes[0].frontUVs = a;
result.meshes[0].backUVs = b;
then something here maybe
const pbr = new BABYLON.PBRMetallicRoughnessMaterial('pbr', this.scene);
const pbr1 = new BABYLON.PBRMetallicRoughnessMaterial('pbr', this.scene);
pbr.backFaceCulling = false;
this.scene.meshes[0].material = pbr;
this.scene.meshes[0].material = pbr;
// this.scene.meshes[1].material = pbr;
pbr.baseTexture = new BABYLON.Texture('/3d-item/shirt/front/diffuse.png', this.scene);