decentraland / decentraland/builder
Enforce standard node naming and animation baking in wearables
- Dominant language
- TypeScript
- Stars
- 156
- Forks
- 91
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 31
Description
**Problem**
We've identified two issues affecting emote playback in wearables:
1. 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
2. Animation dependency on skeleton hierarchy:
- Some emotes (like the [DAO Pony](https://decentraland.org/marketplace/contracts/0xb13c91d7288e2d4328dd153fc0c6d29fad6159f7/items/0) 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
**Solution**
The Wearable Editor should automatically validate these issues before allowing wearable publication:
1. 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.
2. 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**
1. 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
2. Validation Rules:
- Define a list of standard DCL node names
- Create rules for valid node naming patterns
- Define requirements for animation baking coverage
3. UI Integration:
- Add validation step in the import provess
- Show clear error messages for naming issues
- Show warning messages for animation issues
4. 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
Contributor guide
Assessment
This issue has not been assessed yet.