Model collision geometry tags contain collision data for an object. This is in contrast to model/gbxmodel tags, which mostly contain the renderable data. Collision meshes tend to be less detailed than render meshes, and are used to check collisions within the object's bounding radius.
Beyond having a collision mesh, these tags can also contain:
- Pathfinding spheres which prevent AI from trying to walk through the object
- Damage ratios for each part of the object (e.g. weak points)
- Shield and health values
AI can figure out where to go by checking the pathfinding data on the BSP. However, since objects like scenery and units are not part of the BSP, Bungie implemented pathfinding spheres: spherical markers on objects that AI actively avoid walking into.
By placing these spheres in an object's collision model, artists can tell the AI exactly where not to go. As far as we know, all object types can make use of pathfinding spheres. The object's bounding sphere does not seem to affect AI avoidance of them.
Pathfinding spheres are imported from the collision JMS file of your object. They are marked with
#pathfinder and their radius is the actual radius that the AI will avoid walking in relation to the mid-point.
Pathfinding spheres can also be created automatically in some cases:
- When an artist doesn't specify any pathfinding spheres, the game will assume one at the object's origin at half the size of the bounding sphere (which can be either too small or too big).
- Vehicle mass points (see physics) also count as pathfinding spheres. AI will actively avoid these.
- Bipeds by default also have a pathfinding sphere around their feet with the same width as their physics pill.
Unlike BSPs, collision geometry can have a self-intersecting mesh. However, this is only permitted between meshes parented by different nodes (e.g. limbs of a biped intersecting each other or the torso). Collision geometry cannot have weighted skinning for animations, so rigidly follows parent nodes in animations.
Although phantom BSP is typically seen in the context of level geometry, it can also affect model collision geometry because this tag uses the same collision data structures as a scenario_
Like with level geometry, these can be troubleshooted in Sapien by running the console commands:
collision_debug 1 collision_debug_phantom_bsp 1
To fix them, use similar tricks as fixing level phantom BSP: fixing cases of nearly co-planar faces reported in your WRL file and/or slightly altering the collision model around the problematic location. If changes to the source geometry do not resolve the phantom BSP, you can use H1A Tool with the
fix-phantom-bsp option enabled or phantom_
If enabled, the center of the view is used to test for collisions. A red normal-aligned marker will be shown where the ray from the center of view collides with a surface. The collision surface itself, whether BSP or model, will be outline in red. Information about the collision surface will be shown in the top left corner of the screen, including plane and surface indices from the BSP structure, material type, and how many degrees the surface's normal differs from vertical.
The types of surfaces which the test ray hits or ignores can be toggled with the
Toggles the display of collision features near the camera, which can be spheres (red), cylinders (blue), or prisms (green). Collision size can be adjusted with
Causes a floating pink cube and label "phantom bsp" to appear whenever a test ray from the center of the screen intersects with phantom BSP. It can be helpful to pair this with
Setting this to
|indirect damage material|
|maximum body vitality|
Sets the maximum amount of health that a unit has (damage hit points). For example, the cyborg biped has a value of 75. This value can also be changed at runtime for individual units by using
|body system shock|
|friendly damage resistance|
|localized damage effect|
|area damage effect threshold|
|area damage effect|
|body damaged threshold|
|body damaged effect|
|body depleted effect|
|body destroyed threshold|
|body destroyed effect|
|maximum shield vitality|
Sets the maximum amount of shields that a unit has (damage hit points). For example, the cyborg biped has a value of 75. This value can also be changed at runtime for individual units by using
|shield material type|
Determines which damage_
|shield failure function|
|shield failure threshold|
|failing shield leak fraction|
|minimum stun damage|
|shield damaged threshold|
|shield damaged effect|
|shield depleted effect|
|shield recharging effect|
|shield recharge rate|
Spheres which approximate the shape of the model for AI pathfinding avoidance. The sphere limit was increased to match Reach's in H1A.
Thanks to the following individuals for their research or contributions to this topic:
- Kavawuvi (Invader tag definitions)
- Knight Artorias (Region and permutation limits)
- lag supreme (Visualization of phantom BSP in covie crates)
- MosesOfEgypt (Tag structure research)