DMX/Source 2 Vertex attributes

From Valve Developer Community
Jump to: navigation, search

The DMX mesh format (Version 22) supports arbitrary mesh attributes. The Source 2 tools can make use of many attributes besides the standard ones to control per-vertex model features.

Note.png Note:  The list is very likely incomplete.


Attribute Type Description
position vector3 Vertex position.
normal vector3 Vertex normal.
texcoord vector2 UV coordinates. A second UV map can be added with texcoord$1.
blendweights float
blendindices int
balance float

Vertex Color Maps

Attribute Type Description
color vector4 Vertex color. Can be used in the VR shaders to tint a model with the appropriate material attribute enabled.
VertexPaintBlendParams vector4 Used to blend between texture layers in bland materials. Works the same way as the Hammer Terrain Blending tool.
VertexPaintBlendParams1 vector4 To do:  Unknown additional blend parameters
VertexPaintTintColor vector4

Cloth Simulation

Attribute Type Description
cloth_enable float (0 - 1) Enables cloth simulation and creates a cloth node on the vertex when set to 1.
cloth_animation_attract float Legacy parameter deprecated in favor of cloth_goal_strength.
cloth_animation_force_attract float Legacy parameter deprecated in favor of cloth_goal_strength.
cloth_goal_strength float (0 - 1) Controls the how much animations influence the vertex position.
cloth_goal_strength_v2 float (0 - 1) To do: Same as cloth_goal_strength?
cloth_goal_damping float
cloth_drag float
cloth_drag_v2 float
cloth_mass float To do: This sets the per-vertex mass in kg, but doesn't seem to go below 1, leading to extremely massive cloth. Enabling explicit masses ignores this value, contrary to documentation
cloth_gravity float
cloth_gravity_z float
cloth_collision_radius float
cloth_ground_collision float
cloth_ground_friction float
cloth_use_rods float
cloth_make_rods float
cloth_anchor_free_rotate float (0 - 1) Controls how freely cloth nodes bordering to non-cloth vertices can rotate.
cloth_volumetric float
cloth_suspenders float
cloth_bend_stiffness float (0 - 1) Controls curvature of bend springs. Requires m_bAddStiffnessRods to be enabled.
cloth_stray_radius_inv float
cloth_stray_radius float
cloth_stray_radius_stretchiness float
cloth_antishrink float
cloth_shear_resistance float
cloth_stretch float (0..+inf) A value of 1 gives extremely loose cloth. Strechiness increases exponentially with value. To do: Does this affect both quads and rods?
cloth_friction float
cloth_collision_layer_0 - 15 float
cloth_vertex_set_<set_name> float