Potentially Visible Set?

Started by
11 comments, last by Ohforf sake 10 years, 5 months ago

Okay, thank you a lot for the explanation Hodgman but it's a bit "restricted" to specifically BSP implementation... I'm having trouble trying to mentally/visually "translate" this into working for a "basic" octree/quadtree..

We can start with an example, as a quadtree top-down view:

[attachment=18642:t9egmmU.png]

Could you maybe explain how this could be applied in a case such as this?

In your BSP example, I kind of understand how you can check whether another plane is "behind" or "in front of" a given plane, but in a quad tree... you'd have to check 4 planes for a given section, in all four directions, so wouldn't every other section technically be "visible" by this procedure?

Advertisement

If you use a finer grid in that example, and if you first determine which cells are completely empty, then it works wink.png

Still perform the same recursive algorithm where you step through each portal into the neighboring cells (ignoring empty cells), adding the planes you've crossed to a stack as you traverse the cells. It should work just the same as in the BSP-tree example, except with BSP you can have a bit more control over where these splitting planes are placed (often the level designers / map makers can manually place these portals as well as relying on the BSP-compiler to create them automatically). To get decent results, your cells will have to be small enough so that you get some empty cells between rooms/corridors.

Grey cells are empty (no geometry, so don't treat them as being neighbours that you can traverse).

Starting at the green cell in the centre picture, when we step downwards from there, we add the orange line to our stack of planes. When traversing further from there, we can never step back up over that orange line, so the corner ends up functioning as an occluder.

ahgjyQy.png

In a more complex level it ends up looking like this (Starting at "A", green is visible, grey are empty cells, white are not visible for "A")

pQoKwhE.png

Grey cells are empty (no geometry, so don't treat them as being neighbours that you can traverse).


I think this only holds for "outside" cells. Otherwise you might have a floating object in a room, that the PVS compiler deems invisible because it is completely surrounded by grey cells.

This topic is closed to new replies.

Advertisement