Enveloping: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 6: Line 6:


==Guidelines==
==Guidelines==
* The envelope and weightmap data but be exported inside the [[reference.smd]] (where it is stored as "[[SMD file format|triangles]]" data).
* For models without articulated skeletons (ie 1 bone) the SMD exporter will probably envelope your mesh automatically.


; Quick start: For a [[rigid]] model (ie just one bone) the [[model editor]]'s [[SMD export]]er should envelope your mesh automatically.


; Editable data: The envelope and weightmap data is configured in a [[model editor]] and exported to the mesh's [[SMD file format|SMD triangles block]].
; Weightmap: For models with a jointed skeleton, each part of the mesh (a group of vertices) needs to be "parented" to the relevant bone. A given vertex can be attached to more than one bone, in which case the weightmap data is used to "blend" the vertex's position relative to both bone positions. Jointed Collision Model physboxes must not be enveloped to more than one bone, and so don't need any ''weightmap'' configuration data.
; Bonemerge: Sub-models (eg w_weapons) and [[Sub-mesh]]es must be enveloped to the skeleton of their parent model to ensure that they align, move and deform correctly. This is usually done using the '''Bonemerge''' method (see [[Creating worldmodels from viewmodels]]).


==Tooltips==
==Tooltips==

Revision as of 10:08, 7 May 2008

Stub

This article or section is a stub. You can help by expanding it.

Enveloping is the process of attaching a model's Mesh vertices to the appropriate Bones in its Skeleton. When the skeleton articulates, the envelope's vertices will move with it, and the polygons will stretch or compress around joints. The Weightmap defines the relative amount of stretch for each vertex.

Tip.pngTip:Don't confuse weightmaps with $weightlists.

Guidelines

Quick start
For a rigid model (ie just one bone) the model editor's SMD exporter should envelope your mesh automatically.
Editable data
The envelope and weightmap data is configured in a model editor and exported to the mesh's SMD triangles block.
Weightmap
For models with a jointed skeleton, each part of the mesh (a group of vertices) needs to be "parented" to the relevant bone. A given vertex can be attached to more than one bone, in which case the weightmap data is used to "blend" the vertex's position relative to both bone positions. Jointed Collision Model physboxes must not be enveloped to more than one bone, and so don't need any weightmap configuration data.
Bonemerge
Sub-models (eg w_weapons) and Sub-meshes must be enveloped to the skeleton of their parent model to ensure that they align, move and deform correctly. This is usually done using the Bonemerge method (see Creating worldmodels from viewmodels).

Tooltips