Hey, I tried. Arguing further just isn''t worth the energy.
Every once in a while someone asks "Why do professional game developers so rarely hang out on forums like this?" Well... this is one big reason why.
LordKronos: Thanks for discussing things in a non-inflamatory way. The March - May 2002 issues of Game Developer are going to be pretty quaternion-heavy, and I talk about how to do all kinds of useful things with them, so maybe this will sway your opinion further. The March article is about how to interpolate rotations much, much faster than the standard slerp (though still using quaternions). April and May are about doing really fast inverse kinematics, again using quaternions.
Using a 3x3 rotation matrix does have one clear advantage over quaternions: it''s faster to transform points (faster in terms of CPU count; though you do touch more memory, if you''re talking about having a big array of transformations). If you are going to do something like transform a big mesh, it is clearly better to use the 3x3 representation to do that. But what most people do these days is convert their quaternion, which they use as their native rotation representation, into a 3x3 matrix, then transform everything.
Keep in mind that a 3x3 takes over double the storage space that a quaternion does, so it''s not the kind of thing you want to keep around in bulk.
-Jonathan.
Locking 'roll' in Quarternions
quote:
Original post by Fruny
Now, for a way to prevent it, assuming you are rotating around X and Y, you can manually reset the Z coordinate of you quaternion to 0 and then renormalize it. Since the (X,Y,Z) coordinates of the quaternion can be read as the axis around which you rotated, killing Z will kill the rotation around Z, that is, the roll. Do not forget to renormalize .
Yes. It kills ''roll'', but then i can''t ''pitch'' and ''yaw'' normally.
quote:
Original post by Anonymous Poster
Every once in a while someone asks "Why do professional game developers so rarely hang out on forums like this?" Well... this is one big reason why.
-Jonathan.
Threads like these (minus the egos) is why I keep coming back.
*bookmarks thread for future reference.
About 2 years ago I was trying to do the same thing with euler angles, but in my case it was a chase camera following a ''boid'' that was ''flying in an enclosed space. The idea was for the camera to swoop and dive while naturally tending towards zero roll (it would roll but correct itself). No dice

Then I heard about quaternions. They are now incorporated into my base object classes. Took me about 1 week (of frustration) to understand what was going on, and since then I have never looked back.
D.V.
Carpe Diem
D.V.Carpe Diem
bpj1138:
if you dont like quaternions, i''ll suggest you dive into 3x3matrices. lordkronos uses them, and i bet you can understand and use them as well. and you''ll see that they are much bether than standart euler angles for arbitary rotations.
THEN
when you got that, you write a quaternion class. with all the functions your matrix3x3rotation class does have. then you search_and_replace("matrix3x3rotation","quaternionrotation"), and you''ll see that your code still works. quaternions are not different to 3x3matrix if you use them for rotations only. the power of quaternions is now that they a) are smaller b) are faster to do most math with them and c) they just represent rotations (and scalings, wich you can easy get rid of if you normalize them)
whats the power of c)? do you want that a velocity vector can rotate? do you want that objects can fall upwards while gravity points downwards? no, normally not. so you use exactly the stuff you want, and not additional stuff that you don''t want. quaternions are simply rotations, while matrices are general transformations and like that yield to sideeffects (and i''ve seen them yet, and they are terrible
)
and no, there is nothing misterial to quaternions, they are simply an axisangle where you yet have sine and cosine in. ever worked with complex numbers? then you know how quaternions look like..
"take a look around" - limp bizkit
www.google.com
if you dont like quaternions, i''ll suggest you dive into 3x3matrices. lordkronos uses them, and i bet you can understand and use them as well. and you''ll see that they are much bether than standart euler angles for arbitary rotations.
THEN
when you got that, you write a quaternion class. with all the functions your matrix3x3rotation class does have. then you search_and_replace("matrix3x3rotation","quaternionrotation"), and you''ll see that your code still works. quaternions are not different to 3x3matrix if you use them for rotations only. the power of quaternions is now that they a) are smaller b) are faster to do most math with them and c) they just represent rotations (and scalings, wich you can easy get rid of if you normalize them)
whats the power of c)? do you want that a velocity vector can rotate? do you want that objects can fall upwards while gravity points downwards? no, normally not. so you use exactly the stuff you want, and not additional stuff that you don''t want. quaternions are simply rotations, while matrices are general transformations and like that yield to sideeffects (and i''ve seen them yet, and they are terrible

and no, there is nothing misterial to quaternions, they are simply an axisangle where you yet have sine and cosine in. ever worked with complex numbers? then you know how quaternions look like..
"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement