• Advertisement

Archived

This topic is now archived and is closed to further replies.

Depthtesting and bsp

This topic is 5922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Some people say that bsp is out-of-date since the depthtesting (?) is so fast these days. I dont get it, is the depthtesting hardware-accelerated, and so fast that one can ignore bsp trees, or is it worth implimenting bsp-trees for thos who still have a old voodoo?!

Share this post


Link to post
Share on other sites
Advertisement
If the depthtesting isvery fast, you can use BSP to create more complex geometry, right? I think BSP is a great tool, though I''m not using it (having my own stuff ).

Share this post


Link to post
Share on other sites
Depth testing on modern cards is very fast, but its faster still if you don''t try to draw stuff that is obviously not visible. Some kind of spatial partitioning is usually desireable. Particullary if you have large levels or want level of detail to reduce high poly counts. Of course it depends what you are trying to render.

Share this post


Link to post
Share on other sites
I see. Say have a quadtree, and I have a leaf that is in the FoV, but completely blocked by say a wall. Is there any way of checking that and thus skipping it?

Share this post


Link to post
Share on other sites
quote:

Say have a quadtree, and I have a leaf that is in the FoV, but completely blocked by say a wall. Is there any way of checking that and thus skipping it?



I don''t think its really useful to start adding occlusion culling to your quad tree -- its probably going to take more time than its worth (unless your geometry lends itself well to be computing visiblity from one square to the next). Just draw from front to back and let the depth buffer take care of it.

Share this post


Link to post
Share on other sites
From front to back? Let me guess: OpenGL will check if something has been rendered at the pixel it is at (that is infront of the pixel just about to get renderd), and if something allready has been rendered there, it will skip it? (If you understand what I mean... <:-)

Share this post


Link to post
Share on other sites
Yeah pretty much. It''s done on a per-pixel level. When the card is drawing a pixel, it stores the depth in the z buffer. When you go to draw another pixel on top of it, it checks the z buffer to see if it can skip drawing the pixel.

It''s a little more complicated than that inside the card, but that''s the basics of it.

- Pete

Share this post


Link to post
Share on other sites
OpenGL and Direct3D both have hardware fogging, so you don''t need to bother with the specifics of how the card does it internally.

Adding very subtle fog to a scene is a great way to get a realistic feeling of depth in there.

Share this post


Link to post
Share on other sites
quote:
Original post by fettodingo
I see. Say have a quadtree, and I have a leaf that is in the FoV, but completely blocked by say a wall. Is there any way of checking that and thus skipping it?


Quadtrees/Octrees/BSP Trees are useful for culling outside the FOV. An addition to cull in the FOV is PVS - Potentially Visible Set. This is commonly a bit array that tests for visibility from each leaf to every other leaf. PVS can cull objects behind walls, but still inside the FoV.


Mike


"The state is that great fiction by which everyone tries to live at the expense of everyone else." - Frederick Bastiat, The Law

Share this post


Link to post
Share on other sites

  • Advertisement