Talk:$collisionmodel

From Valve Developer Community
Jump to: navigation, search

lo-poly collision mesh

Collision meshes should be extremely low-poly in comparison to body meshes, and even lod meshes. See collision mesh.

  • How about using the term "render mesh" to refer to the $body (reference.mdl) and $lod meshes? I'm thinking that this emphasises their NotSolid nature compared to Collision mesh, and AFAIK, Skins are only UV mapped to a rendermesh ? In a sense, a rendermesh's only job is to render the skin in 3D! ... --Beeswax 06:52, 28 Apr 2008 (PDT)
Body is an established term. There's no point in introducing a new one. --TomEdwards 08:03, 28 Apr 2008 (PDT)
Reference model (or mesh) is the word we generally use. I've never heard anyone refer to them as Body meshes in production. Since both $body and $model are both usable commands, Reference is the command element. --JeffLane 11:50, 28 Apr 2008 (PDT)
OK then. --TomEdwards 11:56, 28 Apr 2008 (PDT)
The point of introducing a new term is to make the practical distinction between model components that are rendered (ie parts of the _reference.mdl and corresponding parts of all the _lod.mdls) and geometry that is not rendered (collision model, bounding box, hit box, skeleton, origin, etc). Render meshes require UV mapped VMT stuff and participate in Rendering optimisation issues like LOD and mipmaps, etc. --Beeswax 16:02, 28 Apr 2008 (PDT)
If I understand correctly, the reference.MDL is more than just the hi-poly "render" mesh data: it defines the mdl's Origin, Default VMT, Skeleton, Hitboxes, etc? it also indexes and coordinates all the other collision.mdl, animation.mdl, etc ? So, when the $lod switch happens in game, does the Engine actually "replace" the whole reference.MDL with the lod.MDL at a given render distance? or just the "render mesh" (replacemodel) part and "skin" (replacematerial) part? --Beeswax 16:02, 28 Apr 2008 (PDT)
Mesh vs Model : Where I have come across model used in Source, it seems to suggest a grouping, collection or set of (potentially) several component parts; a kind of prefab.
  • eg if the components were bones, the "model" would be the "skeleton" (even if it only has 1 bone).
  • eg a compiled model = all of its .mdl, .vmt, .vtf, .vtx, etc files - everything it needs to function in game. (ie model and .mdl are not synonymous)
  • eg a "collision model" = all the convex physboxes (or hulls?) ; whether jointed, rigid concave (composite), or just a solitary rigid convex or box-hull. --Beeswax 16:02, 28 Apr 2008 (PDT)
I think you're splitting hairs here. From a modeler's perspective (the primary customer here), there is no practical difference between a a reference model or a render mesh. Creating more terms doesn't make it any clearer. --JeffLane 17:57, 28 Apr 2008 (PDT)

$collisionjoints parameters ?

Why have all these $collisionjoints parameters been added to $collisionmodel? I thought the whole point was that $collisionmodels don't have any joints? Is it just an (enormous) typo? or does the description need to be rewritten? --Beeswax 16:02, 28 Apr 2008 (PDT)

Oops, yes. This was a mistake on my part. I pasted from the wrong file. These belong in $collisionjoints. Good catch. --JeffLane 17:52, 28 Apr 2008 (PDT)
LOL. What a relief! I was feeling desperately confused! Thanks --Beeswax 19:13, 28 Apr 2008 (PDT)

Expensive Collision Models

I have noted that the Docs mention a max of 20 convex pieces to a $concave collision model. But the compiler complains if the value is higher than 40. Is the discrepency engine dependent?