[tuhopuu-cvs] CVS commit: tuhopuu3/intern/iksolver/intern IK_QChain.cpp IK_QChain.h IK_QJacobianSolver.cpp IK_QJacobianSolver.h
Brecht Van Lommel
blendix at pandora.be
Wed Feb 9 17:10:48 CET 2005
blendix (Brecht Van Lommel) 2005/02/09 17:10:48 CET
Modified files:
tuhopuu3/intern/iksolver/intern IK_QChain.cpp IK_QChain.h
IK_QJacobianSolver.cpp
IK_QJacobianSolver.h
Log:
Some performance tweaking for the IK solver module:
Suppose we have n joints and m constraints (m is always 1 currently) in a
chain. This gives us a Jacobian matrix of m*3 rows and n*3 columns.
SVD decomposition requires rows >= columns, so the Jacobian used to be
filled up with zero's to make it a (n*3)x(n*3) matrix.
The trick now is to decompose the *transposed* Jacobian. This leads to a
smaller Jacobian used for SVD decomposition, and also smaller matrices later
on in the Jacobian inversion code.
For those who like complexite theory, this means we turned a O(n^2 * m) algo
into O(n * m^2).
In my test files this takes away about 30% IK computation time. This only
affects the IK solver performance of course, which is a small part of the
whole armature code, so don't expect any noticable performance increase.
I might have broken something, so if it gives different results in your
files I'd like to know, but in my 2 test files the results seem identical.
Revision Changes Path
1.2 +8 -4 tuhopuu3/intern/iksolver/intern/IK_QChain.cpp
<http://projects.blender.org/viewcvs/viewcvs.cgi/tuhopuu3/intern/iksolver/intern/IK_QChain.cpp.diff?r1=1.1&r2=1.2&cvsroot=tuhopuu>
1.2 +6 -2 tuhopuu3/intern/iksolver/intern/IK_QChain.h
<http://projects.blender.org/viewcvs/viewcvs.cgi/tuhopuu3/intern/iksolver/intern/IK_QChain.h.diff?r1=1.1&r2=1.2&cvsroot=tuhopuu>
1.2 +43 -20 tuhopuu3/intern/iksolver/intern/IK_QJacobianSolver.cpp
<http://projects.blender.org/viewcvs/viewcvs.cgi/tuhopuu3/intern/iksolver/intern/IK_QJacobianSolver.cpp.diff?r1=1.1&r2=1.2&cvsroot=tuhopuu>
1.2 +5 -2 tuhopuu3/intern/iksolver/intern/IK_QJacobianSolver.h
<http://projects.blender.org/viewcvs/viewcvs.cgi/tuhopuu3/intern/iksolver/intern/IK_QJacobianSolver.h.diff?r1=1.1&r2=1.2&cvsroot=tuhopuu>
More information about the tuhopuu-cvs
mailing list