利用者:Brecht/SummerOfCode2005/Inverse Kinematics Proposal
目次
Summer of Code : Inverse Kinematics Proposal
A copy of the proposal sent to google:
EXTENDING INVERSE KINEMATICS FOR BLENDER
Synopsis:
Inverse Kinematics (IK) is a character animation technique that, based on a skeleton and the position of one or more end effectors, computes the joint angles to reach this position. For example, it is used for computing the relative angles of bones in an arm, in order for the hand to reach a given position. It is much easier to define a single position for the end effector, than to set every single joint angle.
Blender's IK implementation is robust, but lacks functionality and performance. The goal of this project is to extend the IK module in Blender to model skeletons more accurately.
Benefits to the Blender Community:
Blender's animation tools have had little attention for a long time, while initially it's main purpose was exactly animation. Now with the upcoming 'animation recode', better IK tools will also be needed. These tools would make it easier for artists to create natural looking character animation. Also, within the context of an upcoming short movie project [1], entirely produced with open source software, enhanced IK tools would very useful.
Deliverables:
The IK module in Blender will be extended to support: - Translational joints - Tree structured IK chains, with multiple end effectors - Rotational limits for joints - Joint pinning - Parameters like joint stiffness and end effector influence
The main focus of this project will be on the technical implementation of these features. Integration in the user interface will be coded, but mainly for testing and as an example to improve later.
Functionality Details:
Blender's IK module now accepts a single linear chain of spherical joints, and one end effector at the end of this chain.
The proposed extensions will allow for a tree structured chain, so a complete body, instead of just a single arm or leg, can be incorporated into the inverse kinematics computation.
By adding translational joints, and limits on rotational joints, skeletons can be modeled more precisely. Rotational limits can be used, for example, to prevent a knee from bending forward.
Joint pinning is a powerful technique for posing characters. One example usage is to keep a character's feet on the ground, while reaching with his hand for a high target. Using joint pinning, natural poses can be created easily by dragging end effectors.
Lastly, parameters like joint stiffness allow to characterize joint motion. For example, when grabbing an object, a bone in the spine will likely rotate less than a bone in the shoulder.
Implementation Details:
Blender's IK implementation resides in the 'iksolver' module, and was written in C++. It provides a good basis for further extensions. It has a C api, as most of Blender's other code is written C. Most of the work would thus be done in the iksolver module, with modifications to the rest of Blender's code to support this new functionality.
The current IK implementation is based on numerical techniques, where the joint angles are computed with an iterative algorithm based on a Jacobian matrix. This is the common technique used in today's animation packages, as it is very general, known to produce natural looking animations, and allows for a wide range of functionality.
The new functionality will thus build further upon this. Secondary goals like pinned joints and rotational limits would be added by exploiting the redundancy of the system. Translational joints and multiple end effectors can be incorporated into the system by extending the Jacobian.
The numerical system is very sensitive to singularities, and adding more features will not make the situation simpler. Since a balance will need to be found between robustness and performance, it's hard to make any claims about this, but I will try to keep the system as fast as possible.
Development Methodology:
Since the IK module is already in a working state, the goal will be to get some of the simpler functionality working soon. This will allow me to get comfortable with the current code, and become confident before tackling the harder parts.
New code would be posted regularly to an online CVS repository. This both motivates to actually deliver working code often, and will allow for feedback from other developers and users.
Regular builds of the Blender CVS repositories are posted on and downloaded from the development forums [2]. This will allow for user feedback early on in the process.
Considering a rewrite of the animation system will be happening at the same time, communication and cooperation with other developers will be important, in order to deliver the desired functionality and to ease integration.
Project Schedule:
The first week will be used to get to know the code and do some experimenting. After that I will start by adding some of the simpler functionality to gain confidence. Then I will tackle the larger parts, until two weeks before the deadline. These will be used for finishing the last issues, debugging, and optimizing the code.
Bio:
I am a 19 year old student in computer science, in the 2nd bachelor year at a university in Belgium. I have experience using and also developing open source software. My main interests related to coding are in computer graphics and animation.
I started coding 6 years ago. During that time I have worked on many small personal projects ranging from an alternative DNS, a few games, to a website [3], and a website creation tool. As part of my studies I have created a regular expression parser, a game based on the four colors problem and a raytracer.
I have contributed to the FOSS world by writing some tools for the Verse network protocol [4] and working on Blender's UV editor [5][6].
My experience is mostly in C/C++ (3 years), Python (2 years) and Java (5 years). Besides that I have lesser experience in PHP, Javascript, Prolog, Scheme and SQL.
I have been using Blender for 4 years, but have very little experience with the animation code in Blender. I have no experience working on an inverse kinematics system, but have been studying the subject in my free time for the last few months.
The interesting mathematical twist, and the idea of the result being used by artists to create animations, would make this a fun and challenging project for me to passionately work on.
[2] http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewforum&f=18
[4] http://users.pandora.be/blendix/verse/
[5] http://www.blender3d.org/cms/UV-editor___Image_window.222.0.html
[6] http://www.blender3d.org/cms/UV_Unwrapping.363.0.html
-- DeveloperWikiBrechtVanLommel - 21 Jul 2005