Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

a2k

quaternions

This topic is 6905 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

i''m working on a 3d game that requires motion on all axes. is quaternions really the way to go, or should i just stick with the ol'' trig matrices? quaternions look pretty ugly, and am wondering if they''re worth learning. a2k

Share this post


Link to post
Share on other sites
Advertisement
It depends on what you want to do.

If your objects can be at any orientation at any time and you want the objects to rotate left/right, up/down and clockwise/counter-clockwise. Then you will definitly want to use quaternions.

If your objects are going to be at a certain orientation (for a player charater in a FPS or a 3D RPG may rotate around the y axis (turn left and right) and around the x axis (lean forward or lean backward) then you don''t have to use quaternions.

TC

Share this post


Link to post
Share on other sites
Yes.. if you want to avoid gimbal Lock and smooth interpolation (camera position)

They are not too bad unless you really want to understand why they works.. most of the time , just take the maths..

Share this post


Link to post
Share on other sites
yeah, it's gonna be a flight type of game, so what advantages would i get by using quaternions, and what's the learning curve?

any good links to some documentation? the ones in the programming section on gamedev aren't the greatest...

a2k

Edited by - a2k on 5/1/00 9:51:16 PM

Share this post


Link to post
Share on other sites
There is no learning cureve I decided to go for quaternions in my 3D engine (which is made for a 3D space racing game), and I switched from matrices to quaternions in about three or four hours. Of course, you still have to use matrices when transforming your vertices in the rendering pipeline, but that''s just a matter of converting the quaternion to a matrix and adding the translation.

Check this out: Matrix & Quaternion FAQ


/ LC

Share this post


Link to post
Share on other sites
Try www.gamasutra.com

and search for Nick Bobbit''s article..

Also, Jeff Lander''s has some good quaternion tutorials but in OpenGL
www.darwin3d.com

Just take note the normalization function in the Quaternion FAQ is wrong. The maintainer has confirmed the bug with me but not yet posted an update.

About learning curve, depends on how much you want to get into.. I took a very long time, but then I am new to 3D and doing something totally way beyond my capability.

Share this post


Link to post
Share on other sites
hey lord chaos, you got any screenshots of your space racing game?

a2k

Share this post


Link to post
Share on other sites
Yes I have, but nothing I want to show to the public at the moment We have planned to have a first demo finished in two weeks.

/ LC

Share this post


Link to post
Share on other sites
cool. i'm looking forward to it.

also, are there any good quaternion implementations out there, or do i have to make one myself?

a2k

Edited by - a2k on 5/2/00 8:31:37 PM

Share this post


Link to post
Share on other sites
If you''d like to see a demo that uses quaternions. Checkout my page:

www.mindspring.com/~tim.craig/test/ControllerTest.html

It works with IE 4, IE 5 and Netscape 4.7 browsers (Although someone told me it dosen''t work on NS 4.7 on win NT).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!