SMPL-to-FBX icon indicating copy to clipboard operation
SMPL-to-FBX copied to clipboard

Blender addon - translation wrong coordinate system

Open pjgalhardo opened this issue 1 year ago • 4 comments

First of all, thanks for your amazing work.

Are you still using y as the up direction in the blender addon? I was opening pkls from the AIST++ dataset, and the coordinate system for the translation was wrong. The translation was fine when I was using your converter. I ended up having to change the coordinates and managed to correct it:

fcurve_x = obj.animation_data.action.fcurves.new(
            data_path=f'pose.bones["Pelvis"].location', index=2
        )
        
fcurve_y = obj.animation_data.action.fcurves.new(
            data_path=f'pose.bones["Pelvis"].location', index=0
        )
        
fcurve_z = obj.animation_data.action.fcurves.new(
            data_path=f'pose.bones["Pelvis"].location', index=1
        )

pjgalhardo avatar Aug 28 '23 17:08 pjgalhardo

Hi pjgalhardo, I use your correction to solve the same issue. Thanks!

For the Convert.py code, I came into the problem of no translation. I am using the newest FBX SDK and Windows platform. Could you share your package versions and platform info so that I can try whether I could get translations with your settings?

Thanks!

JeremyCJM avatar Dec 12 '23 07:12 JeremyCJM

Hello @JeremyCJM, glad my comment helped!

I was using Arch and Blender 3.6.5, with Python 3.7. I don't recall the package versions, but I can look into it if you need me to.

However, have you tried multiplying the translation by a constant? In my case that would happen when I divided the translation by the scale. It'd make sense for it to look like there's no translation, since the differences between positions are just too small for the scale of the body. In the AIST++ dataset, the scale tends to be around 90, so try multiplying the smpl_trans in the FbxReadWriter.py file.

pjgalhardo avatar Dec 17 '23 01:12 pjgalhardo

Hi pjgalhardo, I use your correction to solve the same issue. Thanks!

For the Convert.py code, I came into the problem of no translation. I am using the newest FBX SDK and Windows platform. Could you share your package versions and platform info so that I can try whether I could get translations with your settings?

Thanks!

Scaling the translation values and transposing the axes worked for me. Ideally, start with scaling the translation values to be able to visualize it (even if it's wrong in terms of direction) and then start swapping axes. My solution has been validated with my own recordings.

spthermo avatar Dec 19 '23 14:12 spthermo

hi, @pjgalhardo, Thanks for your help. I am unable to successfully run Convert.py as it has stopped at “lCurve = node.LclRotation.GetCurve(lAnimLayer, "X", True) ” at line 87 of FbxReaderWriter.py. There may be an issue with the format of my pkl file. Can you provide me with the successful pkl file you have run? Thank you very much.

aooliver avatar Dec 22 '23 02:12 aooliver