Animation not working when in y-up left coordinates (SOLVED)

Hello. I am new to Panda3d and I was messing around with Actors. I found some animation from Mixamo and downloaded it as a .fbx file. Then, I opened it up in blender and saved it as a blend file. Finally, I used blend2bam to convert it to a .bam file.

At first, when I loaded it into panda3d, it worked fine. However, when I changed panda3d’s coordinate system into y-up left axis using this code:

loadPrcFileData('', 'coordinate-system y-up-left')

the animation was messed up.

The animation was a person walking, using the default character from Mixamo.

Here is the correct animation:
image

Here is the messed up one:
(I cannot embed it here as new users cannot embed more than one media somehow)

Can someone tell me what happened?

Here is the messed up animation
image

Greetings, and welcome to the forum! I hope that you find your time here to be positive! :slight_smile:

At a guess, it may be that the coordinate system specified in the model-file is clashing with the one that you’ve specified, resulting in your joint rotations being incorrect.

What I might suggest is to take your “.bam” file and run it through the “bam2egg” command-line application, thus producing a human-readable “.egg” file.

Like so (within a terminal or command-line):
bam2egg myModelFile.bam myModelFile.egg

Open this file in an appropriate text-editor–being careful of your choice if it’s a large file–and look for a tag named “”. There, check to see whether the value of the tag matches your new coordinate system, and if not, change it to match.

Now load this “.egg” file in your program and see whether it works!

And as an optional final step: if you want to stick with the “.bam” format, you can perhaps run your “.egg” file through “egg2bam”, much as you did with “bam2egg”.

Thanks for your reply. Now it works! However, do I have to do this step everytime when I download an animation? If there is no solution to that, it’s okay as I would just continue using the default coordinates.

It’s my pleasure! And I’m glad that it works! :slight_smile:

I imagine that it depends on what coordinate system the model was made with: if it’s the same as yours, then it should be fine; if not, then conversion might be called for.

It might also be worth browsing around online for a tool to perform this conversion for you–or perhaps better, looking at Blender to see whether it can be done there.

If I may ask, why are you using the “y-up-left” coordinate system?

I am using “y-up-left” because I am used to the y axis pointing up and z axis pointing forward. Somehow a few 3d software I was exposed to before uses y-up-left coordinates, so I thought that y-up-left was the conventional one, but after searching up the conventional coordinates, it seems like the Z axis points upwards. I would have to shift my preference to the conventional one as there are many software that uses so. Nevertheless, thanks for your suggestion!

Ahh, fair enough! Well, thank you for the explanation! :slight_smile: