• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            天行健 君子當(dāng)自強(qiáng)而不息

            Blending Skeletal Animations(1)

            Blending Skeletal Animations

            You would normally use a series of pre−calculated key−framed animations in your game projects. You create these animations using 3D modeling programs such as discreet's 3DStudio Max or Caligari's trueSpace. Although they served their purpose quite nicely, those pre−created animation sequences did lack one major aspect uniqueness. Once an animation, always an animation meaning that the animations are the same, regardless of how many times you play them.

            Moving into a more dynamic world of animation, the technique of animation blending has become more than a buzz word. What's that you don't know what animation blending is? Animation blending is the ability to take separate animations and blend, or rather combine, them to create a new animation.

            For instance, as Figure 6.1 shows, you can blend an animation of your character walking and another animation of him waving his arm to create an animation of him walking and waving his arm at the same time!

            You don't have to stop with only blending two animations, you could go on to combine three, four, or even ten different animations into one unique animation! With each new animation you add, the possibilities of blending increase exponentially. With only a small set of animations at your disposal, you could literally create hundreds of new animations using animation blending.

            Now, I won't lie to youthe theory and implementation of animation blending is extremely, excruciatingly simple. That's right; animation blending is one of those things that makes you wonder why the heck you weren't doing it earlier. It's that easy! It all has to do with the way you combine the various transformations of the skeletal structure's bones.

             

            Combining Transformations

            Your skeletal animations are merely series of transformation matrices applied to the bones of your mesh's skeletal structure. These transformations include translations, scaling, and rotations. For the most part, the transformations are rotations. The bones rotate at the joint; only the root bone is typically allowed to translate around the world, and even then that's best left up to the world transformation (rather than directly translating the bones themselves). Those points aside, the transformations create the animation.

            As you can see in Figure 6.2, you can create new poses by adding various transformations to the existing transformations of the skeletal structure. For example, to make the skeleton's arm move, add a rotational transformation matrix to the arm bone transformation. Slowly increasing the rotational value added to the bone transformation creates smooth animation.

            Figure 6.2: The skeleton's default pose (on the left) has an associated set of transformation matrices; when combined with animation set transformation matrices, these will create new poses.

            You can see that you achieve animation by combining (through matrix concoction) or directly storing a set of animation transformations with your skeleton's transformation matrices. To smoothly animate a mesh, you can use linear interpolation to scale the animation set's transformation matrices over time.

            So at the most basic level, you are dealing with transformation matrices to create animation; there's one transformation matrix to apply for each bone in the mesh. The pre−calculated key−frame animation set is the source of the transformation matrices that are applied to the bone's transformation.

            Think about thisinstead of taking that single transformation matrix from your animation set (from a matrix key frame or combined from a series of position, translation, and rotation key frames), why couldn't you just take a series of transformations that affect the same bone from multiple animation sets and combine them? After all, you're using matrix concoction to combine multiple transformations, so why not just throw in a few more transformations from multiple animations while you're at it?

            Whoa! You caught me thereyou can't just concoct the matrices and expect the transformations to come out correctly. Think of it: Matrix concoction is non−commutative, meaning that the order in which you multiply the various transformations is crucial. If you were to multiply two transformations that both were rotated and then translated, you would end up with a final transformation that rotates, translates, rotates, and finally translates. That's obviously too much transformation data for a single bone that typically rotates and then
            translates.

            To correct this problem, you need to add the transformations instead of multiplying them. So, for instance, the previous two transformations that rotate and then translate would combine into a transformation that only rotates and then translates (as opposed to rotating, translating, rotating, and finally translating). Adding transformations is perfectly acceptable!

            Adding two matrices (represented by D3DXMATRIX objects) is as simple as the following line of code:

            D3DXMATRIX matResult = Matrix1 + Matrix2;

            From there on, you can use the matResult matrix for your transformations; rest assured, it represents the combined transformations of Matrix1 and Matrix2. To combine more animation transformations, just add another matrix to matResult and continue until you have combined all the transformations you want to use.

            Now that you know this information, you can begin combining the various transformations of separate animation sets.


            posted on 2008-04-25 18:57 lovedday 閱讀(689) 評論(1)  編輯 收藏 引用

            評論

            # re: Blending Skeletal Animations(1) 2009-09-16 11:28 akira32

            How do I combine two animationset(different duartion)?  回復(fù)  更多評論   


            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            公告

            導(dǎo)航

            統(tǒng)計(jì)

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關(guān)鏈接

            搜索

            最新評論

            欧美伊香蕉久久综合类网站| 久久精品国产清自在天天线| 久久久国产打桩机| 国产午夜精品久久久久免费视| 久久精品国产精品青草app| 久久久99精品一区二区| 97精品依人久久久大香线蕉97| 国产成人无码久久久精品一| 久久国产综合精品五月天| 伊人久久大香线蕉AV色婷婷色| 成人国内精品久久久久一区 | 久久久国产99久久国产一| 99精品国产99久久久久久97 | 欧美熟妇另类久久久久久不卡| 99精品国产在热久久无毒不卡 | 色综合久久久久综合99| 久久久久久毛片免费播放| 婷婷久久综合九色综合绿巨人 | 99久久精品影院老鸭窝| 日本亚洲色大成网站WWW久久 | 国产日韩久久免费影院| 伊人久久大香线蕉亚洲| 日产久久强奸免费的看| 97久久超碰国产精品2021| 久久婷婷人人澡人人爽人人爱 | 亚洲国产成人精品无码久久久久久综合 | 久久精品国产秦先生| 亚洲日本va中文字幕久久| 久久婷婷五月综合成人D啪| 久久综合综合久久97色| 潮喷大喷水系列无码久久精品| 无码国内精品久久人妻蜜桃| 无码精品久久一区二区三区| 久久精品国产色蜜蜜麻豆| 国产精品嫩草影院久久| 国产亚州精品女人久久久久久 | 久久久久亚洲AV无码网站| 久久AV高潮AV无码AV| 色综合久久夜色精品国产| 中文字幕久久亚洲一区| 久久中文字幕无码专区|