Replies: 1 comment 2 replies
-
All postprocesses will currently applied to all meshes. Maybe the material information is interpreted in the wrong way. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have found that a few GLB files I import with Assimp 5.3.1 have some meshes with vertically flipped UV coordinates while having other meshes without.
Here's an example you can download as GLB and import: https://sketchfab.com/3d-models/smg-fps-animations-ca37ea9148dc4fcc9cc632175d311b23 I can see that the source GLB file looks fine in the built-in Windows viewer, but when I import it with Assimp 5.3.1, only the arms mesh has proper UV coordinates while the gun meshes look screwed up. If I flip all UV coordinates vertically in my own viewer application (github.com/janhsimon/aem), the arms are screwed up but the gun meshes look fine.
Notice the difference between arms and gun in my viewer vs the GLB viewer in Windows.
I understand that sometimes I do need to flip the UV coordinates myself and know of the import/post-processing flag, but I don't understand how this can be required on a per-mesh instead of a per-model basis. I can't find any flag or hint within Assimp that would tell me that a particular mesh has a UV transform that I need to respect etc.
Additionally, I have verified in Blender that all normals are correct and outwards facing, and have additionally tried importing with the infacing normal fix flag, but that makes no difference. I also verified that the mesh itself isn't flipped. I have tried importing with pre-transformed vertices or without, and that also makes no difference.
I did notice that this model comes in with 3 UV channels and suspected that to be the problem, but have verified that all UV coordinates are exactly the same in all 3 channels. I have also noticed that the texture wrap mode is set to mirror repeat and suspected that to be the cause, but was able to verify that all UV coordinates in all meshes are between 0 and 1, so this doesn't make a difference either. All meshes are also UV mapped instead of box/cylinder etc. mapping.
I am out of ideas as to what could be causing this to be honest. Has anyone seen this before? Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions