How does BSP work?

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Jason210
Gnoblar
Posts: 2
Joined: Sun Mar 07, 2004 11:25 pm
Contact:

How does BSP work?

Post by Jason210 » Thu Jun 03, 2004 5:06 pm

Hi

Sorry if this sounds stupid or retarded, but I still getting to grips with programming and how his 3D engine works.

I can't afford to invest too much time with Ogre in case it turns out to be incapable of doing the project I have in mind.

The thing that concerns me most is rendering large scenes with loads of triangles. I notice that the no. of triangles in BSP demo increase and decrease as look around, suggesting that rendering of certain areas is switched on and off. Is this done automatically? Do you just drop a huge model with 1million trianges in it and then some kind of occulsion culling takes place?

Sorry for the retared question.

Jason
0 x

jonnii_

Post by jonnii_ » Thu Jun 03, 2004 5:24 pm

bsp is a spacial partitioning algorithm. it will only render what you can see (well just about). if you google you can find lots of information on the algorithm.
0 x

User avatar
Jeff Leigh
Kobold
Posts: 28
Joined: Mon Oct 07, 2002 9:06 pm
Location: Colorado, USA
Contact:

Post by Jeff Leigh » Thu Jun 03, 2004 5:38 pm

You should also be aware that BSP is only one of many approaches that manage scenes with large polygon counts, and that such 'scene management' plugins have been developed for Ogre which work in many different ways.

Each approach usually requires it's data to be in some specific format. For BSP rendering, you'll quickly discover that it cannot just render from polygon soup, but is limited to geometry constructed with 'brushes' and other BSP-specific concepts. These are not limitations of Ogre, but rather the BSP optimization technique.

If "polygon soup" is your prefered way of modeling, you can look into the DotOctreeScene plugin for Ogre, which renders complex arbituary geometry without the constraints of BSP (but I imagine without a lot of optimizations preventing over-draw as well). There are also a few scene managers optimized for terrain rendering.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Thu Jun 03, 2004 6:06 pm

The other thing to consider with BSP is that the tools most people use to create the levels (Quake3 / HalfLife etc) cannot be used on commercial projects without paying a license fee. That's why I don't spend much time on the BSP renderer - it's a nice demo, and fun for non-commercial projects, but essentially it's not very useful for 'real' projects unless you can build your own map compilers (not easy), or you're willing to pay iD money.

Many engines major on BSP as their only world format, which I think is misguided since the engine may be free, but the tools are not. Ogre supports any scene format with an appropriate plugin, as pointed out by others here.
0 x

User avatar
Noiprox
Halfling
Posts: 64
Joined: Mon Apr 05, 2004 6:25 am
Location: North Vancouver, Canada

Post by Noiprox » Thu Jun 03, 2004 6:14 pm

If you're sorry about asking the question here, then obviously you know that this is not the place to ask such a question! Please use a search engine first, then search the forum, then consider posting a question only if it is OGRE specific.

Strictly speaking, BSP can render an arbitrary set of polygons just fine. The constraints are a consequence of PVS optimization, since PVS requires portals.

The way to get an environment managed by the BSP scene manager is to create a Quake3 map, BSP/Vis/Rad/etc. it, and then load it that way. You'll notice this is what both the BSP samples do, and what the documentation very clearly explains. :roll:

If you have poly soup and don't care too much about performance or scalability, you can get generic culling without PVS through a plain octree.
0 x
Dieter Buys
Image
"Death, be not proud, though some have called thee mighty and dreadful, for thou art not so." - John Donne

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Thu Jun 03, 2004 7:18 pm

Noiprox wrote:If you're sorry about asking the question here, then obviously you know that this is not the place to ask such a question!
Be Cool, man. It's not the first time you are providing this as an answer. ...

Try and search for BSP - and you'll probably realize that it's not as easy as it sounds - those who are in the know does not share the knowledge - however, I've dug up an old tut from ye olde mr-gamemaker site (before they went commercial and founded the Game Institute) - actually, it's two tuts: solid bsp and solid-leaf bsp. Pretty thorough. Hard to find (of course)

@Jason210:
I can mail it to you if you want! :) Send me a PM with your email address.
(You will have to have access to windows, though - 'cause the tut-files are in microsoft web archive (.mht) format )
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

Jason210
Gnoblar
Posts: 2
Joined: Sun Mar 07, 2004 11:25 pm
Contact:

Post by Jason210 » Thu Jun 03, 2004 11:06 pm

thanks all.
0 x

User avatar
litobyte
Halfling
Posts: 64
Joined: Mon Mar 28, 2005 7:03 pm
Location: Somewhere in Italy
Contact:

Post by litobyte » Mon Apr 18, 2005 8:05 pm

So to code an indoor level engine Ogre suggests to use the OcTree Scene Manager with .mesh complex meshes / .scene ?
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Mon Apr 18, 2005 8:11 pm

Jeff Leigh wrote:... you can look into the DotOctreeScene plugin for Ogre, which renders complex arbituary geometry without the constraints of BSP (but I imagine without a lot of optimizations preventing over-draw as well). There are also a few scene managers optimized for terrain rendering.
It's the dotscene octree :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

SUFK
Gnoblar
Posts: 13
Joined: Mon Apr 11, 2005 5:21 am

Post by SUFK » Tue Apr 19, 2005 4:29 am

sinbad wrote:The other thing to consider with BSP is that the tools most people use to create the levels (Quake3 / HalfLife etc) cannot be used on commercial projects without paying a license fee. That's why I don't spend much time on the BSP renderer - it's a nice demo, and fun for non-commercial projects, but essentially it's not very useful for 'real' projects unless you can build your own map compilers (not easy), or you're willing to pay iD money.

Many engines major on BSP as their only world format, which I think is misguided since the engine may be free, but the tools are not. Ogre supports any scene format with an appropriate plugin, as pointed out by others here.
What about QuArK? Couldn't you use it to make a .map file and then use that as a mesh file? I know that QuArK is released under the GNU GPL, but I forgot what the building tools for Quake 1-3 were released under...... Or even if they did have a license.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Tue Apr 19, 2005 5:53 am

You know, that's the problem here, in a nutshell.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

Post Reply