Enforce standard node naming and animation baking in wearables
Problem We've identified two issues affecting emote playback in wearables:
-
Non-standard node naming:
- Some wearables use non-standard names for skeleton nodes (e.g., "Armature.001" instead of "Armature")
- This breaks compatibility with emotes that expect standard node names
- While we've patched the preview to handle numeric suffixes, other naming variations could still cause issues
-
Animation dependency on skeleton hierarchy:
- Some emotes (like the DAO Pony emote) use a mixed animation approach:
- Main motion is applied to the Armature node
- Short positioning animations are applied to individual bones
- This approach relies on proper skeleton hierarchy for bone inheritance
- If the Armature node isn't found or properly named, the entire animation fails
- Some emotes (like the DAO Pony emote) use a mixed animation approach:
Solution The Wearable Editor should automatically validate these issues before allowing wearable publication:
-
Node Name Validation:
- Scan the GLB file's node hierarchy
- Check for standard DCL node naming convention
- Flag any deviations from the standard naming (e.g., "Armature.001", "Avatar_Head.001")
- Prevent users from publishing such GLB and show them the faulty names of the nodes.
-
Animation Baking Validation:
- Analyze animation data in the GLB
- Detect if animations are properly baked to all relevant bones
- Flag animations that only target the Armature without full bone baking
- Warn users that this approach of animation could not work on legacy emotes that don't have a propery skeleton hierarchy, encourage them to bake animations in all bones.
Implementation Path
-
GLB Inspection:
- Use existing GLB parsing libraries (like @babylonjs/core) to load and inspect models
- Create a validation module that:
- Lists all nodes in the hierarchy
- Identifies standard DCL node names vs non-standard ones
- Maps animation targets and their keyframes
-
Validation Rules:
- Define a list of standard DCL node names
- Create rules for valid node naming patterns
- Define requirements for animation baking coverage
-
UI Integration:
- Add validation step in the import provess
- Show clear error messages for naming issues
- Show warning messages for animation issues
-
Documentation:
- Update wearable creation guidelines
- Document standard node naming requirements
- Explain animation baking best practices
This enhancement will improve wearable compatibility and reduce animation issues in the platform. It can be tested using the BabylonJS Sandbox (https://sandbox.babylonjs.com) to verify proper node naming and animation baking.
Related
- Preview fix PR: https://github.com/decentraland/wearable-preview/pull/119
These are the name conventions for the skeleton of the wearables:
Root
Armature
Base Structure
Avatar_HipsAvatar_SpineAvatar_Spine1Avatar_Spine2
Head
Avatar_NeckAvatar_Head
Left Arm
Avatar_LeftShoulderAvatar_LeftArmAvatar_LeftForeArmAvatar_LeftHand
Left Hand Fingers
Avatar_LeftHandThumb1Avatar_LeftHandThumb2Avatar_LeftHandThumb3Avatar_LeftHandThumb4Avatar_LeftHandIndex1Avatar_LeftHandIndex2Avatar_LeftHandIndex3Avatar_LeftHandIndex4Avatar_LeftHandMiddle1Avatar_LeftHandMiddle2Avatar_LeftHandMiddle3Avatar_LeftHandMiddle4Avatar_LeftHandRing1Avatar_LeftHandRing2Avatar_LeftHandRing3Avatar_LeftHandRing4Avatar_LeftHandPinky1Avatar_LeftHandPinky2Avatar_LeftHandPinky3Avatar_LeftHandPinky4
Right Arm
Avatar_RightShoulderAvatar_RightArmAvatar_RightForeArmAvatar_RightHand
Right Hand Fingers
Avatar_RightHandThumb1Avatar_RightHandThumb2Avatar_RightHandThumb3Avatar_RightHandThumb4Avatar_RightHandIndex1Avatar_RightHandIndex2Avatar_RightHandIndex3Avatar_RightHandIndex4Avatar_RightHandMiddle1Avatar_RightHandMiddle2Avatar_RightHandMiddle3Avatar_RightHandMiddle4Avatar_RightHandRing1Avatar_RightHandRing2Avatar_RightHandRing3Avatar_RightHandRing4Avatar_RightHandPinky1Avatar_RightHandPinky2Avatar_RightHandPinky3Avatar_RightHandPinky4
Legs
Avatar_LeftUpLegAvatar_LeftLegAvatar_LeftFootAvatar_LeftToeBaseAvatar_RightUpLegAvatar_RightLegAvatar_RightFootAvatar_RightToeBase