Regarding the BSP system in general.

Regarding the BSP system in general.

Re: Regarding the BSP system in general. Posted by Condus Mundus on Mon Dec 12th 2011 at 4:46am
Condus Mundus
169 posts
Posted 2011-12-12 4:46am
169 posts 118 snarkmarks Registered: Apr 24th 2010 Occupation: Thinking up random profile details Location: Forty minutes south of Nowhere.
I decided to post this in GB on account of this pertaining to game rendering in general. It breaks the BSP system down very effectively in my opinion so I thought it would be useful to post.

Link
Now remember kids. Asking questions is a good way to get censored by the government.
Re: Regarding the BSP system in general. Posted by omegaslayer on Mon Dec 12th 2011 at 7:08am
omegaslayer
2481 posts
Posted 2011-12-12 7:08am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
That article can be a little misleading as to the true meaning of what a BSP tree actually is. Yes sure this is the application of the algorithm, but the the true meaning of BSP is to overcome the painters algorithm cyclic problem:

http://en.wikipedia.org/wiki/Painter's_algorithm

BSP cuts are made to partition the entire set if polygons of the entire "world" ("world" is used loosely here, what graphics calls it a "scene") into "font" and "back" polygons relative to the polygon doing the cutting, so given an arbitrary camera position, the engine will know which order to draw the polygons in so the correct "layering", and "order" of the polygons appears correct. To demonstrate what im talking about, check out the BSP java applet:

http://www.symbolcraft.com/graphics/bsp/index.php

Which is where the term BSP comes from. Because of it's grad success you see it everywhere.

Ultimately though this is a small subset of other graphics topics/problems:

http://en.wikipedia.org/wiki/Computational_geometry

If you like this stuff I suggest you check out 3D projections. When I learned that 3D graphics are really just 3D points projected to an arbitrary 2D plane and then rendered pixel by pixel, it blew my mind:

http://en.wikipedia.org/wiki/3D_projection

Also the Doom 3 shadows (coined as the Carmak reverse because Doom 3 was kinda the first one to make use of the algorithm):

http://en.wikipedia.org/wiki/Shadow_Volume

And if you understand c/c++ you can check out doom 3's source code:

https://github.com/TTimo/doom3.gpl
Posting And You
Re: Regarding the BSP system in general. Posted by Condus Mundus on Mon Dec 12th 2011 at 4:56pm
Condus Mundus
169 posts
Posted 2011-12-12 4:56pm
169 posts 118 snarkmarks Registered: Apr 24th 2010 Occupation: Thinking up random profile details Location: Forty minutes south of Nowhere.
Wow, thanks for all those links. I have been researching rendering in general lately as it is the only aspect of a game engine I have limited knowledge with.

I would point out that I didn't intend for this article to be completely accurate, just that for someone like me it seemed to break some of the abstract aspects down for easier "mental chewing" in a way.

Thank you again for the additional information. I'll be sure to check out those links when a bit more free time comes up.
Now remember kids. Asking questions is a good way to get censored by the government.
Re: Regarding the BSP system in general. Posted by omegaslayer on Thu Dec 15th 2011 at 4:04am
omegaslayer
2481 posts
Posted 2011-12-15 4:04am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
Mostly everything these days is done with programable shaders. Which are programs that get executed ON the GPU in their own programming language ("c"-like langauge). You can check out the wiki-link here:

http://en.wikipedia.org/wiki/Shader

But it talks about a thing called the graphics pipeline, and that can get confusing. Its a fancy way of saying how a computer translates a bunch of 3D data points into the pixels you see on your screen.

A LOT of rendering has to do with linear algebra, using vectors (or 3D points) and matrixes to render things. It's how openGL, DirectX do a lot of things. Here is a tutorial in XNA that uses microsoft's XNA framework (to make PC/XBOX360 games) that I think does a good job of explain how the use of vectors/matrixes/linear algebra are used in rendering:

http://rbwhitaker.wikidot.com/basic-matrices

The best way to learn rendering in general is to learn how to program. Theres an entirely open source engine that uses a lot of common rendering techniques here:

http://cubeengine.com/

http://www.ogre3d.org/

They provide a lot of tools to get you stated in making your own game. Those are written in c++. If c++ isn't your cup of tea, you can check out python with openGL:

http://pyopengl.sourceforge.net/

And just start playing with the openGL graphics API.
Posting And You
Re: Regarding the BSP system in general. Posted by Orpheus on Thu Dec 15th 2011 at 2:27pm
Orpheus
13860 posts
Posted 2011-12-15 2:27pm
Orpheus
member
13860 posts 2024 snarkmarks Registered: Aug 26th 2001 Occupation: Long Haul Trucking Location: Long Oklahoma - USA
Time was, "Left Behind" meant something totally different. ;(

The best things in life, aren't things.
Re: Regarding the BSP system in general. Posted by Crono on Thu Dec 15th 2011 at 7:41pm
Crono
6628 posts
Posted 2011-12-15 7:41pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Just to be clear ... if you're not a solid C++ programmer I strongly suggest you start with something WAY simpler.

You're talking about stuff that's not even talked about until senior level computer science. Seriously, this stuff is a lot harder than it sounds, even if you're not implementing it yourself. It's some of the most complex algorithms out there outside of combinitorial games and some Machine Learning.

If you really want to get into it, I'd suggest you just start with rendering a scene ... rather than trying to go all out with a level representation data structure (technically just a culling technique) like a BSP tree.
Blame it on Microsoft, God does.
Re: Regarding the BSP system in general. Posted by omegaslayer on Tue Dec 20th 2011 at 4:19am
omegaslayer
2481 posts
Posted 2011-12-20 4:19am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
I should clarify too. Matrices and vectors aren't the actual rendering techniques used. That falls to rasterization (fancy word for filling polygons with color given arbitrary vertexes).

Like Crono said too, these topics are very advanced. Rendering scenes in code is a good place to start. I would suggest (if you're still interested) picking up python openGL - python's memory management is a lot more forgiving then c/c++'s manual memory management, and the syntax is a lot easier to pick up.
Posting And You