Sniper's Paradise!


BSP concept (for Unreal):

BSP (Binary space partition) is the system in which all the geometry is categorized.

This is used to organize how all the brushes in the world relate to each other and where empty or solid space should be and what you can see.

As you add more geometry each brush will cause cuts to previously added brushes (no matter solidity).
The cuts, known as nodes, are indexed and put in this BSP tree to calculate where you can walk and not and what should be rendered in the current view.

If you get a BSP hole you will see that particular area as a black hole and can be caused by a large number of factors.
This can be too complex brush work, incorrect use of semi/non solids, brushes that do not fit to grid and so on.

Visibility is no longer calculated by brushes that block the current view. This means that all brushes from the one in the back to the front are drawn on top of each other.
The use of zones changes this as the engine will only draw anything inside the current zone and what you actually see into any other zone.

However, when the engine calculate what you see and don't it use this BSP tree and renders all the nodes, on top of each other.
If the engine fails to correctly trace the node(s) that you should see, it will not render it and you get a hole that you can see through.


BSP holes and HOM:

A BSP hole can be one out of three effects.
First is simply a node that is not rendered due to incorrect trace of the BSP tree based on the current view. What you see is just a hole where part of the wall should have been. These usually occure when looking at ceiling or floor from specific angles. The reason for them is that the engine don't think that you can see that particular node from the current view.

As the engine don't draw the current texture it will draw whatever is behind it. If this is other parts of the level you will see it clearly. Otherwise you will get the infamous HOM effect as the engine don't draw anything there.

The other two BSP effects is incorrect solidity, either invisible mass or lack of it. Invisible mass or lack of it, where it should not be, is caused by BSP errors most likely due to incorrect use of brushes and/or semi/non-solids. Invisible mass will block players and projectiles and lack of mass will cause players to die, leaving a crater.

Remember to rebuild when you have added or subtracted brushes. Failing to do this when trying to play the level will cause the same problem.

HOM, or Hall of Mirrors, has nothing to do with BSP errors. This effect only occure when the engine has nothing to render and the last frame is shown instead. When you move the view a repeat of the last frame will occure and you get what looks like a Hall of Mirrors.

The engine don't have anything to render only when you are able to look directly into the void. This can happen if you have BSP holes, lack of texture on a brush or the texture have masked/transparancy set and nothing behind it.


Nodes and Polys:

A poly is the same as one side of any brush. Other widely used terms for polys are faces or sides. To simplify, a cube brush have six polys, sides or faces.

When new geometry is added to the current world it causes cuts to existing geometry. Each cut creates a new surface and these are known as nodes. These nodes are then used in the BSP tree.

All cuts are an extention of the poly of a brush. The reason for this is that the engine need to be able to calculate what you see and don't see. If you stand on one side of the cut you should be able to see the poly of the brush you are facing. If you stand on the other side you should not be able to see it.

Change to BSP view or zone/portal view to see these cuts.

By tracing these cuts you are to a certain degree able to eliminate problem areas and to find brushes that actually cause BSP holes. It will also give you a good pointer on what you might need to do to fix exisitng BSP holes.

If you type "stat fps" in Unreal you can see both the node and poly count. It's fairly important that neither is too high. Usually a map range between 2-4 times higher amout of nodes than polys.

Using brushes like semi-solids will reduce the amount of nodes as they don't cause cuts to be made. As a result, extensive use of semi-solids can increase the chance of BSP holes to occure as no new nodes are introduced. (Usually on the semi-solid itself).


CSG and solidity (Construction Solid Geometry and Solidity):

The world is in terms of editing a large solid cube shape. From this you remove and add mass as you progress in the creation of your design.

The ways you are able to use brushes are CSG (Construction Solid Geometry) and solidity. CSG equals additive or subtractive while solidity refers to solid, semi-solid and non-solid. This is the clay you are able to use to shape the world as you like.

A subtractive brush will remove mass inside its frame, while additive add mass. Solidity can obviously only be assigned to additive brushes.

In the editor the type and state of any brush is shown with colors. A yellow brush is subtractive while a blue brush is additive and solid. A pink brush is additive but semi-solid, while a green brush is non-solid.

You will quickly notice that an invisible collision hull is simply a semi-solid.

Subtractive and Solid brushes will cause cuts to surrounding brushes. Semi- or non-solid brushes will not cause cuts but can themself be cut.


Brush order, First and Last:

To let the engine known when a brush should be introduced to the world it order everything from first to last.

The first brush is added/subtracted, then the second and so on until the last brush is compeleted.

In a sense this could be considered a simple timeline to prevent chaos. When you start editing you must use a subtractive brush. This brush is placed first and the next brush you create is added as the second.

When a brush is added/subtracted to the world it will create cuts to previously added/subtracted brushes. To prevent semi- and non-solid brushes to recieve cuts they should be placed last in the brush order.


Deintersect / Intersect:

To avoid BSP holes you might want your brushes to fit nicely with the rest of the geometry. To accomplish this you most likely need to use deintersect or intersect.

Both will cut parts of the brush to make sure it fit with the rest. Intersect will remove all parts of the brush that occupy open space, or areas that has previously been subtracted. Deintersect do the opposite, remove parts of the brush that exist in solid area (added).

Actually these two functions have two significant uses. The first and obvious one is to make brushes fit with each other if primitive brushes can't be used. The second is used to create complex brushes.

Complex brushes will increase the chance of BSP holes. Building complex structures using mutiple brushes will more likely result in BSP holes than one complex brush. The engine is also able to render one brush faster than many smaller ones. However, too complex brushes can be the cause for BSP holes and in cases like this it's actually better to let more primitive brushes overlap each other. (Just don't do that with semi- or non-solids).


The Grid:

This is the lines that you see, both in any 2D view and horizontal center of the 3D view.

Not much to tell about the grid really but you can adjust the spacing of the grid from the lowest setting 1 to the highest 256.

When you edit and place brushes they automaticlly snap to the grid based on the spacing you have set.

As long as you let your brushes snap and stay on the grid you greatly reduce the chances for unwanted BSP problems.

So in short... Do not turn off, EVER! (Both the grid and snap can be turned off but you really don't need to do that).

If you open the properties window for a brush you can see the exact location of that brush (or object) in the world. These coordinates (X, Y and Z) should always be whole values. If not, the brush is not on the grid as it should


Semi-Solids:

These brushes are just like regular brushes, almost, with some major difference. They will not cause cuts to surrounding brushes. This is a huge advantage as it will greatly reduce the chance of causing BSP errors. In the editor they are pink in color in contrast to the regular solid and blue brushes.

While a semi-solid brush will not cause cuts it can itself be cut by other brushes. Logically these should be placed last (or close to last) in the brush order to reduce complicated cuts.

However, as a semi-solid brush will not cause cuts it will be rendered in full once you can see part of it. Try not to use too many semi-solids in one area at once or you could experience slowdowns.

A semi-solid will increase the poly count but reduce the node count as less cuts will be introduced into the BSP tree. If you experience a large node count, usually in detailed areas, changing some brushes to semi-solids will reduce it.

While the engine accept most subtracted and solid brushes no matter what you do with them some general rules apply to the use of semi-solids.

Do not let semi-solids be part or cause of a zone (see the zone tutorial for information on zones). It will mess up and the zone will not be zoned correct. If you need to use semi-solid to block players between two sections and filling the space will create two seperate zones you can create a semi-solid with 1 unit smaller sides. This is not a problem as it will not cause cuts and the likelyhood of BSP holes is small.

Do not let semi-solids overlap with other brushes like solids, semi-solids and non-solids. Errors like collision hulls and BSP holes are common results. (Adding a semi-solid inside subtracted area is ofcourse ok).

The editor is quite flexible and when you build your map you can at anytime change the solidity (and even CSG) og a brush. It will change according to your selection and when you rebuild these changes will be put in effect. This means that when you edit your map, find BSP cuts, build complex structures and detailed areas you can change a brush solidity from solid to semi-solid to reduce cuts and even existing BSP holes. This is done by pressing the right mousebutton on a brush, select type or CSG and then the desired selection.

Think of a large room with stairs, pillars and details. Once complete you might want to change specific brushes like details and pillars to semi-solids and change their brush order to last. Rebuild and suddenly the entire area is alot more clean and possible BSP problems might be gone.

When you add invisible collision hulls you will notice that these are the same color as semi-solids. This is because they are the same thing. Difference is that one has the property invisble set.

As a last note, yes, semi-solids will block players and projectiles like regular solid brushes so you can use them almost everywhere.


Non-Solids:

Green in color, categorized as additive by the CSG these are usually only used as sheets.

The non-solid brush will never block projectiles or players and cannot be made to do it either.

While it's completely ok for a non-solid brush to have any size and shape (like other additive brushes) there is no point in adding anything as non-solid unless you are supposed to be able to move through it. No matter if the brush is non-solid or semi-solid the engine still need to render it as long as you can see it.

These brushes should mostly be used as sheets for things like water surface, transparant decoration (chains, skyzone deco as example) and similar.

As with semi-solids these will not cause cuts to the surrounding geometry but can be cut itself and thus best placed last in the BSP tree (order).

Unlike semi-solids it's no problem for a non-solid brush to overlap other solid brushes. However, these should still not overlap semi-solid or other non-solids.

Zoneportals are just non-solids with the zoneportal property and unless this is set a non-solid will never cause/create a new zone even if it seal off two areas.


Zone Portals:

Zones are used to divide a map into segments for several reasons.
One is to change physical attributes for a particualar area and the other to reduce rendering time.

The first reason is easy enough and covered in whole by the zones tutorials.
The second reason is more advanced and require some more indepth explanation.

Basiclly a new zone tells the engine that it should not render more than what you see inside of it from the zone you are standing. If you look down a corridor, from one room to another, but both being in the same zone, most objects would be rendered from both rooms. If you divide the rooms with a zoneportal the engine will now only render what you see into the other zone.

As you understand, zoneportals are used to split areas into different zones. These zoneportals are just regular non-solid but set as zoneportals.

In short, the same rules for non-solids apply to zoneportals.

You will get the most gain from zoneportals when placed at small areas. Not only will the zoneportal be small in size and reduce chance of problems but also reduce the render time as a small space is harder to see through. Small is ofcourse relative but hallways, corridors, doorways and windows are usual places for zoneportals.

Do not zone large outdoor enviroments, it's resource demanding and you can use LocationID to tag/name different areas.


Avoiding BSP pitfalls:

Understanding how the engine works can be a huge aid in preventing possible BSP problems.
But, a few minor BSP holes can occure no matter how clean the map is built.

First step is to keep everything nice and tidy. Deintersect and interesect brushes to let them fit nicely and always use the grid.

When creating the level keep to large geometry first and add smaller and smaller brushes afterwards. Keep editing and add details and semi-solids. In the end you add all non-solids and portals.

If you need to, regulate the brush order by changing brushes to first or last.

If you get BSP holes from too complex brushes try changing them just a little or let more primitive brushes overlap. Always rebuild before you check for BSP holes as some holes might appear just after you have added something.


Preventing / Fixing BSP Holes:

You might start by setting a standard for what kind of BSP holes you have. Put them in three categories, minor, problematic and major.

Minor BSP holes are those that you must be at specific locations and look at some odd angle to see. These holes will not normally show when playing the level. Unless you feel that they are too distracting or really need to remove them you might consider letting them be.

Problematic BSP holes are like the ones for minor but are clearly visible from most angles and will be visually disruptive when playing the level.

Major BSP holes are those holes that cover a large area or cause invisible hulls/mass that kill or block players.

These need special attention.

No matter what kind of problem you want to fix you need to know where it is and from where it occures (mostly visual problems).

In the editor, change to zone/portal view and locate the area the problem exist at. Look from where the cuts are originating and trace them to any surrounding brushes.

If you find one specific brush that cause the problem, try to remove it, rebuild and see if that solved it. If that is the case, leave that brush out or find another solution to how that brush should be. This could be a different shape or made into a semi-solid.

If the problem still is there, even after removing the offending brush you might have picked the wrong one or your problem might originate from the problem brush itself. (Usually this is if you have larger BSP holes or invisible mass/hulls).

If the brush is complex, try removing it and use more primitive brushes instead, letting them overlap.

Other solutions is to actually add some brushes between the problem area and the brushes that cause the problem. These will interupt the cuts that were made and create new cuts themself.

Invisible mass/hulls usually only occure if you have a zoneportal, sheet or semi-solid that is "destroyd" by overlapping additive or subtractive brushes. While it's no problem for a sheet or zoneportal to overlap other brushes it is important that they are last in the brushorder so they don't get cut.

As said, minor BSP holes are difficult to avoid and can be alot harder to remove without recreating small or large parts of the map/area. Still, treat them as any other BSP hole in regards of removing them.

Spam Killer

Back To Top
2005 Sniper's Paradise
All logos and trademarks are properties of their respective owners.
Unreal™ is a registered trademark of Epic Games Inc.
Privacy Policy
Website by Softly
Powered by RUSH