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

Understand the code. #156

Closed LeVan146 closed 3 years ago

LeVan146 commented 3 years ago

Hi guys, I'm self-learning about this project. So I have difficulty understanding some code/setting/meaning in this project. I hope you can explain some questions for me. Thank ^^

My first question is What is the offset? Why we only need 1 xia offset for all data point?

The second is why we have to update transform by its parent transform? https://github.com/DeepMotionEditing/deep-motion-editing/blob/19604abdc0ead66f8c82d9211b8c5862c6a68089/utils/animation_data.py#L34-L35

Moreover, I hope you can give me some good books to learn about the math behind skeleton in animation. Because when I search in google, most of the result only gives me about code from Unity without math equation behind it.

kfiraberman commented 3 years ago

Hi, the "offsets" represent the bones of the skeleton. You can think of it as a set of 3D vectors, where each vector connects between two joints. In the style transfer work, we assume that the skeleton is fixed, so we need one set of "offsets".

The reason for the "parent" transform is that in animation it's common to work in a hierarchical structure (of joints).

To get more details, I suggest learning about the BVH representation (the common format for representing skeletal animations). This post shares some good resources for that. Good luck!

LeVan146 commented 3 years ago

Thank you for your advice ^^