BSP Tree , how to create and render?

Started by
8 comments, last by breakin 15 years, 4 months ago
it's a long time I'm looking for a good start point about createing and rendering bsp trees , but all I have found is some papers about "what's bsp tree",any body can help me?I need some source code. sorry for my great english!
Advertisement
I have implemented BSP trees for learning purpose.

First of all what type of rendering system you need ? BSP are best for rendering BACK to FRONT order. It helps to implement transparency. In my opinion BSP is not suited for large models.
Quote:Original post by kdworld
First of all what type of rendering system you need ? BSP are best for rendering BACK to FRONT order. It helps to implement transparency. In my opinion BSP is not suited for large models.


Or front to back for collision testing! ;)

If you need source (not the best way to learn IMO) then check out the quake 1 source.

The only remaining advantage of BSP style systems is that automatic portal + occlusion information can be generated due to the concept of solid space

Cheers,MartinIf I've helped you, a rating++ would be appreciated
I need BSP Tree for collision detection.
is there a better way to fast rendering and collision detection in large scenes?
I think for large screens , you can use octree or just AABBoxes(There are a number of data structures exists) .
By simple frustum culling can faster your rendering. IF your scene is really big you may need occlusion culling also. Implementing this will take some time.

What type of collision do you need ? Look SAT (separating axis theorm). I think SAT is fast method for checking intersection between triangles, triangle and boxes etc. Also if you don't want precise collision , use bounding volumes. It is easy and fast.

yes,may be i have to learn octree.also using bounding box for intersection tests is nice.but another question : what about moving camera in our levels?
what kind of intersection test must be used?
I'm sorry for my super advanced questions.
Quote:Original post by fatima
I need BSP Tree for collision detection.
is there a better way to fast rendering and collision detection in large scenes?


BSP tree splitting is generally regarded as not worth while for collision. Generally speaking an axis aligned BSP tree (kdtree) is sufficient. You might want to consider two different spatial partions if you have a lot of moving objects, one for static geometry and one for moving. A dynamic sphere tree for moving objects seems to work quite well
Cheers,MartinIf I've helped you, a rating++ would be appreciated
BSP-trees are not used that much anymore due to the fact that they operate on triangles and not on objects. Today is often better to just draw an object, rather than to spend time on determining what triangles are visible are what are not. Z-buffer makes back-2-front-rendering obsolete. Ordering draws front-2-back is better with Z-buffer since then most pixels are only rendered once.

For collision purposes I think that loose-octrees or octrees or any other structure than BSP-trees is the best! BSP-trees are hard to update when things move and it is hard to get rid of all numerical problems.

That said, I think BSP-trees are really cool, they just don't make that much sense nymore.
ok,I'm going to learn octree.any suggestion for start point?
I'm going to suggest a book.

http://realtimecollisiondetection.net/books/rtcd/

It deals with many structures that are needed in collision detection. It might be nice since it is written for people who wants to do collision detection (rather than say occlusion culling).

After reading the book you might decide to use Octree, BVH or something other. Perhaps you decide not to do it yourself and use a existing library instead.

There is also a list of all papers referenced from the book. If you don't want to borrow/buy it, perhaps you can find something in there!

http://realtimecollisiondetection.net/books/rtcd/references/index.html

This topic is closed to new replies.

Advertisement