sketchpunklabs / ossos

Webbased Character Animation System
MIT License
423 stars 46 forks source link

Invalid Retarget transformation on `Armature.offset.set()` for movement scaling & rotation #18

Open ArsenicBismuth opened 1 year ago

ArsenicBismuth commented 1 year ago

I'm using the 003_retarget_and_springs.html example with a custom mixamoRig model. The tall/left model is the source, while the short/right model is the target.

If I remove the arm.offset.set() line, this is what I get:

https://github.com/sketchpunklabs/ossos/assets/19264532/939ce1c2-3559-462b-84c2-6a202479d501

Meanwhile, after re-enabling the line:

https://github.com/sketchpunklabs/ossos/assets/19264532/348e9026-069e-407a-93e3-39c0d958da61

The target is actually moving downward just a tiny bit. So here you can see that somehow that offset.set() somehow manages to:

To emphasize the downward movement direction, here's the clip when I set the offset without the skin.scale (so just rotation & position):

https://github.com/sketchpunklabs/ossos/assets/19264532/72fb649e-c856-49cb-abdc-b793c0ffb8e0