Octree/BSP tree/quad tree whatever....

Started by
4 comments, last by arikMag 19 years, 10 months ago
I read about previous posts in this forum about those 3 methods - and I still get diffrent answears : I wish to implement a big city with alot of buildings and details -Most of the time I look on the city from an high place like a helicopter - so I need to catch a lot of things. so what can be the best to use for this purpose from those 3 methods. thanks.
Advertisement
Quake BSPs are mainly for indoor environments so you can skip them..

Quadtrees are mainly for outdoor environments, that don''t have too much heightdifferences.

Octrees are for indoor as well as out door environments, because it can divide a building as well as a city and also a terrain. It''s basically a quadtree, but one that supports dividing in the up-direction so it works with indoors as well.

Octrees are the best for your case in my opinion.

--
You''re Welcome,
Rick Wong
- Google | Google for GameDev.net | GameDev.net''s DirectX FAQ. (not as cool as the Graphics and Theory FAQ)
I would have to agree, because if I''m imagining your situation correctly... you will have plenty of distribution of polygons in all 3 dimensions. Whether or not your buildings are very complex, You would probably want stuff down on the street & stuff up on the rooftops, right? octtree does for 3 dimensions what quadtree does for 2.
Whatsoever you do, do it heartily as to the Lord, and not unto men.
I think the best bet in this situation is a hybrid approach. Use the Octree to divide up terrain and the outside of the buildings. Use BSPTrees to model the insides of the buildings. When searching through the Octree for things to draw, if you happen to come across a portal leading into a BSPTree (ie a window of a building) draw the BSPTree from that portal using its PVS system.

Properly done BSPTrees are extremely fast at determining what should and shouldn't be drawn. By using a BSPTree for the interior of buildings (what they're good for) you'll eliminate alot of overdraw while allowing extra detail to be added via furniture, people, etc inside the buildings.

Quite a bit of useful discussion on this topic happened on the BSPTree course discussion boards at gameinstitute.com if you feel like enrolling.

edit: spelling
edit: fixing more made-up words

---
Phear the hamsters!

[edited by - mr_leerman on June 4, 2004 1:03:55 PM]

[edited by - mr_leerman on June 4, 2004 1:05:54 PM]
---Phear the hamsters!
I don''t think he is concerned with the inside of the buildings. I could be wrong.
If the poster is just conerned with the outside, then please disregard my previous post.

Just that this:
"I wish to implement a big city with alot of buildings and details"
Suggested to me that he was talking about details as in the inside of the buildings.



---
Phear the hamsters!
---Phear the hamsters!

This topic is closed to new replies.

Advertisement