gltf model armature breaking rendering on iOS 12.5.1

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By automatous

I recently purchased a model from sketchfab that included animation. The model opens in blender without issue, exported to gltf fine, and imported to Godot properly. It displays statically and animated in the editor, as well as when exported on the PC, iOS 11.3, iOS 14.4, and various versions of Android.

However, when running on iOS 12.5.1, the model does not render correctly, like the vertices are out of order or are moving around, or have incorrect normals. I’ve narrowed the issue down to the armature, as when I delete the collection containing it within blender and re-export the model, I no longer have the issue.

Really just looking for any direction at this point, as aside from “something with the armature”, I’m a bit in the dark, and obviously don’t want to lose the animation on the model.

Here’s what it looks like within blender: Blender Scene Hierarchy

I don’t know enough about modelling and rigging to know whether there’s anything obvious about the structure that could be causing the issue, nor what quirks iOS 12.x might have in relation to it.

:bust_in_silhouette: Reply From: automatous

I haven’t 100% figured this out yet, but I’m on the right path so I want to document it here. It seems that having open modifiers on the model can cause these issues. I tried applying the modifiers, which fixes the rendering issues on iOS 12, but does cause the materials to not be used, and breaks the animation. I’ll add more here as I figure it out.

EDIT 1: So if you’d like to follow along with more detailed work on this, I created a github issue here. The gist is that 12.5.1 seems to break hardware skinning, so if you want a quick fix, you’ll need to go into Project Settings -> Rendering -> Quality and set Force Software Skinning to On. There’s plenty of caveats to this that you can research further, but it’s the core issue on what I’m trying to fix currently, and I’ll update back here as I can.

EDIT 2: I’ve submitted a PR in order to give GLES3 the same software skinning fallback that GLES2 has, which you can see here