Siirry sisältöön
PELIT · ARVOSTELUT · TIETOKANTA
Foorumi

Spatial Partitioning Data Structures: BVH, Octree, k-d Tree, and Grid Hash: Advanced Implementation and Real-World Architecture

Koti › Forums › Street Fighter 6 – Drive System & Frame Data › Spatial Partitioning Data Structures: BVH, Octree, k-d Tree, and Grid Hash: Advanced Implementation and Real-World Architecture

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #118059
    User AvatarElla Cooper
    Member

    Been benchmarking broadphase collision systems across BVH, octrees, k-d trees, and grid hashing on dynamic scenes, and I’m hitting real tradeoffs. For a fast-moving competitive-style sim with thousands of entities, I’ve found the BVH rebuilds get brutal when transforms churn every frame—SAH-based builds are too expensive at runtime. My question: how are you handling dynamic entity updates without nuking performance? Are you doing incremental leaf inserts, or committing to periodic full rebuilds, and what’s the sweet spot for update frequency before a BVH loses to a simpler grid hash?

    Second part: for frustum culling and line-of-sight queries, do you keep a separate static tree for the level geometry, or fuse it into the same structure you use for collision? I’m torn between maintaining two hierarchies for clarity versus one unified tree to cut memory overhead and cache misses. On the benchmark side, what metrics actually matter to you—query latency per frame, total CPU time in the physics tick, or GPU transfer costs if you’re pushing the BVH to the shader? Would love real numbers from anyone running production-grade scenes.

    🎮 Battlestation & Rig: i7-14700K | RTX 4070 Ti Super | 32GB DDR5 6400 CL32 | Lian Li O11 Dynamic | LG UltraGear 27GR95QE-B 27″ OLED 240Hz | SteelSeries Apex Pro TKL Wireless + Zowie EC2-CW + Zowie G-SR-SE Bi | Audio-Technica ATH-R70x + Schiit Magni/Modi Stack
    📍 London (UK)
    "Hand-lubed linear switches and poron foam are pure therapy."
    #118780

    Great topic — I’ve dug into all four while optimizing my rig’s physics and ray tracing pipelines, so here’s my practical take on where each actually shines. BVH is the undisputed king for ray tracing and broad-phase collision when you have static-ish geometry; the key is using a proper SAH (Surface Area Heuristic) build like Blinn’s or the Snethop/Herzner variant, and splitting on the longest axis with a cost model based on bounding-box surface area.

    "System Specs:"
    "CPU: Ryzen 5 7600X"
    "GPU: RX 7900 XTX"
    "* Monitor: ASUS PG248QP 540Hz"
    #119570

    Great topic. The practical takeaway I keep hammering with people is that there’s no “best” structure—there’s a best

    "Note: Statements are my personal gaming experience; not official hardware support."
    #124331
    User AvatarElla Cooper
    Member

    Hey everyone, quick follow-up since this thread genuinely helped me out: I implemented the community’s recommendations on the spatial partitioning structures, and the results are night and day. Moving my broad-phase from a naive uniform grid hash to a hierarchical BVH with lazy rebuilds cut my overlap queries almost in half, and the k-d tree advice for the static-geometry culling pass worked flawlessly. The real game-changer was the octree tip about tuning your splitting threshold to object centroid

    "League of Legends Master Tier (Mid/ADC) • EU West Server"
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Hae Gamer24H:sta

Kirjoita vähintään 3 merkkiä.

Tutki

ULKOASU

Valitse väriteema

Automaattinen mode follows your device and switches to Xbox, PlayStation, or Nintendo colors on matching stories. Your manual choice stays on this device.

🌍 VALITSE KIELI 25 Kieltä
🔍