Sign in to follow this  

BSP creation question

This topic is 4593 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

Hi there. Long time since my last post ;) I've been working hard on my new engine. Especially on the map editor's part. I Made something cool like Worldcraft (hammer) editor of half-life. Now all is working (texture editing, spliting, carving, etc). ;) So now... the big thing, compiling this in BSP !!! :D Ok, I already know the basic algorithm to perform this. Balancing the tree and always get the face that split less the others bla bla bla :P Where I just dont know what to do, is with this (screenshot from my editor): http://www.geocities.com/duktroa/BSPReady.jpg I raised the top of the rooms just for the screenshot to see inside. The point is : After BSP compilation, I only supposed to have the interior walls as result. So the question is : How to remove the other faces of my brushes??? Probably I have to perform this BEFORE creating my tree. Any idea? thanks

Share this post


Link to post
Share on other sites
beats me as I haven't tinkered with making any map editors yet but looks great so far *gives a thumbs up*

Good luck on getting it solved. I've been wondering how its done myself.

~Brandon Haston~

Share this post


Link to post
Share on other sites
I can tell you how Half-Life did it:

After the BSP process you have a set of convex subspaces (nodes) each of which contains any number of faces and entities (lights, monsters, spawn points, etc.). You want to discard the 'outside' nodes and keep the 'inside' ones, so you choose a point that is guaranteed to be 'outside' (Half-Life uses (-4096,-4096,-4096) for this since that is at the edge of the valid coordinate space). Mark the node containing that point as 'outside'. Then mark that node's neighbors as 'outside', then their neighbors and so on. If at any point you mark a node as 'outside' that contains any entities then you've reached the 'inside' of the level, which shouldn't happen and your level has a leak. If all possible nodes are marked as outside without a leak then you can discard the marked nodes and their associated faces.

Share this post


Link to post
Share on other sites
ok, thats seams to be a nice solution !!!

So I have to build my BSP for ALL my polygone first? And delete the outside that way afther... hum, but the tree will not be unbalanced?

Share this post


Link to post
Share on other sites
It will probably not be balanced. You will have to re-balance it. AFAIK, the BSP process itself won't produce a balanced tree. You'll want to check and see if balancing the tree twice is better then doing the outside-removal on an unbalanced tree.

Share this post


Link to post
Share on other sites

This topic is 4593 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this