Scene graphs and spatial partitioning structures: What do you really need?
- by tapirath
I've been fiddling with 2D games for awhile and I'm trying to go into 3D game development.
I thought I should get my basics right first.
From what I read scene graphs hold your game objects/entities and their relation to each other like 'a tire' would be the child of 'a vehicle'.
It's mainly used for frustum/occlusion culling and minimizing the collision checks between the objects.
Spatial partitioning structures on the other hand are used to divide a big game object (like the map) to smaller parts so that you can gain performance by only drawing the relevant polygons and again minimizing the collision checks to those polygons only. Also a spatial partitioning data structure can be used as a node in a scene graph.
But... I've been reading about both subjects and I've seen a lot of "scene graphs are useless" and "BSP performance gain is irrelevant with modern hardware" kind of articles.
Also some of the game engines I've checked like gameplay3d and jmonkeyengine are only using a scene graph (That also may be because they don't want to limit the developers).
Whereas games like Quake and Half-Life only use spatial partitioning.
I'm aware that the usage of these structures very much depend on the type of the game you're developing so for the sake of clarity let's assume the game is a FPS like Counter-Strike with some better outdoor environment capabilities (like a terrain).
The obvious question is which one is needed and why (considering the modern hardware capabilities).
Thank you.