Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dr_slash_uh

Bsp trees are very difficult?

This topic is 5214 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is learning binary space partitioning very hard? I have been trying to learn during the last 3 hours and I haven''t gotten anywhere. Can someone point me in the right direction so I can learn.

Share this post


Link to post
Share on other sites
Advertisement
Game Tutorials has a series of three tutorials which cover Quake3 BSP rendering with OpenGL, they also have an article which goes through the Q3 format which you should read before going through the tutorials.

Share this post


Link to post
Share on other sites
They can be, it all depends on your level of experience. I would venture to say that it isn''t a beginner concept. First off, maybe you could sheld some light on how much experience you have with ADTs (abstract data types). If you are not familiar with these, no problem

Hop over to our forums where it is a little quieter and I will try and walk you through how BSPs work.

forum = http://www.NeuronGames.com/phpBB2/



Sincerely,
Randy Trulson
www.GamePotato.com
www.NeuronGames.com

Share this post


Link to post
Share on other sites
It might take more than 3 hours :-)

It depends on how deeply you want to get into them. I think the first question is, what do you want to use them for? BSPs are perfectly suited to certain types of games and environments, but not to others. There are other options (octrees, bounding volume trees, ABTs) which are also very useful, and in some cases easier to implement.

What kind of engine are you trying to write?

Share this post


Link to post
Share on other sites
I am trying to build my first(Doom type) 3d engine. I got the barebones laid out correctly and all the methods to display polyongs and sectors. I also created an editor and file loader. I just do not know an effecient way to render the map. I have all my sectors stored in long arrays. Inside the sectors all the wall are also stored in arrays. From my experience with game programming arrays are can be inefficient. I just want to know the best way to render a map.

Share this post


Link to post
Share on other sites
quote:
Original post by dr_slash_uh
I just do not know an effecient way to render the map. I have all my sectors stored in long arrays. Inside the sectors all the wall are also stored in arrays. From my experience with game programming arrays are can be inefficient. I just want to know the best way to render a map.

Using arrays isn''t inefficient for most things. In your case BSPs won''t really help much. Because you already have sectors I suggest you build a simple portal engine on top of them. It would be nice if you gave use more information about the renderer.

Are you already frustum culling the sectors? When it comes to actually rendering it would be better to turn the "walls" (2D lines or 3D polygons?) into vertex\index buffers grouped by texture (assuming you just have one texture) and render the buffers in visible sectors. Current APIs like a small number of batches, so doing things like rendering individual walls with glVertex or DrawPrimitiveUP calls is bad. This is all assuming you''re using a 3D API and not actually doing Doom style rendering.

Note, if you don''t have that much data (like 1000 polygon levels) you might as well just render the whole thing if your target hardware was released within the last 4 years. This is a big mistake that newbies make. They write overly complex "optimizations" and use them to draw 100 triangles. In many of these cases they could just render everything and get better performance.

With more details someone can answer all of your questions.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!