zju3dv / EasyMocap

Make human motion capture easier.
Other
3.72k stars 457 forks source link

Monocular convert2bvh, root gets the value of "Th" #390

Open eren-ture opened 10 months ago

eren-ture commented 10 months ago

Hi,

I am working on a project where I need to get the same results as the smpl_mesh output in blender. With these commands,

python .\scripts\preprocess\extract_video.py .\0_input\test_02 --mode openpose --openpose ..\openpose\ --handface
python .\apps\demo\mocap.py 0_input/test_02 --fps 30 --mono --mode smpl
blender-2.79a-windows64\blender -b -t 12 -P scripts\postprocess\convert2bvh.py -- 0_input\test_02\output-output-smpl-3d\smplfull --o .\1_output

I am trying to get the .bvh file to import to Blender. What I have noticed is that the .bvh file has the values of the Th output in smpl_full. This results in the root bone moving.

I tried to:

  1. Set the camera to (0, 0, 0) in Blender space, which created movement that wasn't there.
  2. Set the camera to copy the m_avg_root's position. Which eliminated the unwanted movement, but didn't give the same results as smpl_mesh.

When looking at the .bvh output, I see that the root bone is getting the values of the "Th" key. I wanted to know if this is intentional.

Thanks.

eren-ture commented 10 months ago

Manually switching the first 3 coordinate values with the second 3 coordinates results in a stationary camera, but the camera at root is still not the "correct" position.