Jump to content
  • Advertisement

Archived

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

Corpse

Z-buffering

This topic is 6069 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

Is Z-Buffering better for hidden surface removal (I can''t spell it) than BSP trees? Or it''s just easiest?

Share this post


Link to post
Share on other sites
Advertisement
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
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
www.creative-asylum.com

Share this post


Link to post
Share on other sites
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!