Hello there!
I’m new to game development and very new to Babylon, but I’m having an issue when exporting models from blender in glb format regarding UV maps not applying correctly. I reproduced the issue in the playground here:
https://playground.babylonjs.com/#DNC4AE#1
As you can see, the cylinder and the cube in the center don’t seem to have their UVs applied correctly, despite looking fine in Blender before exporting:
Regarding export settings in Blender, I have checked “UVs” and “Normals” under “Mesh” and I’m choosing not to export materials. Exporting the materials makes it work correctly (comment lines 20-26 and uncomment line 29 in the playground to see it) but is not viable in the actual project because it includes a lot of models that share only a handful of textures, which would result in bloated file sizes from each model having to include duplicates of the textures (the textures are > 3MB each).
This leads me to another issue I’m facing when choosing not to export the materials from Blender, which I think could be related (?). The colors applied to the model are off in Babylon when compared to the texture. (see below)
You can see the ground and the tree foliage are different colors in Babylon. Also the bushes and tree trunks have no color applied at all, which is the first issue I mentioned. Both problems are reproduced as accurately as I could in the playground.
As a side note, both problems go away if I include the materials when exporting the model, but as I mentioned before it likely won’t be a viable solution. Nevertheless here’s a screenshot to verify it:
I searched the forums but failed to find this issue, I’m wondering if anyone can help shed some light here? Any direction will be very appreciated, and also thank you for your patience. I’m not a native english speaker and it’s hard for me to write in a warm tone, but I’m here to learn and I’m a big fan of Babylon and this community!!