• Advertisement
Sign in to follow this  

From 3DS MAX z-up quaternion to y-up quaternion

This topic is 3025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How would I go about converting a z-up quaternion in 3ds max to something my game can use in the directx, y-up, left-handed system? Thanks ahead of time.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
How would I go about converting a z-up quaternion in 3ds max to something my game can use in the directx, y-up, left-handed system?
The DirectX coordinate system isn't really 'y-up', nor is it strictly left-handed (at least that's my understanding - I believe there are both left-handed and right-handed versions of all the transform functions where handedness matters).

As for the up axis, the y axis is up in DirectX in view space, but you should be able to make any axis the 'up' axis in world space. So in short, I wouldn't assume that a conversion is necessary (unless of course you prefer to use different conventions in your simulation than 3DS Max uses).

Share this post


Link to post
Share on other sites
I can't make my game use the coordinate system of max, because then I would need to convert models from other programs to that coordinate system as well. I'm trying to keep everything in my game's coordinate system. If there is no easy way to do this then I will try to get euler angles from maxscript and convert that way.

Share this post


Link to post
Share on other sites
A hint for you is that quaternions in max are already left handed. I also know I spent a month wrestling with this problem until I found this little tidbit in the documentation.

I do not know the answer for certain because all of the engines that I've used are right handed internally, so they invert the quaternion to a right-handed system for use in the engine, then convert back into left-handed by the D3D rendering system.

Also quaternions are not z-up or y-up. They are left or right. You can have a right-handed frame that has Y-up - which axis is up is an arbitrary decision of the engine developer.

Share this post


Link to post
Share on other sites
Quote:
Also quaternions are not z-up or y-up. They are left or right.
Strictly speaking, quaternions aren't 'left or right' either. A quaternion taken by itself has no intrinsic handedness; it's only when expressed in a coordinate system that a quaternion (or any rotation) takes on a handedness.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement