PDA

View Full Version : BSP Trees, PVS, and the Depth Buffer



08-07-2001, 12:20 PM
Hi Guys,
Can someone help with some questions about the above? I'm trying to work out what I need and what I don't. I'm working on a simple 3d engine, which will mainly be drawing scenes like in a first person shooter.

1) As I understand it, a BSP tree is used solely to determine the order in which the polygons in a scene should be rendered. If this is the case then is a BSP tree unnessesary if the OpenGL depth buffer is being used, as this makes sure the right polygon is drawn anyway?

2) My map format basicly consists of many sectors, with each sector being made of several polygons (standard method I think). Where one sector joins another I mark the joining polygon as being such. Now to render the scene I was going to start by rendering the current sector, then by testing which joins are visible, and if any are vissible then render the sectors they lead to. Obviosly if a join isn't visable then the sector it leads to is also not visable. Is this what a portal engine does? or is it what PVS does? If not is it an effective way of not rendering hidden scenery?

Any help you can give deciding what I need will be much appriciated,

David

mikael_aronsson
08-07-2001, 02:14 PM
Hi !

Have a look here:
http://www.opengl.org/developers/faqs/technical/miscellaneous.htm#misc0060

BSP trees can be used to a lot of things, speeding up rendering, occlusion culling and getting the rendering order correct when you have transparent polygons just as a few examples.

Mikael