Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Help with BSPs?

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    bort
    Posts
    2

    Help with BSPs?

    I'd like to use a BSP Tree in my current engine (for a game). However, all the tutorials I find come with software rasterization only.
    This just ends up confusing me a ton, as I know nothing about software rasterization, nor do I wish to pursue that.

    If anybody knows where I can find the source of an engine that uses BSPs that's in OpenGL I'd appreciate it, espescially if it's accompanied by some type of tutorial webpage or is well-commented.

    C++ or C, though C++ is preferrable, as I like OO

    THanks.

  2. #2

    Re: Help with BSPs?

    I have some code on my webpage to generate a leafy BSP tree. The example is really simple and I tried to comment it so you should be able to use it.

    Nate http://nate.scuzzy.net

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Cologne, Germany
    Posts
    1

    Re: Help with BSPs?

    Hi!
    The BSP-FAQ by SGI is good, I think.
    http://reality.sgi.com/bspfaq/

    Chris

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    bort
    Posts
    2

    Re: Help with BSPs?

    Nate, I got your demo and it looks like I can learn a lot from it, but I wanted to ask you - what is the difference between a "leafy" BSP tree and a regular one?
    Thanks for the code...now to sit and stare at it till I understand it

  5. #5

    Re: Help with BSPs?

    In a nodey BSP tree faces are stored at nodes. So at every node there will be a list of faces that are coplanar with eachother. In a leaf based BSP tree faces are stored in leafs, nodes with no children. So rather than storing the coplanar face in a node it is pushed down either the front or back of the current node. The faces that are stored in a leaf will form a convex hull which allows for the faces to be rendered in any order with backface culling enabled. If you need anymore help just email me and I can give you a bunch of misc links I have collected over time.

    Nate http://nate.scuzzy.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •