Archived

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

executor_2k2

Squad

Recommended Posts

Squad takes four quaternions. Where do I get the four quaternions from? With slerp there are only two because you go from one spot to another, but why are there four with squad? Anyone know a good article to demystify the squad algorithm? Thanks.

Share this post


Link to post
Share on other sites
My guess is that you need two more to fully establish the boundary conditions, i.e. the initial and final ''velocities'' of the interpolation, just like with splines.

[Questions (STFW) | GDNet Start Here | GDNet Search | Forum FAQ | Google | Asking Smart Questions ]
[Docs (RTFM) | MSDN | SGI''s STL | OpenGL | File formats]
[C++ Must Haves (RTFS) | MinGW | Boost | Loki | FLTK | SDL ]

Stolen from Magmai Kai Holmlor, who held it from Oluseyi, who was inspired by Kylotan...

Share this post


Link to post
Share on other sites
From the directx documentation for D3DXQuaternionSquad:


"This function uses the following sequence of spherical linear interpolation operations: Slerp(Slerp(pQ1, pC, t), Slerp(pA, pB, t), 2t(1 - t))"

where the argument order is

pOut, pQ1, pA, pB, pC, t

Try working out what it does as t goes from 0 to 1 to visualise it.

Share this post


Link to post
Share on other sites