Collision mesh: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 2: Line 2:
[[Image:Collisionmesh jointed.jpg|right|150px|A jointed collision mesh (yellow wireframes)]]
[[Image:Collisionmesh jointed.jpg|right|150px|A jointed collision mesh (yellow wireframes)]]


A '''collision mesh''' (sometimes '''collision model''', though it is actually only ever a ''component'' of a model) is a [[cheap]] 3D mesh used by Source to calculate [[VPhysics]] collisions.
A '''collision mesh''' is a [[cheap]] 3D mesh used by [[VPhysics]]. It is sometimes called a '''collision model''' as it becomes a discrete object when loaded into the engine, but as far as creating [[model]]s is concerned it is a [[vertex]] mesh more or less like any other.


A collision mesh is not visually represented to the player, and should be extremely low-detail compared to any [[Reference mesh|reference]] or [[LOD mesh|LOD]] meshes - see the images to the right for two examples. The lack of precision will not be noticed, except in that it doesn't grind the simulation to a halt!
Collision meshes are invisible, and should be extremely low-detail compared to the model's visible components (see the images to the right for two examples). The lack of precision will not be noticed, except in that it doesn't grind the simulation to a halt!


*In order to create an accurate collision mesh for a complex [[Wikipedia:Concave|concave]] model, you need to create several individual convex objects. If they are not separated into multiple objects, the engine will treat them as one convex mesh.
== Caveats ==
*Unlike the [[reference mesh]], the collision mesh must be solid on all sides. Errors similar to <code>WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!</code> mean there is a missing face somewhere.
 
**This can happen if two convex objects become merged; in 3DS Max ensure you have applied at least one smoothing group before exporting.
* Collision meshes must be [[Wikipedia:Convex set|convex]]. To create an accurate collision mesh for a concave model create multiple, '''separate''' convex objects, intersecting them if necessary.
* Unlike a [[reference mesh]], a collision mesh must be solid on all sides. Errors similar to "WARNING: Model has 2-dimensional geometry" mean there is a missing face somewhere. {{tip|This can happen if two convex objects become merged; in [[3DS Max]] ensure you have applied at least one smoothing group before exporting.}}


== See also ==
== See also ==


*[[Physics and Ragdolls]]
* [[$collisionmodel]] - [[QC command]] for collision meshes ''without'' moving parts
*[[$collisionmodel]] - [[QC command]] for collision meshes ''without'' moving parts
* [[$collisionjoints]] - QC command for collision meshes ''with'' moving parts
*[[$collisionjoints]] - QC command for collision meshes ''with'' moving parts
* [[VPhysics]]
*[http://www.wallworm.com/smdcollisionmodel.html SMD Collisionmodel Prep 3DS Max Tool Version 1.0]
* [[Physics and Ragdolls]]
* [http://www.wallworm.com/smdcollisionmodel.html SMD Collisionmodel Prep 3DS Max Tool Version 1.0]


{{otherlang:en}}
{{otherlang:en}}
{{otherlang:en:ru|Collision_model:ru}}
{{otherlang:en:ru|Collision_model:ru}}
[[Category:Modeling]]
[[Category:Modeling]]
[[Category:Glossary]]
[[Category:Glossary]]

Revision as of 07:02, 13 June 2009

A static collision mesh (red wireframe)
A jointed collision mesh (yellow wireframes)

A collision mesh is a cheap 3D mesh used by VPhysics. It is sometimes called a collision model as it becomes a discrete object when loaded into the engine, but as far as creating models is concerned it is a vertex mesh more or less like any other.

Collision meshes are invisible, and should be extremely low-detail compared to the model's visible components (see the images to the right for two examples). The lack of precision will not be noticed, except in that it doesn't grind the simulation to a halt!

Caveats

  • Collision meshes must be convex. To create an accurate collision mesh for a concave model create multiple, separate convex objects, intersecting them if necessary.
  • Unlike a reference mesh, a collision mesh must be solid on all sides. Errors similar to "WARNING: Model has 2-dimensional geometry" mean there is a missing face somewhere.
    Tip.pngTip:This can happen if two convex objects become merged; in 3DS Max ensure you have applied at least one smoothing group before exporting.

See also

Template:Otherlang:en Template:Otherlang:en:ru