Skip to main content
gamedev.net
🔒 Locked

Octree..BSP...which one?

Started by dabx11 6 replies 300+ views
Original Post
dabx11
dabx11
First this is not a what are they or how do i make one question. I would like to make an engine that can handle large outdoors with complex indoor buildings... An octree seems to be the best choice for this, but it has it''s problems too..for example, inside a building it would still draw outside nodes that would be covered by the inside walls. So an idea i had would be to use a PVS for each node, has anybody tried this? It seems that this would defeat the purpose of the octree in the first place, by this i mean...i would use the PVS to cull nodes instead of going through the tree. Maybe i misunderstand the purpose of PVS? Another idea i had was to use a BSP for storing objects in the octree so i could do some CSG. That way i could make holes in the walls like red faction. The problem i see there would be that it would make the PVS option useless. Is there another option I should look into, I don''t think portals or KD trees would help either.
Indeterminatus
Indeterminatus
Hi!

I might be totally outdated in this respect, but I would rely on BSP technique. You might be faced with performance problems in the outdoors area, but you should be able to fix that with a LOD algorithm. Hope it helped!


Indeterminatus

--si tacuisses, philosophus mansisses--
Indeterminatus--si tacuisses, philosophus mansisses--
intransigent-seal
intransigent-seal
You might want to look into portal algorithms. They have the advantage of being easily integrated with other systems, and at the same time being very good for indoor stuff. So you can use Octtree/Quadtree/ROAM/Whatever for your outdoor engine, and use portals for your indoor engine, and flip between the two very easily.
And portals also let you do cool special effects, like (for example) TV monitors showing completely different parts of the world.

John B
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
Vaporisator
Vaporisator
Well, the Tribes2 Engine (or the Unreal2-Engine, don''t remember) uses octrees for the levels (outdoor). The buildings insides are then linked as BSP-trees into the Octree. I would guess that the octrees and the BSPs are connected via portals, so you can look into and out from the BSPs. So, almost or exactly what John said...


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!
Yesterday we still stood at the verge of the abyss,today we're a step onward! Don't klick me!!!
DanG
DanG
I aggree that a portal PVS indoor + outdoor system will work best. I''m not a fan of including a BSP tree as a octree outdoor node, but thats my own problem (probably cause i''m not a good programmer). My suggestion is the two seperate engines approach. It reduces you geometric flexibility and design, but i like it. Have a fast quacke like engine indoors with PVS, BSP, etc. Then polygons that are gaps into the outdoors (doors, windows) define this in the drawing editor. these portal polygons can be used to create culling "frustum" (with more than just square shapes) that you then pass to the outdoor engine, including perameters for where to draw the output (where the window is on the screen). Then when you go outdoors, pass just one frustum to the outdoor engine and have it render to the full screen. You see what i''m trying to say?

You should probably make the engine so that this method works from either outside in or vice versa, and of course there are tricks to make transisions right, protal tracing good, etc., but it works nicely (i think this is sort of the idea in Descent 3).

Anyway thats just my long two bits


He who said money was the root of all evil knew little of the nature of money and less about the nature of man.
Ambassador: Mr. Bush are you stoned or just really, REALLY dumb?Pres. Bush - I assure you I am not stoned.
intransigent-seal
intransigent-seal
If you want to know more about Portal based rendering, then there is a series of articles on flipcode, and there''s two articles at Delphi3D.net. And don''t forget to google.

Of course, apart from google, those will only help if you do decide to use a portal engine.

John B
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
einstein2
einstein2
I don''t know everything about either of these but the way i see it - Quake and hlf-life use BSP, and (correct me if im wrong) i belive unreal tournament does.
Basiror
Basiror
well i didn t code a real engine where i use any of those 2 methods bsp or octree yet
but i can tell you octrees are very simple for outdoor and the method of linking a bsp into an octree is genius
the bsp part might be the hardest because you need to understand how to render a bsp tree and the current bsp compilers out there produce a really complex bsp tree
http://www.8ung.at/basiror/theironcross.html

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.