UV Map flipped for Imported Mesh from Blender file.glb

Hi Sebavan, after digging deeper, I believe this is an actual bug in Babylon, and not just my use case of mixing use of Babylon native Meshes with GLTF ones. Check this difference in normal map Texture taken from babylon docs:


Looks like a correct fix would be to:

  1. Disable Texture.constructor default .invertY = true option (so default is false)
  2. Refactor all native BABYLON.MeshBuilder.Create* methods to map UV from bottom left

My understanding after looking into the code is that UV mapping logic is spread all over different files (boxBuilder.ts, cylinderBuilder.ts, etc.), and there is no central place where this is controlled. Is this correct?

I don’t know Babylon well enough to know all the places where UV is mapped (for now I only know what I use), or else I’d have submitted PR a long time ago.