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

Update bvh_parser.py #82

Closed TheCrazyT closed 4 years ago

TheCrazyT commented 4 years ago

For me that little detail caused problems. No idea why it doesn't cause problems on the example data. Maybe depends on the order the bones appear in the bvh. For example for me it created 3 times the same bone in the corps array. (The bone "Spine1_split", because "Spine1" was part of the name).

And that caused an error while tryint access an invalid index at: https://github.com/TheCrazyT/deep-motion-editing/blob/4b5b47916131ebd45dc37c8a8d14440d25fda0cd/retargeting/datasets/bvh_parser.py#L190

jdbodyfelt commented 3 years ago

A nice feature might be to switch from lists to dictionaries (or even a class) on the skeletal info like corpus & end-effectors.

PeizhuoLi commented 3 years ago

We kept using list mainly because we need to keep the order as described in the comment. It's important to keep the order of

root joint, then left leg chain, right leg chain, head chain, left shoulder chain and right shoulder chain

so the latent space will have the same order thus using decoder_B to decode a latent variable from encoder_A makes sense.