Hey Guys,
I have a question regarding some issues I have run into while building my engine, mainly working with matrices. My problem is that I have found that I want to be able to change things like scale, rotation and translation of my objects at run time, but I also want to be able to retrieve the scale and rotation at run time.
For instance, I just got my animations going, so to test out something cool I was going to do a Paper Mario style turn where the sprite actually flipped to turn, the trouble is that I need to track the rotation of the sprite to do this. This is where things get hard with matrices, at least the math library I am using.
If I desire to get the rotation of my matrix in euler angles (or even radians), I have to do some heavy calculations to get it right. Even harder, if I want to do the same retrieval for the scale from the matrix, I am heavily restricted as to under what conditions extracting a scale matrix is even possible.
I have borrowed a book from a friend and it talks about how bone animation transforms are often represents using an SQT, which is a scalar, qauternion and transform vector used in conjunction with one another. This seems to be ideal, although the only thing I can see being an issue is that OpenGL works with matrices, so I would need to generate matrices from this SQT to actually transform the object.
Does anyone have any experience or know wether using SQT's is common place, and what kind of pros and cons am I looking at (aside from OpenGL not natively using it)
I have a question regarding some issues I have run into while building my engine, mainly working with matrices. My problem is that I have found that I want to be able to change things like scale, rotation and translation of my objects at run time, but I also want to be able to retrieve the scale and rotation at run time.
For instance, I just got my animations going, so to test out something cool I was going to do a Paper Mario style turn where the sprite actually flipped to turn, the trouble is that I need to track the rotation of the sprite to do this. This is where things get hard with matrices, at least the math library I am using.
If I desire to get the rotation of my matrix in euler angles (or even radians), I have to do some heavy calculations to get it right. Even harder, if I want to do the same retrieval for the scale from the matrix, I am heavily restricted as to under what conditions extracting a scale matrix is even possible.
I have borrowed a book from a friend and it talks about how bone animation transforms are often represents using an SQT, which is a scalar, qauternion and transform vector used in conjunction with one another. This seems to be ideal, although the only thing I can see being an issue is that OpenGL works with matrices, so I would need to generate matrices from this SQT to actually transform the object.
Does anyone have any experience or know wether using SQT's is common place, and what kind of pros and cons am I looking at (aside from OpenGL not natively using it)
PC - Custom Built
CPU: 3rd Gen. Intel i7 3770 3.4Ghz
GPU: ATI Radeon HD 7959 3GB
RAM: 16GB
Laptop - Alienware M17x
CPU: 3rd Gen. Intel i7 - Ivy Bridge
GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
RAM: 8GB Dual Channel DDR3 @ 1600mhz
CPU: 3rd Gen. Intel i7 3770 3.4Ghz
GPU: ATI Radeon HD 7959 3GB
RAM: 16GB
Laptop - Alienware M17x
CPU: 3rd Gen. Intel i7 - Ivy Bridge
GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
RAM: 8GB Dual Channel DDR3 @ 1600mhz