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

Enforce standard node naming and animation baking in wearables #3239

Open
cazala opened this issue Jan 10, 2025 · 1 comment
Open

Enforce standard node naming and animation baking in wearables #3239

cazala opened this issue Jan 10, 2025 · 1 comment

Comments

@cazala
Copy link
Contributor

cazala commented Jan 10, 2025

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

@cazala
Copy link
Contributor Author

cazala commented Jan 13, 2025

These are the name conventions for the skeleton of the wearables:

Root

  • Armature

Base Structure

  • Avatar_Hips
  • Avatar_Spine
  • Avatar_Spine1
  • Avatar_Spine2

Head

  • Avatar_Neck
  • Avatar_Head

Left Arm

  • Avatar_LeftShoulder
  • Avatar_LeftArm
  • Avatar_LeftForeArm
  • Avatar_LeftHand

Left Hand Fingers

  • Avatar_LeftHandThumb1
  • Avatar_LeftHandThumb2
  • Avatar_LeftHandThumb3
  • Avatar_LeftHandThumb4
  • Avatar_LeftHandIndex1
  • Avatar_LeftHandIndex2
  • Avatar_LeftHandIndex3
  • Avatar_LeftHandIndex4
  • Avatar_LeftHandMiddle1
  • Avatar_LeftHandMiddle2
  • Avatar_LeftHandMiddle3
  • Avatar_LeftHandMiddle4
  • Avatar_LeftHandRing1
  • Avatar_LeftHandRing2
  • Avatar_LeftHandRing3
  • Avatar_LeftHandRing4
  • Avatar_LeftHandPinky1
  • Avatar_LeftHandPinky2
  • Avatar_LeftHandPinky3
  • Avatar_LeftHandPinky4

Right Arm

  • Avatar_RightShoulder
  • Avatar_RightArm
  • Avatar_RightForeArm
  • Avatar_RightHand

Right Hand Fingers

  • Avatar_RightHandThumb1
  • Avatar_RightHandThumb2
  • Avatar_RightHandThumb3
  • Avatar_RightHandThumb4
  • Avatar_RightHandIndex1
  • Avatar_RightHandIndex2
  • Avatar_RightHandIndex3
  • Avatar_RightHandIndex4
  • Avatar_RightHandMiddle1
  • Avatar_RightHandMiddle2
  • Avatar_RightHandMiddle3
  • Avatar_RightHandMiddle4
  • Avatar_RightHandRing1
  • Avatar_RightHandRing2
  • Avatar_RightHandRing3
  • Avatar_RightHandRing4
  • Avatar_RightHandPinky1
  • Avatar_RightHandPinky2
  • Avatar_RightHandPinky3
  • Avatar_RightHandPinky4

Legs

  • Avatar_LeftUpLeg
  • Avatar_LeftLeg
  • Avatar_LeftFoot
  • Avatar_LeftToeBase
  • Avatar_RightUpLeg
  • Avatar_RightLeg
  • Avatar_RightFoot
  • Avatar_RightToeBase

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

No branches or pull requests

1 participant