Stanford-TML / EDGE

Official PyTorch Implementation of EDGE (CVPR 2023)
https://edge-dance.github.io
MIT License
454 stars 68 forks source link

SMPL-to-FBX convert error #1

Closed KevinGoodman closed 1 year ago

KevinGoodman commented 1 year ago

Thanks for sharing the work! I try to convert the pred motion to FBX but get this error:

Traceback (most recent call last):
  File "SMPL-to-FBX/Convert.py", line 45, in <module>
    fbxReadWrite.addAnimation(pkl_name, smpl_params)
  File "/EDGE/SMPL-to-FBX/FbxReadWriter.py", line 93, in addAnimation
    lCurve = node.LclRotation.GetCurve(lAnimLayer, "X", True)
AttributeError: 'NoneType' object has no attribute 'LclRotation'

Any help would be appreciated !

jtseng20 commented 1 year ago

I believe this is because I forgot to add in the ybot.fbx file in the initial commit. As of today, this issue is resolved (#3). Hope that helps.

KevinGoodman commented 1 year ago

Thanks for the quick reply. I simply used the ybot.fbx downloaded from Mixamo website which leads to this error. After replacing with the new uploaded version everything works fine. May I ask where do you get the fbx file ?

jtseng20 commented 1 year ago

I made the FBX file myself, by reskinning the mesh against the smpl skeleton.

lvZic commented 1 year ago

I made the FBX file myself, by reskinning the mesh against the smpl skeleton.

@KevinGoodman @jtseng20 hi, i used some fbx from Mixamo website too. After cvt the joints of Smplobject to the downloaded one. The Convert.py run successfully. However, the result fbx animation is weird, it seems like all the joints are opposite. image I wonder if the ybot.fbx has something wrong with standard fbx from Mixamo website, except for the joints names.

MingCongSu commented 5 months ago

Hi @lvZic Have you successfully converted the SMPL animation to other fbx on Mixamo? I tried as you did and met the same problem.

Thanks for sharing the work! I try to convert the pred motion to FBX but get this error:

Traceback (most recent call last):
  File "SMPL-to-FBX/Convert.py", line 45, in <module>
    fbxReadWrite.addAnimation(pkl_name, smpl_params)
  File "/EDGE/SMPL-to-FBX/FbxReadWriter.py", line 93, in addAnimation
    lCurve = node.LclRotation.GetCurve(lAnimLayer, "X", True)
AttributeError: 'NoneType' object has no attribute 'LclRotation'

Any help would be appreciated !

lvZic commented 5 months ago

Hi @lvZic Have you successfully converted the SMPL animation to other fbx on Mixamo? I tried as you did and met the same problem.

Thanks for sharing the work! I try to convert the pred motion to FBX but get this error:

Traceback (most recent call last):
  File "SMPL-to-FBX/Convert.py", line 45, in <module>
    fbxReadWrite.addAnimation(pkl_name, smpl_params)
  File "/EDGE/SMPL-to-FBX/FbxReadWriter.py", line 93, in addAnimation
    lCurve = node.LclRotation.GetCurve(lAnimLayer, "X", True)
AttributeError: 'NoneType' object has no attribute 'LclRotation'

Any help would be appreciated !

The fbx from Mixamo cannot be used directly. U can use retargeting or transform joints manually.

MingCongSu commented 5 months ago

The fbx from Mixamo cannot be used directly. U can use retargeting or transform joints manually.

What do you mean about transforming joints manually? like modifying the joints in SmplObject class?

https://github.com/Stanford-TML/EDGE/blob/17c3428669ed6733edd9d8c66f7dc62060b8e46d/SMPL-to-FBX/SmplObject.py#L10

lvZic commented 5 months ago

The fbx from Mixamo cannot be used directly. U can use retargeting or transform joints manually.

What do you mean about transforming joints manually? like modifying the joints in SmplObject class?

https://github.com/Stanford-TML/EDGE/blob/17c3428669ed6733edd9d8c66f7dc62060b8e46d/SMPL-to-FBX/SmplObject.py#L10

The initial rotation is not same for some joints between Mixamo and ybot.fbx. It can be seen in UE/Blender clearly. U can transform each joint then.