I tried my best doing my “homework” by reading:
“Transparency and How Meshes Are Rendered”
However, after many attempts I still can not get my model to have a face with transparent areas according to its texture.
On Blender I tried to enable PBR Transparency mode: Alpha test & Blend as well as Blend. No effect. BTW… existing Blender tips is VERY different than 2.8 and former exported made for 2.79 crashes crashes on 2.79. So I am only using 2.8 with latest exporter.
O BJS I tried to enable Alpha by getting material reference with no luck:
var mat = arch.material; mat.hasAlpha = true;
Also tried other possible settings like:
mat.backFaceCulling = false; mat.diffuseTexture.hasAlpha = true; // get error here as there is no diffuseTexture in this mat. mat.needAlphaBlendingForMesh(true); mat.alphamode = BABYLON.Engine.ALPHA_COMBINE;
Then I decided to follow a working solution for a cube:
So I created a material and tried to apply to my mesh. It seems that BJS did not take in consideration the existing UV Mapping and applied wrong mapping:
var mat = new BABYLON.StandardMaterial("newMat", scene); mat.diffuseTexture = new BABYLON.Texture("blender/arch.png", scene); mat.diffuseTexture.hasAlpha = true; mat.backFaceCulling = false; arch.material = mat;
Thanks in advance,