Skip to content

Bounds and collision

RAGECollision and physicsApplies toGTA V

Collision is stored as phBound trees in YBN files and embedded in some drawables and fragments. Static map YBN vertices are already in world space; embedded bounds inherit the placed asset’s transform. Observed

The structural bound census reads all 14,692 YBN copies in every archive, including nested composite children, with no refused files. The proven header, geometry, composite and triangle fields below describe that entire YBN corpus; they do not establish the undecoded BVH structure or every runtime collision filter. Proven · all YBN entries

Kind Shape Confidence
0 Sphere Sourced · CodeWalker
1 Capsule Sourced · CodeWalker
3 Box Sourced · CodeWalker
4 Geometry Sourced · CodeWalker
8 Geometry with BVH Sourced · CodeWalker
10 Composite Sourced · CodeWalker
12 Disc Sourced · CodeWalker
13 Cylinder Sourced · CodeWalker
15 Cloth Sourced · CodeWalker
Common bound header112 bytes58% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x016bytesresource baseSourced
0x101u8bound kindProven
0x113bytesunknownUnknown
0x144f32sphere radiusProven
0x188bytesunknownUnknown
0x2012vec3box maximumProven
0x2C4f32marginProven
0x3012vec3box minimumProven
0x3C4bytesunknownUnknown
0x4012vec3box centreProven
0x4C4bytesprimitive material bytesProvenfirst byte is material index
0x5012vec3sphere centreProven
0x5C16bytesunknownUnknown
0x6C4f32volumeProven
Geometry bound fields304 bytes61% known

Begins with the 112-byte common header described above.

ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x0112BoundHeadercommon headerProven
0x708bytesundescribed fieldsUnknown
0x788pointershrunk verticesSourced
0x804bytesunknownUnknown
0x844u32shrunk vertex countSourced
0x888pointerpolygonsProven
0x9012vec3coordinate quantumProven
0x9C4bytesunknownUnknown
0xA012vec3coordinate centreProven
0xAC4bytesunknownUnknown
0xB08pointerquantized verticesProven
0xB88pointervertex coloursProven
0xC016bytesundescribed fieldsUnknown
0xD04u32vertex countProven
0xD44u32polygon countProven
0xD824bytesundescribed fieldsUnknown
0xF08pointermaterialsProven
0xF832bytesundescribed fieldsUnknown
0x1188pointerpolygon material indicesProven
0x1201u8material countProven
0x12115bytesundescribed tailUnknown
Composite bound176 bytes83% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x0112BoundHeadercommon headerProven
0x708pointerchild bound pointersProven
0x788pointerchild transformsProven
0x808bytesundescribed fieldsUnknown
0x888pointerchild bounding boxesSourced
0x908pointerchild flagsProven
0x988pointersecond child flagsProven
0xA02u16child countProven
0xA22u16second child countSourcedthe count fivefury and FiveM's GetNumChildBounds read
0xA412bytesundescribed tailUnknown

Geometry vertices are signed 16-bit coordinate triples decoded component-wise as integer * quantum + centre. Polygon records include triangles, spheres, capsules, boxes and cylinders. Triangle indices carry flags in their high bits, alongside signed neighboring-polygon indices (-1 means absent) and area. Proven

Triangle polygon16 bytes100% known
ProvenObservedSourcedInferredUnknownNot described
OffsetSizeTypeFieldConfidenceNotes
0x04u32area and polygon kindProvenlow 3 bits select kind 0; clearing them gives the float area bits
0x46u16[3]vertex indices and flagsProvenbit 15 is a flag; low 15 bits index vertices
0xA6i16[3]edge neighborsProven-1 means absent

Sphere, capsule and cylinder vertex words use all 16 bits as indices, unlike triangle words. Removing bit 15 from every polygon kind changes legitimate large vertex indices. Sourced · CodeWalker

Geometry materials are two-word records. The low byte of the first word identifies the material type; the records also carry procedural ID, room, ped density, flags and colour index. Each polygon has a byte index into the material array. Names come from the ordered entries of materials.dat. Sourced · CodeWalker

Composites own child pointers, child bounding boxes, two sets of per-child flags and 64-byte transforms. A transform stores four columns of vec3-plus-word data, with translation in the fourth column. Proven fivefury and FiveM’s GetNumChildBounds take a composite’s child count from 0xA2 rather than 0xA0; whether the two words ever differ in the game’s files is not checked. Sourced · fivefury

The existence of a BVH pointer does not establish its node layout here; geometry can be decoded independently of the acceleration structure. Unknown

YBN names prefixed with hi@ or ma@ distinguish finer collision copies associated with weapons and vehicles from plain map bounds used for walking or rolling. Sourced · CodeWalker

Drawn geometry and collision can describe one object differently. At the Vespucci skatepark (vb_34_skate), two round rails are drawn as pairs of crossed flat strips with the alpha-tested railing_whiterail_basic_a material, while their collision models round bars of radius 0.10 m; a third rail (rsn_os_skatemetal) is drawn as a real tube. Observed

Static collision streams by bound boxes. A YBN can be live only in Story or only in Online, so collision ownership must retain the same map-state distinction as placements. A file in one state is not globally active simply because its bounds intersect a region. Observed

The inspected drawable layout has an embedded-bound pointer at gtaDrawable + 0xC8. Fragments reach the first physics-LOD bound through fragType + 0xF0, then LOD-group +0x10, then physics-LOD +0xE8. Observed

The live Story drawable census finds embedded bounds in 13,133 YDRs and in the first physics LOD of 40,658 YFTs, but none in YDD entries or the fragment main drawable’s own bound field (FragDrawable + 0xF0). This is a corpus result, not a structural prohibition on future resources. Observed · live Story drawables

Entity flag value 4 is named “disable embedded collisions” by CodeWalker. Sourced · CodeWalker

How are every bound flag and acceleration structure interpreted?

The shape and material representation is broader than the decoded BVH and runtime filtering semantics documented here. The remaining flag bits and BVH structure need separate evidence. Unknown