Results 1 to 4 of 4

Thread: Depth test, BSP tree, performance...

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2003
    Posts
    12

    Depth test, BSP tree, performance...

    Hi There!

    First, sorry for my bad english.
    I'm a newbie in opengl programming, on my bumpy path through Redbook. And I've become a bit confused.
    Suppose that I plan to write a program which draw many houses in 3d and these houses consist of many prebuilt objects(walls, doors, windows, roof, etc). I've read in RB, that enabling depth test in opengl increase performance. Nearest object drawn, covered object not drawn, right? I've read something about frustum culling( it says: "DONT DRAW WHAT CANNOT BE SEEN.") But depth test deal with hidden surface removal, then what need is there for frustum culling? Is anything outside a clipping plane "nothing" for opengl? And why programs need for (for example) BSP tree algorythm to increase performance of rendering of bigger scenes?
    I will greatly appreciate any help!

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2003
    Location
    United Kingdom
    Posts
    20

    Re: Depth test, BSP tree, performance...

    With depth testing objects that are behind other objects (ie can't be seen) are overwritten by the object in front so the display is correct. With depth testing the object in the background is still being drawn. It's just overwritten by the object in front. Depth testing doesn't do any sort of Culling (you need to use glEnable(GL_CULL_FACE) for that) it just makes the display look correct by checking the z value of the pixels. You need frustum culling which removes all the objects that are not in your immediate fov (field of view). This will massively speed up your OpenGL program. I'm not sure about BSP trees though.

  3. #3
    Member Newbie
    Join Date
    Apr 2003
    Location
    California, UT, USA
    Posts
    35

    Re: Depth test, BSP tree, performance...

    If you have a really large scene, you can use a BSP tree to render a relatively smaller number of triangles. For most scenes this isn't necissary because the hardware has a z-buffer which is very fast. I would only look into BSP trees if your application has a large number of triangles and you aren't getting a high enough frame rate, or needs to be drawn back to front (say for alpha blending).

    Brian

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2003
    Posts
    12

    Re: Depth test, BSP tree, performance...

    Thx guys!

Similar Threads

  1. Perform stencil test only if depth test fails
    By Ray1184 in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 09-23-2015, 01:21 AM
  2. OpenGL: dynamic depth sorting with BSP Tree
    By Eerie Code in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 08-14-2014, 10:54 AM
  3. Framebuffer depth test with depth and stencil buffer
    By moldyviolinist in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 07-29-2013, 08:21 PM
  4. Can Alpha Test work the same way as Depth Test?
    By Rong Yao in forum OpenGL: Basic Coding
    Replies: 12
    Last Post: 05-13-2004, 02:40 PM
  5. An idea: Hardware accelerated tree-based visibility test
    By Toxigun in forum OpenGL: Advanced Coding
    Replies: 28
    Last Post: 03-18-2002, 11:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean