facebookresearch / AnimatedDrawings

Code to accompany "A Method for Animating Children's Drawings of the Human Figure"
MIT License
10.58k stars 929 forks source link

"In place" flag #301

Open jumpjack opened 2 months ago

jumpjack commented 2 months ago

Can you please add an option to make the character stay in place while moving?

hjessmith commented 2 months ago

Sorry, we don't have the resource to add additional features like this to the codebase. If you want to add that functionality yourself, I'd be happy to review the PR and merge though.

The root position is updated here in the code: https://github.com/facebookresearch/AnimatedDrawings/blob/b8662173d2e1846bda0220da471deef0994c5013/animated_drawings/model/animated_drawing.py#L380

You'd need to:

  1. Add logic to ignore if the flag is set,
  2. Add the flag as a parameter in the Retarget config
  3. Modify config.py to parse and validate the flag
  4. Update the Retarget ReadMe to properly describe the flag

Alternatively, you can just edit the BVH files so there's no root motion within them. That would involve replacing the first 3 values in the motion frame (at the bottom of the BVH) with zeros.

jumpjack commented 2 months ago

I don't know python, I am using the web version of your tool, and I know javascript,; where should I look for which BVH file is loaded?