Advertisement

Octrees VS. BSP Trees

Started by December 13, 2000 05:48 PM
9 comments, last by joeyb 23 years, 11 months ago
Hi, I was wondering which you all think is better, octrees or bsp trees. I have read a lot about bsp trees but I am yet to find very detailed info on octrees. GLVelocity has some info, but not a lot. I''m about ready to start work on a small 3d engine and i am still planning things out and this is one of the things i am stuck on. Any help would be appreciated, thanks!
It really depends. BSP trees are getting a little outdated in my opinion. In those fast T&L HW days the CPU is becomming the bottleneck, and a Octree is faster for the CPU. You also can build a very accurate Octree for a 25K poly mesh in about 2 seconds on a decent computer. BSP trees are slower to precalculate and produce an average of three new triangles for every splitted one... That sucks, because you usually don''t need the depth sorted rendering that the BSP tree offers. This was way more important in the time of Q1 when SW was used and culling had to be aggressive. ANother advantage of the Octree is that it is simpler to implement. And you can quickly modify your indoor Octree to an outdoor Quadtree. And you can calculate runtime PVS for Octree nodes that contain terains... And other raycasting realtime occlusion detections are possible. On he other side, you have Q3 ;-) I can''t argue that the engine is damn fast and looks good. And it uses BSP trees...

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Advertisement
thanks for the feedback. i''m really thinking about octrees but i''d really like to find more information and perhaps an in-depth tutorial on them. q3 does look really nice but so does your 3d engine example that uses octrees . i''m gonna look into and hopefully by the end of winterbreak (woohoo, school is out in 2 days) i''ll have a decent start on this engine.
Read this topic from "Ask Midnight" @ FlipCode for more info about octrees (and some example code).
he''s right. flipcode.com is one of the best ressources for advanced gfx topics. They have lots of tutrialson spatial subdivison strcutures like BSP trees, Octrees, portals and so on...

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
I have tried implementing both bsp trees and octrees. Here are the problems I am having:
bsp trees are hard to create, but the data structure is simple
Octrees are easy to create, but the data structure is complicated
I would like to implement octrees into my 3d engine. If anyone has written octree code and knows the total idea, email me at scottgl@juno.com
Advertisement
Why not a portal engine:

- Easy to code
- Easy data structure

And they can have both Octree and BSP (and any thing else just about) latched on to it.

ANDREW RUSSELL STUDIOS
Web site coming soon...
Oh, yeah, and: Flip code ROCKS for graphics. (but GameDev also happens to ROCK)

ANDREW RUSSELL STUDIOS
Web site coming soon...
i would say octrees prolly have the better future portals + bsps r great in dungeons but COMON ON THATS SO NINETYS

http://members.xoom.com/myBollux
What other things like this are there, other than:
BSP, Octree, Portal

ANDREW RUSSELL STUDIOS
Web site coming soon...

This topic is closed to new replies.

Advertisement