青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

永遠也不完美的程序

不斷學習,不斷實踐,不斷的重構……

常用鏈接

統計

積分與排名

好友鏈接

最新評論

Skeletal Animation Blending(轉)

轉自:http://www.circlesoft.org/DirectMesh2/DM2Spec/pages/Features.htm

2 Features


This section describes the major features of DM2, in basic form.  While the functionality of these features will be discussed, more detailed information about their implementation will be given later.

     
      


2.1 Skeletal Animation

DirectMesh v2.0 will use skeletal animation as it's primary form of frame-based movement.  Skeletal animation is based on bones, which are in turn connected to individual vertices.  These vertices act as a "skin" on top of the bones. 

Unlike keyframe animation, where each and every vertex is animated, skeletal animation consists of transforming only the bones.  The bones then act on the assigned vertices, providing the expected deformation.  Since this is how the human body actually works, it is an ideal scheme for character animation.

These vertex deformations will be processed in a vertex shader, on GPU hardware.  If the required hardware is not available, the animation interfaces will fall back to a software implementation.  Leveraging the GPU to perform these transforms will minimize the performance hit that is normally associated with skeletal animation.

The software implementation will also be available for use even if hardware support is present.  This could be useful in situations where the same pose must be rendered multiple times.  In this case, it is a waste to skin the mesh for each time, considering that it can be done in software once and applied to all subsequent renders.

Each vertex will have a maximum of 4 attached bones.  This is to accommodate for the limitations of current graphics hardware, file size, and memory usage.  A case of 5 or more bones acting on a single vertex is usually uncommon, anyways.

This maximum of 4 attached bones will be able to be changed at runtime.  This can be useful in situations where dynamic level-of-detail (LOD) is critical.  For example, if a model is far away from the viewpoint, the number of active bones can be lowered to prevent wasted transforms.  If the models moves closer to the viewpoint, the number of active bones can be raised again.


2.2 Morph Targets

A morph target is a keyframe of a mesh (or a portion of a mesh) in a specific pose.  Each morph target is blended with the base mesh by a certain percentage, where 0% has no effect on the mesh and 100% has full effect on the mesh.  This percentage can be animated, providing smooth transitions between targets.  When a morph target exhibits an effect on the base mesh (that is, it's blend percentage is greater than 0), it is said to be "active". 

This morphing technique is very useful for situations where a high amount of detail is required.  Since using bones is not practical in such situations,  morph targets are used instead.  A prime example is facial animation, since individual vertices must be tweaked to get the exact pose required.

Multiple morph targets can be active during the same frame.  For example, the face of a character may have a "winking" morph target and a "smiling" morph target.  These two targets can be blended together with the base mesh to generate a model that is both "winking" and "smiling".

Due to the complexity of morph targets, they must be processed in software.  For this reason, there is no limit to the number of morph targets per mesh.  However, more morph targets will result in increased memory usage and file size.  Also, there is no limit to the number of active morph targets, although more active morph targets will result in a performance hit.

Skeletal animation and morphing can both be used simultaneously.  After all of the active morph targets are composted into a dynamic buffer, the processed mesh will be deformed by the skinning shader.  This provides a very flexible solution, in which both quick, efficient animation and detailed animation can be combined.

For a practical example of morphing, consider our friend Johnny:

Johnny has the following morph targets defined:

We can now combine these morph targets in any way that we like.  For example:


2.3 Subsets

A subset is a group of faces that share the same material.  A DirectMesh model can be divided up into multiple subsets, allowing for different materials to be used throughout the mesh.  This can be very useful when modeling, since most real-world objects and characters are actually composites of different parts.

Depending on the number of active bones, there may be more transformation matrices than constant registers in the skinning shader.  If this occurs, the mesh must be split up into multiple subsets, based on each face's active bones.  This is done so that the shader will always have registers available for the matrices.

Below is a table of the default maximum number of bones per subset, based on each vertex shader model.  Note that 12 or 16 constant registers will always be left over, in case the shader needs to store custom data.  Since each bone transformation matrix is 3x4 (3 rows by 4 columns; the perspective vector does not need to be store), every bone takes up 3 constants (each constant register holds a float4, and a matrix is 3 float4's).

Vertex Shader Model Minimum Constants Available Constants Left Over Bone Matrices Available
vs_1_1 96 12 28
vs_2_0 256 16 80
vs_2_x 256 16 80
vs_3_0 256 16 80

It is important to note that these values are only the recommended defaults.  A new value may be specified at runtime (the maximum number of active bones per subset is 255), and the subsets will be reconfigured automatically.  This is to accommodate for both shaders that need additional constant space and for substantially different hardware.

Since each subset has different device-related properties, each subset must be rendered independently.  For this reason, it is best to keep the number of subsets as low as possible.
 


2.4 Material Manager

DM2 files can contain information defining a mesh's material.  A material includes the selected shader, constant values, and textures.  This will allow the artist to easily export the material properties along with the base mesh and its animations.

At runtime, the DirectMesh interfaces can automatically load all vertex shader, pixel shader, and effect files.  Textures can also be dynamically loaded.  Before rendering, DirectMesh will setup the shader, its constants, and the textures.  No outside intervention is necessary.  However, since this tightly integrates the material system and DirectMesh, complete material management will be optional.  Some developers may prefer to handle material-related events themselves.


2.5 Animation Blending

An Animation Stage represents an individual, active animation that can be blended with other stages to form the final pose of the mesh.  In order to combine the Animation Stages, two types of animation blending are implemented within the pipeline:  additive blending and transitional blending.

2.5.1 Additive Blending

Additive blending is used to combine multiple Animation Stages.  Essentially, it overlays multiple Animation Stages on top of one another, enabling multiple animations to be playing at the same time.   There is no limit to the number of additive blends, but each additional stage will produce a small performance hit.

To ensure that the bones are correctly blended together, the artist can flag each bone as "active" or "inactive" for each Animation Stage.  The "active" bones from the different Animation Stages will then be combined to form the final pose.  This effectively masks bones that are not essential to each animation from the bones that are.  For example, a "Walking" animation may displace the leg and arm bones.  However, only the leg bones are flagged as active, since they are essential to the "Walking" animation.  The arm bones are not essential (since you can walk and do different things with your arms at the same time), so they can be used in a different blending stage.

All of the active animations are organized into a hierarchy.  If a conflict between animations occur (they both have the same bone(s) active at the same time), then the animation higher in the hierarchy will override the lower animation.  If the complete bone set is not flagged as active between the blended animations, then the highest animation will use the position of it's bones.  Also, if more than one blended animation has at least one active morph target, then the morphs in the higher animation will override the morphs in the lower animation(s).

Take the following as an example:

 
 

The "Walk" pose.  This is the first animation in the blending sequence.  On the right, the active bones are highlighted in red.

 

 

The "Fire" pose.  This is the second animation in the blending sequence.  On the right, the active bones are highlighted in red.

 

 

The Final pose.  Note that the active bones from the "Walk" pose are combined with the active bones from the "Fire" pose.  The bones that aren't flagged as active between "Walk" and "Fire" are taken from "Fire".

2.5.2 Transitional Blending

Transitional blending is used to blend the end of one animation with the beginning of another.  For example, a "Walking" animation can seamlessly transition to a "Running" animation.  This is achieved by blending a decrementing percentage of the current animation with an incrementing percentage of the future animation.

Whereas additive blending blends separate Animation Stages together, transitional blending is used to compose an individual Animation Stage.  It never blends two stages together - just individual animations, creating it's own dynamic Animation Stage.  In effect, stages created with the Transitional Blender are fed back into the Additive Blender, allowing them to be combined with other stages. 

This is useful if only one of the active stages needs to transition.  Referring the examples from above, assume that the "Walking" animation is being blended with the "Firing" animation.  The "Walking" animation can then be transitioned into the "Running" animation, while still being blended with the "Firing" animation.

Also, additive blending combines Animation Stages, based on each stage's set of active bones.  Transitional blending, on the other hand, simply combines all bones.  The set of active bones in the new Animation Stage are determined by combining both sets of active bones from the animations being transitioned between. 


2.6 File Compression

To maintain an acceptable disk footprint, DM2 files can be compressed.  zLib will be used to deflate and inflate the files.  File compression is optional, allowing for custom file processing (ie custom compression and/or encryption) or a shorter loading time.


2.7 Common Exporter Framework

The Common Exporter Framework, otherwise abbreviated as CEF, serves as an exporting library, independent of 3d modeling suites.  This allows for new exporters to be created quickly, since the majority of the functionality is completely reusable.

To create a new plugin, the programmer must provide the implementation of an abstracted Studio interface, which acts as a bridge between CEF and the modeling suite.  It allows the framework to communicate back and forth with any arbitrary program.  Dialogs (as well as other GUI-related events), file writing, and mesh processing will be handled by CEF.

A 3D modeling program doesn't have to support all of the features of DM2 to use CEF.  When queried, the interface to the modeler can fill in data that it has, and can leave empty the data that it doesn't support.  For example, if "Studio X" doesn't support morph targets, it should just leave the morphing data blank.  However, it can still fill in all of the other information that it does support.


2.8 Software Development Kit

The DirectMesh Software Development Kit comes complete with source code, documentation, utilities, exporters, samples, and tutorials.  The licensing of the DMSDK is very simple:  it is completely free to use in any private, public, or commercial endeavor.  The source code can be modified without any restrictions whatsoever.

posted on 2010-01-16 10:37 狂爛球 閱讀(1451) 評論(0)  編輯 收藏 引用 所屬分類: 圖形編程

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            亚洲精品色婷婷福利天堂| 99热免费精品| 麻豆成人小视频| 亚洲激情视频网站| 亚洲电影免费在线| 欧美激情欧美狂野欧美精品| 亚洲最新视频在线| 亚洲性视频网址| 国产日本欧美一区二区| 免费久久99精品国产| 欧美高清不卡| 午夜一区在线| 开心色5月久久精品| 日韩视频专区| 午夜精品久久久| 在线观看91精品国产入口| 亚洲国产黄色片| 国产精品免费一区二区三区在线观看| 久久久久久尹人网香蕉| 免费一区二区三区| 亚洲欧美日韩另类| 久久综合久色欧美综合狠狠| 中文欧美日韩| 久久亚洲免费| 亚洲欧美网站| 欧美不卡高清| 久久激情综合网| 欧美韩日高清| 久久一区国产| 欧美亚州一区二区三区| 另类欧美日韩国产在线| 国产精品成人va在线观看| 免费欧美电影| 国产麻豆视频精品| 亚洲乱码国产乱码精品精可以看 | 午夜精品成人在线| 亚洲日本中文| 久久精品国产91精品亚洲| 宅男噜噜噜66一区二区| 久久综合影视| 欧美在线一二三区| 欧美日韩免费高清| 欧美成人黄色小视频| 国产日韩亚洲欧美精品| 99成人免费视频| 亚洲精品资源美女情侣酒店| 久久久噜久噜久久综合| 性做久久久久久免费观看欧美| 欧美精品系列| 亚洲第一区在线观看| 国产一区在线视频| 亚洲欧美文学| 性欧美暴力猛交69hd| 欧美三级日本三级少妇99| 亚洲黄色免费| 亚洲乱码国产乱码精品精天堂| 久久久久久电影| 久久一区免费| 狠狠色丁香婷婷综合影院| 亚洲欧美综合国产精品一区| 午夜精品av| 国产精品任我爽爆在线播放| 亚洲免费观看高清完整版在线观看| 亚洲人成亚洲人成在线观看图片| 另类尿喷潮videofree| 欧美黄在线观看| 亚洲国产欧美一区| 欧美成人四级电影| 亚洲激情欧美激情| 在线亚洲一区二区| 国产精品欧美经典| 亚洲欧美另类综合偷拍| 久久久久9999亚洲精品| 影音欧美亚洲| 欧美大胆人体视频| 9色精品在线| 午夜久久久久久久久久一区二区| 国产欧美日韩视频一区二区| 性做久久久久久久免费看| 久久成人18免费网站| 黄色成人在线| 欧美激情精品久久久久久蜜臀| 日韩视频在线你懂得| 亚洲男女自偷自拍| 国产午夜精品全部视频在线播放| 久久精品人人做人人爽电影蜜月| 蜜臀av一级做a爰片久久| 亚洲美女毛片| 国产精品va在线播放| 新狼窝色av性久久久久久| 久久综合导航| 亚洲最黄网站| 国产综合色产| 欧美日韩一区二区在线观看视频 | 久久一区激情| 亚洲日本一区二区| 国产精品女主播在线观看| 久久精品国产77777蜜臀| 亚洲日本va午夜在线电影| 亚洲永久精品国产| 精品999网站| 国产精品黄视频| 久久久久久久一区| 洋洋av久久久久久久一区| 久久久久国产一区二区| 在线亚洲激情| 在线观看亚洲视频啊啊啊啊| 欧美日韩亚洲天堂| 久久精品亚洲一区| 一区二区av| 亚洲欧洲精品一区| 老司机免费视频久久| 亚洲午夜羞羞片| 亚洲品质自拍| 一区二区三区在线不卡| 国产精品久久久久免费a∨| 欧美成人精品高清在线播放| 午夜免费电影一区在线观看| 亚洲区一区二| 亚洲高清视频在线| 久久露脸国产精品| 欧美亚洲视频在线观看| 一区二区国产日产| 亚洲精品国产拍免费91在线| 国产一区二区精品久久91| 欧美亚一区二区| 欧美日韩免费看| 欧美成人69av| 欧美va亚洲va香蕉在线| 久久综合色播五月| 久久久久九九九| 久久激情视频| 久久国内精品视频| 欧美一区二区啪啪| 亚洲在线视频| 午夜精品电影| 欧美一区二区三区喷汁尤物| 亚洲一区二区三区中文字幕| 中国女人久久久| 亚洲视频 欧洲视频| 一区二区久久久久久| 99国产精品久久久久老师| 99精品国产高清一区二区| 日韩亚洲欧美一区| 一区二区av在线| 亚洲午夜久久久| 午夜视频在线观看一区| 欧美在线三区| 久久综合狠狠| 欧美电影免费观看高清完整版| 欧美成人午夜免费视在线看片 | 亚洲欧美日韩精品在线| 亚洲在线视频免费观看| 亚洲欧美成人一区二区在线电影| 亚洲欧美中文在线视频| 羞羞答答国产精品www一本| 欧美一级理论片| 玖玖玖国产精品| 欧美精品在线视频| 国产精品黄视频| 国产一区二区高清不卡| 一区二区视频免费完整版观看| 亚洲福利一区| 亚洲先锋成人| 久久久久国产一区二区三区| 欧美成人官网二区| 日韩网站在线看片你懂的| 亚洲一区二区三区在线视频| 欧美在线观看www| 欧美福利在线观看| 国产精品视频不卡| 亚洲福利在线观看| 亚洲一区二区精品| 老鸭窝91久久精品色噜噜导演| 欧美激情影院| 亚洲欧美自拍偷拍| 欧美成人免费在线| 国产精品一区二区三区久久| 在线精品视频一区二区三四| 一区二区三区 在线观看视频| 久久精品久久99精品久久| 亚洲福利在线看| 欧美一区日韩一区| 欧美日韩成人在线视频| 黄色综合网站| 亚洲一区视频| 亚洲电影免费观看高清完整版在线观看 | 国产一区香蕉久久| 亚洲毛片在线免费观看| 欧美伊人久久久久久午夜久久久久 | 亚洲欧美综合网| 亚洲电影观看| 欧美影视一区| 国产精品久久一区二区三区| 亚洲国产精品第一区二区三区| 欧美一级播放| 99亚洲伊人久久精品影院红桃| 老司机精品导航| 国产综合久久久久久| 亚洲免费视频网站|