How To Use Quaternion Rotation In Blender
Don t be frightened by the length.
How to use quaternion rotation in blender. My temporary solution current looks like. Blender is the free open source 3d content creation suite available for all major operating systems. Inverting or conjugating a rotation quaternion has the effect of reversing the axis of rotation which modifies it to rotate in the opposite direction from the original. Before explaining how these rotations work we ll need to define a few terms first. Quaternions are 3d rotations performed by the multiplication of quaternions.
For rotation quaternions the inverse equals the conjugate. 4d if intializing w x y z 3d if used as an axis of rotation. I am writing a blender exporter for my scene format. Open blender delete the default cube add a monkey and switch the rotation mode to quaternion i know not much of a challenge yet for most of you but wait fill in the w x y z fields so that suzanne rotates 180 around the axis that goes through 0 0 0 and 3 4 5. I used the rotatex rotatey and rotatez functions to rotate a box in 3d.
Here s the basics of quaternion rotations may not be entirely clear and it glosses over some stuff. I ran into problems like gimbal lock when using this method. For those who are interested let s continue it here. When exporting i need the rotation as quaternion. So for rotation quaternions q 1 q q 0 q 1 q 2 q 3.
It s actually pretty simple. A bit of a discussion about quaternion rotations started on this thread but it was off topic. In my project i have used a complimentary filter to generate yaw roll and pitch angles. We provide daily news art and tutorials. Quat quaternion 1 2 3 4 quat quaternion axis angle quat quaternion quat quaternion 180 list parameters.
The easiest way i found is to use the rotation quaternion but this member only guarantees to store the rotation when the rotation mode is set to quaternion. Follow blendernation twitter facebook google tumblr pinterest. Now i m using a quaternion based complimentary filter to generate quaternions that represent the orientation of the box. 1 in computers everything is represented by numbers. Numbers make up everything we do on computers including blender.