Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model Importer treats blend shape tracks as "custom tracks" #68588

Closed
Tracked by #63198
kobligo opened this issue Nov 13, 2022 · 0 comments · Fixed by #71900
Closed
Tracked by #63198

Model Importer treats blend shape tracks as "custom tracks" #68588

kobligo opened this issue Nov 13, 2022 · 0 comments · Fixed by #71900

Comments

@kobligo
Copy link

kobligo commented Nov 13, 2022

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

  • 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.

Minimal reproduction project

BlendShapeBug.zip

Bugsquad edit (keywords for easier searching): blendshape

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants