Reference model
Jump to navigation
Jump to search
Reference.mdl
The Reference.mdl, conventionally named <modelname>.mdl
, contains a range of key information for an in game model:
- The model's Filename, used to identify vital data stored in the model's VTX, VVD, PHY files.
- The names of any Sound WAV files used by this model.
- The names of the Skin VMT files used by this model. (or is this in VTX / VVD files ?)
- The names of any Animation Sequences used by this model.
- The names of any Animation Library MDL files used by this model.
- Any propdata attributes this model may have, including
- The names of any Gib MDL files used by this model.
- etc
Each model's 3D Rendering data is stored in the VVD and VTX files, and its Collisionmodel data in its PHY file.
Reference.smd
The reference.smd is traditionally named "modelname_ref.smd"
to distinguish it from "modelname_anim.smd"
files. It is also distinct from the "modelname_phys.smd"
which contains only collisionmodel reference data.
The reference.smd contains the model's "default" Rendering data for animation files to manipulate.
- The Reference Skeleton (
nodes
block) is used by animations or ragdoll physics to manipulate the mesh, collisionmodel, hitboxset, etc. It can be modified by $lod bonetreecollapse (etc) - The Reference Pose (
skeleton
block) is used when no animation or vphysics is applied to the skeleton. - The Reference Mesh (
triangles
block) is the Mesh that will be Rendered unless replaced by an $lod configuration. - The Reference Skin is only the filename of the VMT whose VTFs will be used on the Mesh unless overridden by $texturegroup skinfamilies options and/or $lod configuration.
- Reference Mesh
In Source, the Reference Mesh (also called the body or envelope or skin) includes:
- Geometry data : Vertex Coordinates (in relation to the model's $origin) for each triangular polygon,
- Smoothing group data : Normal vector for each vertex,
Confirm:(in relation to the model's $origin)
- Skin data : UV map coordinates and Default "Skinname(s)",
- Envelope data : Weight map values and "Bonename(s)".