MorphTarget Class |
Namespace: DigitalRune.Graphics
The MorphTarget type exposes the following members.
Name | Description | |
---|---|---|
MorphTarget |
Initializes a new instance of the MorphTarget class.
|
Name | Description | |
---|---|---|
Dispose |
Releases all resources used by an instance of the Submesh class.
| |
Dispose(Boolean) |
Releases the unmanaged resources used by an instance of the Submesh class
and optionally releases the managed resources.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Name |
Gets the name of the morph target.
| |
StartVertex |
Gets or sets the index of the first vertex in the vertex buffer that belongs to this morph
target (a.k.a base vertex or vertex offset).
| |
VertexBuffer |
Gets or sets the vertex buffer.
|
Morph target animation (or per-vertex animation, blend shape interpolation) can be used to deform a model. It is primarily used for facial animation.
The Submesh defines the base shape (neutral expression). A MorphTarget defines a deformed version of the base shape. Morph target animation typically involves several morph targets where each morph target represents a key shape (expressions such as "smile", "closed eye", "raised eyebrow"). A weight, usually in the range [0, 1], is assigned to each morph target. These weights control the influence of the morph targets and are animated over time. When the model is rendered the vertices are interpolated between the submesh and the morph targets.
The submesh and the corresponding morph targets need to have the same structure. That is, the order of the vertices in the VertexBuffer needs to match the order of the vertices in the submesh. The VertexBuffer of morph target stores vertices of type VertexPositionNormal. Vertex positions and normals are relative to the submesh (difference between key shape and base shape, "delta shape").
The morph target weights of a specific mesh instance are stored in the MeshNode (see property MorphWeights). These weights are used during rendering.