Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when using handle --use-euler-rotation Y-up flips to Z+ axis #75

Open
wave-electron opened this issue Oct 9, 2018 · 3 comments
Open

Comments

@wave-electron
Copy link

@kcoley When using the --use-euler-rotation handle the Y-Up flips to Z+ axis. I've included the input GLTF for with and without euler handle.

using_euler_Y-up-Flips+Z.zip

@wave-electron
Copy link
Author

@kcoley To fix the orientation, I did the following. I haven't check all cases.

# under line 453 added  
 UsdGeom.SetStageUpAxis(self.stage, UsdGeom.Tokens.z)

# Changed 
       #return (usd_node.AddRotateXYZOp(opSuffix='rotate'), convert_rotation)
        return (usd_node.AddRotateZXYOp(opSuffix='rotate'), convert_rotation)

The rotations are about jittery, and its got a gimbal lock... but I'm slightly closer to result I want than before!

@wave-electron
Copy link
Author

@kcoley I just checked and that workaround is not going to work for all cases. One temporary solution would be to add handle for switching between the Up-axis from Y -> Z. But with the jitter and gimbal lock still an issue its not usable animation in any case.

@kcoley
Copy link
Owner

kcoley commented Oct 10, 2018

@wave-electron I see. I need to find out what is causing the jittering to occur. It could be an issue with my interpolation code in Animation. As for the rotation, I saw an answer posted in the USD forums that might provide another workaround. Another thought would be to use animated transform matrices for rotation and see if that works per key frame

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants