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

fix: patch non-standard skeleton hierarchies #119

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

cazala
Copy link
Contributor

@cazala cazala commented Jan 10, 2025

Fixed avatar animation getting stuck on first frame with non-standard skeleton hierarchy.

Some wearable assets use a non-standard skeleton hierarchy where the Armature node and bones have numeric suffixes (e.g., Armature.001, Avatar_Head.001). This caused issues with emotes that use a mixed animation approach, where the main motion is applied to the Armature node while shorter animations are applied to individual bones to position the avatar correctly.

Previously, the animation targeting was strict and required exact node name matches, causing animations to fail when the asset used numbered suffixes. This resulted in the avatar appearing stuck on the first frame while props animated correctly.
The fix modifies the animation targeting logic to ignore numeric suffixes when matching node names. This allows the system to properly map animations regardless of whether the asset uses standard names (e.g., "Armature", "Avatar_Head") or numbered variants (e.g., "Armature.001", "Avatar_Head.001").

Key changes:

  • Added suffix stripping when matching animation targets to nodes
  • Maintained the behavior of applying animations to all matching nodes
  • Preserved the mixed animation approach compatibility

This solution ensures compatibility with both standard and non-standard asset hierarchies without requiring changes to the assets or the animation system's core approach.

Testing:

  • Verified with assets using numbered suffixes in their hierarchy
  • Confirmed that both main motion and bone-specific animations are applied correctly
  • Tested with various emotes to ensure compatibility

Here's an example of an emote that uses the mixed animation appraoch (dependent on a correct skeleton hierarchy) being applied to a skin with a standard skeleton hierarchy, and also applied to a skin with a non-standard hierarchy (duplicated armatures: Armature.001 and Armature.002.

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wearable-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 1:30pm

@cazala cazala merged commit 3363e8b into master Jan 10, 2025
3 checks passed
@cazala cazala deleted the fix/path-non-standard-skeleton-hierarchies branch January 10, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants