0
$\begingroup$

I am brushing up on the fundamentals of OpenGL. Things are going great. I am looking at BSP for maps/levels. I understand that Doom uses BSP, but I worry. Can BSP be used with complete 3D world and just not a 2.5D perspective?

$\endgroup$
1
$\begingroup$

There are two types of BSP trees, the Axis Aligned BSP (aka k-D tree) and the polygon aligned BSP. Doom used the polygon aligned variety.

Polygon aligned BSP tree's can be traversed in occlusion order (back to front, or front to back depending on the needs). This makes them useful in situations where a Z-buffer isn't available and was the original reason BSP tree's were chosen for Doom. (There were no Z buffers when Doom was first created)

BSP tree's are constructed using a "hyperplane". The so called 2.5D world is using a 1 dimensional hyperplane (aka a line) to split up an effectively 2 dimensional world.

In 3D the hyperplane is a 2 dimensional plane that splits the 3D world into two separate 3D subspaces. Which are then recursively split until all objects in the world are divided up. This is the type of BSP tree you are suggesting: polygon aligned, using a 2D hyperplane for dividing the 3D world.

BSP tree's are sensitive to the split point choices and can result in very large tree's especially in densely populated worlds with objects that have a wide variety of sizes since many objects can end up falling on split points.

The octree would be another choice of BVH that has better resources available on the net for implementing and is less sensitive to the choice of split points so generally results in more performant trees. (but not always)

$\endgroup$
0
$\begingroup$

Yes, full 3D BSPs are possible, such as in Quake or in Quake-derived engines such as Half-Life, or other games from that era.

That said, BSPs are not usually used for rendering purposes anymore. They may still be used in physics engines for collision detection in some cases.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.