You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing models with mesh compression on there are artifacts created that affect the texturing and look of the models. In the Minimal Reproduction Projects attached, I have the same model imported in 4.1 and in 4.2 to show the difference between the imported models. While troubleshooting, it seems the model scale can be a contributing factor (as this models default scale was 0.01 in blender). However, this does not happen in 4.1 or when mesh compression is disabled.
4.1 on the left, 4.2 with compression on the right
Steps to reproduce
Import a mesh and create a new inherited scene to view it (does not need a texture to notice issue). Go to import settings and select "Force Disable Compression" under Meshes and reimport it removes the issue.
After some troubleshooting with some other godot users. Narrowed it down to the glb/gltf file based on blender version. When the model in the MRP is exported from Blender 3.2.1 Godot Mesh Compression causes those artifacts. But when the same model is exported from Blender 3.6.2, then Godot Mesh Compression does not cause any artifacts. I hope this helps narrow down the possible culprit so older glb/gltf files still work with Mesh Compression as expected
The issue here is that mesh compression relies on having valid tangents.
In the importer we can generate tangents based on normals and UVs if the "ensure_tangents" box is checked off.
This model contains UVs, but the UVs don't contain valid UV data, so the generated tangents are bogus. When they get passed to the renderer, the renderer creates invalid normals. The current solution is to either uncheck ensure_tangentss or check force_disable_compression.
I'm investigating whether we can do something more and detect these cases. We might be able to check for bogus UVs and then fallback to a different method of generating tangents (the same as what we use when UVs aren't present)
Godot version
4.2 Beta 4
System information
Windows 10
Issue description
When importing models with mesh compression on there are artifacts created that affect the texturing and look of the models. In the Minimal Reproduction Projects attached, I have the same model imported in 4.1 and in 4.2 to show the difference between the imported models. While troubleshooting, it seems the model scale can be a contributing factor (as this models default scale was 0.01 in blender). However, this does not happen in 4.1 or when mesh compression is disabled.
4.1 on the left, 4.2 with compression on the right
Steps to reproduce
Import a mesh and create a new inherited scene to view it (does not need a texture to notice issue). Go to import settings and select "Force Disable Compression" under Meshes and reimport it removes the issue.
Minimal reproduction project
GodotCompressionMVP.zip
The text was updated successfully, but these errors were encountered: