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 you import a model (GLTF/GLB etc.) with animated blend shapes, and you choose to import its animations as individual resource files ("Save to File" in Advanced Import Settings) while also checking the "Keep Custom Tracks" toggle, the blend shape tracks contained within the animation are duplicated by Godot each time the model is re-imported.
Godot is treating them as "custom tracks" created within the engine and hence preserves them even though they are part of the imported data and should merely be updated along with the bone transform tracks.
As a result, the user has to go over every imported animation and manually delete every duplicate blend shape track every time the model is re-imported, because the duplicates lead to unwanted vertex distortions on the animated models.
Since animations need to be imported as stand-alone resource files almost always in order to make them writeable, this bug is a huge issue for users working with character models. Animated blend shapes effectively can't be used at all with Godot.
My solution:
When replacing existing animation resource files with new ones during re-import, actually replace any existing blend shape tracks with the newly imported ones. Discard all existing blend shape keyframes within the animation resource file if there's a track controlling the same blend shape about to be imported.
Steps to reproduce
Open the reproduction project and select the AnimationPlayer node in the cube scene.
Notice how there's one blend shape track named "Cube" in the timeline along with one bone animation track.
Select the "cube.glb" file and reimport it.
Notice how the "Cube" blend shape animation track gets duplicated with each reimport.
Godot version
4.0.beta4
System information
Windows 10, Vulkan, NVidia Geforce980Ti
Issue description
When you import a model (GLTF/GLB etc.) with animated blend shapes, and you choose to import its animations as individual resource files ("Save to File" in Advanced Import Settings) while also checking the "Keep Custom Tracks" toggle, the blend shape tracks contained within the animation are duplicated by Godot each time the model is re-imported.
Godot is treating them as "custom tracks" created within the engine and hence preserves them even though they are part of the imported data and should merely be updated along with the bone transform tracks.
As a result, the user has to go over every imported animation and manually delete every duplicate blend shape track every time the model is re-imported, because the duplicates lead to unwanted vertex distortions on the animated models.
Since animations need to be imported as stand-alone resource files almost always in order to make them writeable, this bug is a huge issue for users working with character models. Animated blend shapes effectively can't be used at all with Godot.
My solution:
When replacing existing animation resource files with new ones during re-import, actually replace any existing blend shape tracks with the newly imported ones. Discard all existing blend shape keyframes within the animation resource file if there's a track controlling the same blend shape about to be imported.
Steps to reproduce
Minimal reproduction project
BlendShapeBug.zip
Bugsquad edit (keywords for easier searching): blendshape
The text was updated successfully, but these errors were encountered: