Library clips: Hips-only translations to avoid distorting the model
Some Mixamo clips carry translation keyframes on every bone; bound to a model with different proportions they stretch/crush the limbs (bone lengths must come from the target skeleton). Library binding now keeps translations only for the Hips (root motion); rotations drive the rest. Clips baked into a model keep their full channels. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d329759961
commit
bc3ad8cc20
1 file changed
+4
@@ -498,6 +498,10 @@ class ModelSim {
|
|||||||
for (const ch of clip.channels) {
|
for (const ch of clip.channels) {
|
||||||
const ni = idxByBase[ch.bone];
|
const ni = idxByBase[ch.bone];
|
||||||
if (ni === undefined) continue;
|
if (ni === undefined) continue;
|
||||||
|
// foreign clips: translations only for the Hips — per-bone
|
||||||
|
// translations carry the SOURCE rig's proportions and would
|
||||||
|
// stretch/crush a model with different bone lengths
|
||||||
|
if (ch.path === 'translation' && ch.bone !== 'Hips') continue;
|
||||||
channels.push({ node: ni, path: ch.path, times: ch.times, vals: ch.vals });
|
channels.push({ node: ni, path: ch.path, times: ch.times, vals: ch.vals });
|
||||||
}
|
}
|
||||||
if (channels.length > 4)
|
if (channels.length > 4)
|
||||||
|
|||||||
Reference in new issue
Block a user