c-he / NeMF

[NeurIPS 2022] Official implementation of "NeMF: Neural Motion Fields for Kinematic Animation"
MIT License
156 stars 9 forks source link

how to visualize npz animation in blender #2

Closed Grem-Lin closed 1 year ago

Grem-Lin commented 1 year ago

May I ask how to visualize npz data with the SMPL-X Blender add-on, step by step? I have added the SMPL-X Blender add-on, and imported animation of npz data by using "add animation" of that add-on, but I didn't see the human model move. Sorry, I am new to this. Thanks!

c-he commented 1 year ago

That sounds a bit weird. Could you provide some screenshots and make sure there are no errors when loading npz files?

Grem-Lin commented 1 year ago

Thanks for the quick reply. Screenshot from 2023-01-03 02-22-20 This is the screenshot of what I have. The animation is from amass dataset. I added the animation with SMPL-X Blender add-on's "Add animation" and when I played the animation as shown in the bottom window, the human model didn't move.

I think there are no errors? I didn't see anything wired when adding the animation. Thanks!

c-he commented 1 year ago

Could you attach the npz file as well? I can test it on my side.

Grem-Lin commented 1 year ago

https://drive.google.com/file/d/18KrTSzz945e9yCgNv9aWseghRZUXyRn4/view?usp=share_link

please see the attached link. Github doesn't allow npz attachment.

c-he commented 1 year ago

The data you shared is in SMPL-H format, thus it contains 52 joints (you can see it has the shape of (241, 156) in its poses).

>>> import numpy as np
>>> bdata = np.load("C24 - quick sidestep left_poses.npz")
>>> bdata.keys()
KeysView(<numpy.lib.npyio.NpzFile object at 0x102fccfd0>)
>>> list(bdata.keys())
['trans', 'gender', 'mocap_framerate', 'betas', 'dmpls', 'poses']
>>> bdata['poses'].shape
(241, 156)
>>> bdata['trans'].shape
(241, 3)
>>> bdata['betas'].shape
(16,)
>>> bdata['mocap_framerate']
array(120.)

But the addon only supports SMPL-X format, which requires the skeleton to have 55 joints. Therefore, when you load the npz file in blender, it will throw an error.

Screen Shot 2023-01-03 at 17 47 39
Grem-Lin commented 1 year ago

I see. Thank you!!