{"id":89,"date":"2013-11-08T15:46:23","date_gmt":"2013-11-08T15:46:23","guid":{"rendered":"\/\/3dbym.ru\/2013\/11\/taking-position\/"},"modified":"2013-11-08T15:46:23","modified_gmt":"2013-11-08T15:46:23","slug":"taking-position","status":"publish","type":"post","link":"https:\/\/3dbym.ru\/2013\/11\/taking-position\/","title":{"rendered":"Taking Position"},"content":{"rendered":"
Using the information you have already read, you could try to imple\u00adment skeletal animation. However, you haven\u2019t learned about how the parent joints actually affect the child joints. Simply using the keyframes would cause every joint to move independently of the rest, probably producing a strange, contorted mess.<\/p>\n
This section talks about how to change this so that the joints work together. The first thing you do is build a transformation matrix for each point using the data from the current rotation and translation keyframes. A transformation matrix can be built by first generating the three rotation matrices and translation matrix as shown in Chapter 1. Multiplying the three together will produce a final transformation matrix. Alternatively you can use the SetRotation and SetTranslation functions in the matrix classes to avoid having to build and multiply the matrices yourself. This matrix is called the relative matrix.<\/p>\n
Next, you need to calculate what is called the absolute matrix. The abso\u00adlute matrix is the joint\u2019s relative matrix multiplied by its parent\u2019s abso\u00adlute matrix. The absolute matrix tells you the joint\u2019s absolute transfor\u00admation. This includes its relative transformations, as well as all of the transformations any joints before it in the hierarchy have made. This is what allows other joints to move as a result of moving a joint farther up in the line. Consider, for example, how your elbow moves when you move your shoulder. This begs the question: how do you calculate the<\/p>\n
<\/p>\n
\n<\/td>\n<\/tr>\n<\/table>\n <\/p>\n very first absolute matrix? Keep in mind that the root joint has no parent. Therefore, its absolute matrix is the same as its relative matrix.<\/p>\n
|