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



Recommended Posts

TerranFury    142
It''s easier to write the code for a z-buffer than a BSP tree, sure. But neither is a substitute for the other. BSP is used for front-to-back sorting of your scene''s geometry, and that can solve the hidden-surface problem, and z-buffers sort pixels front to back, so they can as well. But a BSP tree can be used in conjunction with a PVS system, etc, to greatly increase rendering efficiency. Inserting a player model into the BSP tree, though, would be overkill; use a hardware z-buffer for that. In short, both in theory do the same thing, but they should under most circumstances be used in conjunction with one another.

Share this post

Link to post
Share on other sites
S1CA    1418
I''d say Z buffering:

pDevice->SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE );

However you''d probably use both - each solves a different problem. Z buffering is pixel level prevention of overdraw.
BSP trees are more to do with not drawing complete polygons or even complete models. BSP trees also have a nice side effect that it can give you the polygons in front to back sorted order, which is perfect as input for a Z buffer.

Simon O''''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites
jwalker    122
well i use both ..
i have a bsp for rendering everything
except the player models and some dynamic terrain objects.

the rest rely on the zbuffer for proper rendering .

{ Stating the obvious never helped any situation !! }

Share this post

Link to post
Share on other sites