ANIMATIONEN – BLENDER RETARGETING WORKFLOW
==========================================

WARUM DIESER WORKFLOW?
----------------------
Das Mixamo-Skelett (stand.glb etc.) und das Tripo3D-Skelett (Charakter-Modell) haben
unterschiedliche Bone-Orientierungs-Konventionen. Das Runtime-Retargeting in Java kann
diesen Mismatch nicht zuverlässig beheben. Lösung: Animationen einmalig in Blender auf
das Tripo-Skelett "umrechnen" (baken) und als neue GLBs exportieren.

Diese Arbeit ist EINMALIG pro Animations-Clip. Danach funktioniert jedes weitere
Tripo3D-Modell mit denselben Bone-Namen automatisch über AnimationLibrary.


VORAUSSETZUNGEN
---------------
- Charakter-Modell als GLB-Datei (die Quelldatei, aus der die .j3o erzeugt wurde)
- Mixamo-Animations-GLB (z.B. stand.glb, twohand_idle.glb)
- Blender 3.x oder 4.x


WORKFLOW (für jede Animation einmal wiederholen)
------------------------------------------------

Schritt 1: Beide Armatures in Blender laden
    File → Import → glTF 2.0 → Charakter-Modell .glb   (= Custom-Armature)
    File → Import → glTF 2.0 → stand.glb               (= Mixamo-Armature + Animation)

Schritt 2: Custom-Armature vorbereiten
    - Custom-Armature selektieren
    - Pose Mode (Ctrl+Tab)
    - Alle Bones selektieren (A)

Schritt 3: Copy-Rotation-Constraints setzen
    Für jeden Bone in der Custom-Armature:
        Bone-Properties → Constraints → Add Bone Constraint → Copy Rotation
        Target:  Mixamo-Armature
        Bone:    entsprechender Mixamo-Bone (siehe Mapping unten)

    BONE-MAPPING (Custom → Mixamo):
    ┌─────────────────┬─────────────────────────┐
    │ Custom          │ Mixamo                  │
    ├─────────────────┼─────────────────────────┤
    │ Pelvis          │ mixamorig:Hips          │
    │ Waist           │ mixamorig:Spine         │
    │ Spine01         │ mixamorig:Spine1        │
    │ Spine02         │ mixamorig:Spine2        │
    │ NeckTwist01     │ mixamorig:Neck          │
    │ L_Clavicle      │ mixamorig:LeftShoulder  │
    │ L_Upperarm      │ mixamorig:LeftArm       │
    │ L_Forearm       │ mixamorig:LeftForeArm   │
    │ L_Hand          │ mixamorig:LeftHand      │
    │ R_Clavicle      │ mixamorig:RightShoulder │
    │ R_Upperarm      │ mixamorig:RightArm      │
    │ R_Forearm       │ mixamorig:RightForeArm  │
    │ R_Hand          │ mixamorig:RightHand     │
    │ L_Thigh         │ mixamorig:LeftUpLeg     │
    │ L_Calf          │ mixamorig:LeftLeg       │
    │ L_Foot          │ mixamorig:LeftFoot      │
    │ R_Thigh         │ mixamorig:RightUpLeg    │
    │ R_Calf          │ mixamorig:RightLeg      │
    │ R_Foot          │ mixamorig:RightFoot     │
    └─────────────────┴─────────────────────────┘

Schritt 4: Animation baken
    Pose → Animation → Bake Action
        ✓ Only Selected Bones
        ✓ Visual Keying
        ✓ Clear Constraints
        Bake Data: Pose

    → Erzeugt eine neue Action auf dem Custom-Skelett.

Schritt 5: Exportieren
    - Mixamo-Armature aus der Szene löschen (X → Delete)
    - Custom-Armature selektieren
    - File → Export → glTF 2.0
        Format:    GLB
        Include:   Selected Objects only
        Animation: ✓ (Export animations)
    - Speichern als:  blight-assets/src/main/resources/animations/stand.glb
      (überschreibt das alte, fehlerhafte GLB)

→ Workflow für jede weitere Animation (twohand_idle.glb etc.) wiederholen.


WIE ES DANACH FUNKTIONIERT
---------------------------
Die neuen GLBs haben das Tripo-Skelett mit den korrekten vorgerechneten Animationen.
AnimationLibrary lädt sie beim Start automatisch und verteilt sie per applyAllTo()
auf alle Charaktere im Spiel.

Neue Tripo3D-Charaktere (gleiche Bone-Namen) bekommen alle Animationen automatisch —
kein weiteres Blender-Mapping nötig, weil das RetargetingSystem Bind-Pose-Unterschiede
(z.B. unterschiedliche Proportionen) selbst korrigiert.

Neuer Animations-Clip von Mixamo:
    → Einmal durch diesen Workflow → GLB in animations/ ablegen → fertig.
