DeepMotionEditing / deep-motion-editing

An end-to-end library for editing and rendering motion of 3D characters with deep learning [SIGGRAPH 2020]
BSD 2-Clause "Simplified" License
1.58k stars 256 forks source link

Error in forward kinematics #216

Closed abcyzj closed 1 year ago

abcyzj commented 1 year ago

https://github.com/DeepMotionEditing/deep-motion-editing/blob/74fff8fb35e6378351d03fb14ee22fccae28b0bf/retargeting/models/Kinematics.py#L75 The above line of code is wrong. It should be

result[..., i, :] = torch.matmul(transform[..., pi, :, :], offset[..., i, :, :]).squeeze() 

I've already double-checked that with the modified line, the results are coherent with Blender BVH Importer's results.

PeizhuoLi commented 1 year ago

Hi, thanks for opening the issue. However, as we are using edge representation (see Sec. 4.1 Motion Representation of the paper), the implementation is different from the BVH convention (here is the implementation of FK in another project using the BVH convention, and this one is the same as what you are posting here).

abcyzj commented 1 year ago

Sorry, I got confused. Thanks for your explanation.