Mesh: Difference between revisions
Jump to navigation
Jump to search
Tip:See SMD file format for exactly how this data is stored in the
mNo edit summary |
(added disambiguation section) |
||
Line 4: | Line 4: | ||
Each model requires at least one mesh (the ''default mesh'') but may also have additional ''sub-meshes''. Each mesh may also have a number of versions optimised for LOD-substitution. | Each model requires at least one mesh (the ''default mesh'') but may also have additional ''sub-meshes''. Each mesh may also have a number of versions optimised for LOD-substitution. | ||
Mesh data is | All '''Mesh data''' is exported from a [[model editor]] as an [[SMD]] file, and then [[Compiling a model|compiled]] to the model's [[VVD]] and [[VTX]] binary files. Mesh data includes (for each triangular polygon) : | ||
:* [[Geometry]] data : Vertex Coordinates (relative to a specific [[Parentbone]]) | :* [[3D Geometry]] data : Vertex Coordinates (relative to a specific [[Parentbone]]), | ||
:* [[Smoothing group]] data : Normal vector (relative to a specific [[Parentbone]]) | :* [[Smoothing group]] data : Vertex Normal vector (relative to a specific [[Parentbone]]), | ||
:* [[Skinning]] data : [[UV map]] coordinates and [[Default Skinname]](s), | :* [[Skinning]] data : Vertex [[UV map]] coordinates and [[Default Skinname]](s), | ||
:* [[Envelope]] data : [[Weight map]] values and [[Parentbone]] | :* [[Envelope]] data : Vertex [[Weight map]] values and [[Parentbone]]. | ||
{{tip|See [[SMD file format]] for exactly how this data is stored in the <code>triangles</code> block of a "Studio Model Data" file.}} | {{tip|See [[SMD file format]] for exactly how this data is stored in the <code>triangles</code> block of a "Studio Model Data" file.}} | ||
Line 15: | Line 15: | ||
: The '''Default mesh''' is the Mesh that will be rendered unless substituted by a specific ''LOD mesh'', and/or modified by a specific ''Sub-mesh''. | : The '''Default mesh''' is the Mesh that will be rendered unless substituted by a specific ''LOD mesh'', and/or modified by a specific ''Sub-mesh''. | ||
:* It is defined in the [[Reference.smd]] and compiled | :* It is defined in the [[Reference.smd]] and compiled via the [[$body]] or [[$model]] QC command. | ||
==== | ==== Optional mesh==== | ||
: '''Sub-meshes''' can be switched on and off at runtime. Like the Default mesh, they are [[enveloped]] to | : Optional '''Sub-meshes''' can be switched on and off at runtime. Like the Default mesh, they are [[enveloped]] to this model's Skeleton, and will deform (stretch and flex) as if part of the Default mesh. Specific pieces of clothing are good candidates for switchable sub-meshes; eg different types of body armor or headgear. By contrast ''Sub-models'' (eg weapons) can be attached to specific [[$attachment]] points on this skeleton, but they remain ''enveloped'' to their own skeleton; their geometry will be ''moved'' by this skeleton but will not be ''deformed'' by it. | ||
:* The [[$bodygroup]] configuration allows any number of sub-meshes ([[SMD]]s) to be added to the ''Default mesh''. By setting up multiple [[$bodygroup]]s sub-mesh switching can be triggered by (code-level) events. | :* The [[$bodygroup]] configuration allows any number of sub-meshes ([[SMD]]s) to be added to the ''Default mesh''. By setting up multiple [[$bodygroup]]s sub-mesh switching can be triggered by (code-level) events. | ||
:* Sub-meshes do not affect the model's collision model. | :* Whereas "Alternative Skins" replace the Default Skin, Optional Meshes do not replace the Default Mesh. | ||
:* Sub-meshes do not affect the model's [[collision model]]. | |||
:* ({{todo|[[$model]]'s face mesh for facial animation ?}}) | :* ({{todo|[[$model]]'s face mesh for facial animation ?}}) | ||
Line 28: | Line 29: | ||
: Source's [[LOD system]] allows a "cheaper" (simplified) version of the Default mesh(es) to be ''rendered'' at a distance where the loss of "expensive" detail is not noticeable to the Viewer. Any number of replacement [[LOD Models|LOD_mesh.SMD]]s are usually created from pared-down versions of the Default mesh and Sub-Meshes, and compiled via the [[$lod]] configuration. The ''Default mesh'' or ''Default Sub-mesh'' is used when no ''LOD mesh'' is active; we could say it amounts to an "lod0" Mesh. | : Source's [[LOD system]] allows a "cheaper" (simplified) version of the Default mesh(es) to be ''rendered'' at a distance where the loss of "expensive" detail is not noticeable to the Viewer. Any number of replacement [[LOD Models|LOD_mesh.SMD]]s are usually created from pared-down versions of the Default mesh and Sub-Meshes, and compiled via the [[$lod]] configuration. The ''Default mesh'' or ''Default Sub-mesh'' is used when no ''LOD mesh'' is active; we could say it amounts to an "lod0" Mesh. | ||
== Disambiguation == | |||
* A '''Model''' is a functional set of components, including whatever Skin, Mesh, Skeleton, Collision geometry, associated Animations, Sounds, Physics properties, etc. data it needs to fulfil a given role. Often a particular [[SMD]] or [[MDL]] file is referred to as a model, for example a "reference model" usually refers to the [[reference.smd]], and a "collision model" ([[PHY]]) is a fully rigged version of the visual model ([[VVD]]) which is simply "rendered" in the Physics Engine as opposed to the Rendering Engine. | |||
* A '''Collision Mesh''' in Source is a misnomer, because all pieces of 3D collision geometry are ''rigid'' '''Collision Hull'''s rather than ''deformable'' Meshes. A Ragdoll's '''Collision Model''' consists of a system of small Rigid Hulls which are moved (but not deformed) by skeletal articulation. The "Rendering Mesh" or "Skin Mesh" is the only type of Mesh used currently for Source Models. | |||
[[category:Modeling]] | [[category:Modeling]] | ||
[[category:Modelling Glossary]] | [[category:Modelling Glossary]] | ||
[[category:Glossary]] | [[category:Glossary]] |
Revision as of 13:03, 2 May 2008
In Source, the Mesh (sometimes called the body or envelope or skin of the model) defines the deformable 3D geometry of the model's rendered surface. The Rendered Skin is projected over the Mesh which envelopes the Skeleton.
Each model requires at least one mesh (the default mesh) but may also have additional sub-meshes. Each mesh may also have a number of versions optimised for LOD-substitution.
All Mesh data is exported from a model editor as an SMD file, and then compiled to the model's VVD and VTX binary files. Mesh data includes (for each triangular polygon) :
- 3D Geometry data : Vertex Coordinates (relative to a specific Parentbone),
- Smoothing group data : Vertex Normal vector (relative to a specific Parentbone),
- Skinning data : Vertex UV map coordinates and Default Skinname(s),
- Envelope data : Vertex Weight map values and Parentbone.

triangles
block of a "Studio Model Data" file.
Default mesh
- The Default mesh is the Mesh that will be rendered unless substituted by a specific LOD mesh, and/or modified by a specific Sub-mesh.
- It is defined in the Reference.smd and compiled via the $body or $model QC command.
Optional mesh
- Optional Sub-meshes can be switched on and off at runtime. Like the Default mesh, they are enveloped to this model's Skeleton, and will deform (stretch and flex) as if part of the Default mesh. Specific pieces of clothing are good candidates for switchable sub-meshes; eg different types of body armor or headgear. By contrast Sub-models (eg weapons) can be attached to specific $attachment points on this skeleton, but they remain enveloped to their own skeleton; their geometry will be moved by this skeleton but will not be deformed by it.
- The $bodygroup configuration allows any number of sub-meshes (SMDs) to be added to the Default mesh. By setting up multiple $bodygroups sub-mesh switching can be triggered by (code-level) events.
- Whereas "Alternative Skins" replace the Default Skin, Optional Meshes do not replace the Default Mesh.
- Sub-meshes do not affect the model's collision model.
- (Todo: $model's face mesh for facial animation ?)
LOD mesh
- Source's LOD system allows a "cheaper" (simplified) version of the Default mesh(es) to be rendered at a distance where the loss of "expensive" detail is not noticeable to the Viewer. Any number of replacement LOD_mesh.SMDs are usually created from pared-down versions of the Default mesh and Sub-Meshes, and compiled via the $lod configuration. The Default mesh or Default Sub-mesh is used when no LOD mesh is active; we could say it amounts to an "lod0" Mesh.
Disambiguation
- A Model is a functional set of components, including whatever Skin, Mesh, Skeleton, Collision geometry, associated Animations, Sounds, Physics properties, etc. data it needs to fulfil a given role. Often a particular SMD or MDL file is referred to as a model, for example a "reference model" usually refers to the reference.smd, and a "collision model" (PHY) is a fully rigged version of the visual model (VVD) which is simply "rendered" in the Physics Engine as opposed to the Rendering Engine.
- A Collision Mesh in Source is a misnomer, because all pieces of 3D collision geometry are rigid Collision Hulls rather than deformable Meshes. A Ragdoll's Collision Model consists of a system of small Rigid Hulls which are moved (but not deformed) by skeletal articulation. The "Rendering Mesh" or "Skin Mesh" is the only type of Mesh used currently for Source Models.