My model is exported in invalid coordinate

Hello, people. I’m writing a demo application to learn panda3d now but I have a problem to export .egg file using YABEE.

When I rotate my expoted model in panda3d, it rotate in opposite direction. In other words, when I rotate the node (model) 90 degree clockwise using setH() method, its geometry rotate 90 degree in counter clockwise.

I investigate this problem and found a quick solution. I set the “Visual Transform” of my model to (-1, -1, 1) in blender, It worked fine. But when I inspected the file I exported in the way I described above, I found another problem. the matrix of my model was set to something like this:

{ Z-up }
… some materials here…
Plane.001 {
-1.0 0.0 0.0 0.0
0.0 -1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0

I think this caused by the difference of the coordinate system between blender and panda3d. But I expect the transform of my model become Identity matrix to avoid the confusion when I’m writing a script to transform local/global coordinate.

I think I made a mistake when I was making my model in blender or there is some option to fix this in YABEE or panda3d but I couldn’t find either of them. Anybody know how to fix this problem correctly??

Thanks for reading, and I’m sorry if my English is hard to read. I’m not good at it :frowning:

it’s not a problem. Rotate -90 degrees clockwise. :slight_smile:

As far as I know, Blender and Panda3D used the same coordinate system, Z-up. Something else must be wrong. Perhaps there is a negative scale component applied to the object in some way? Or some parent object has the wrong scale or rotation?

As a workaround you can call flattenLight() on the model in Panda3D to tell Panda to apply the transform to the vertices, which would essentially set the transform to identity.