r/vtubertech • u/MaraXMelonie • 4d ago
Spring bones overwrite your retargeted animation: getting an authored tail onto a VRM
Long-ish, but the fix is small and it took me an embarrassing amount of time to find, so here it is. Disclosure up front: this is my own character and her stream, not a tutorial I read.
Setup: I animate in Blender on her own rig, then retarget each clip to the VRM she actually streams with (three-vrm, in a browser stage). Body clips come across fine — each animated bone gets moved into the VRM's axis convention with a per-bone correction taken from the two rest poses: V_local = D_parent⁻¹ · source_local · D_bone, with D_bone = L_rest⁻¹ · D_parent · K_rest. At rest and at every sampled frame the result matches the source skeleton within 0.4 mm, so the conversion itself was never the problem.
Two things broke the tail specifically.
- A VRMA only carries humanoid bones. Anything secondary — tail, ears, hair — isn't in VRMC_vrm_animation.humanBones, so it isn't in the file at all, and nothing warns you. I kept the tail joints as plain extra nodes with their own rotation tracks alongside the humanoid ones. three-vrm's VRMAnimation ignores them, which is correct behaviour; the raw glTF animation still has the tracks, so you build a second THREE.AnimationClip from those and run it on the same mixer as a sibling action.
- Once the track existed the tail still didn't move, and this is the bit worth knowing: the spring-bone solver runs after the mixer, every frame, and it overwrites the rotations of every joint that has a VRMC_springBone entry. Anything you write before vrm.update() is discarded — including a perfectly good keyframed pose. You have to write it after:
- sample the clip immediately after mixer.update(),
- let vrm.update() run the solver,
- then re-apply the sampled local rotations to those joints,
- and call the spring-bone rebuild for each one, because spring-bone bones normally have matrixAutoUpdate off and your quaternion write never reaches the world matrix otherwise.
Then switch your procedural tail off while the clip is playing, or the two fight each other and you get neither.
Result: her six-second loop now swings the tail about 1.4 m tip to tip, authored, and the same clip still runs the hair and ears on springs so they respond to the motion instead of being frozen.
If you're retargeting Mixamo/Blender clips onto a VRM with a tail, that ordering issue is almost certainly why your keys look like they were ignored. Happy to go into more detail if it's useful to anyone.
4
u/drbomb 4d ago
Man I'm sure it is like something amazing and very technical but I just read a bunch of nothing.
In unity springbones refuse to be animated so I use DynamicBones when animations are needed.