I have come to realize the real importance of staying on the grid.
So now I am looking for BSP Holes ...
... stairs that I have rotated or something ...
... I can solve one and a new hole appears ...
Also these holes disappear when I do a BSP rebuild but appear when I do a Full build, whats up with that?
Also spheres of any type cause problems it seems.
- Staying on grid helps the CSG build process to more successfuly create the final sets of triangles, collision and lightmap data without (hopefully) encountering errors.
Off-grid brushes are more likely to create extra or excessive thin sliver faces, have problems with slightly submerged surfaces, issues with slight angular sides, etc.
However, certain brush shapes and boolean operations can cause issues on the total construct for what would otherwise seem to be a valid design.
Other problems can arise from the fact that UnrealEd's build process will usually split triangles to facilitate better BSP database sorting/culling (these are called "Cuts").
IMHO any mapper using CSG should read up on exactly what the construction process is, before constructing anything, as it can help considerably to pre-plan the layout so that you don't walk into design flaws themselves.
Here is just one page from Wikipedia on CSG (Constructive Solid Geometry). There are lots of pages you can find through Google regarding CSG use in video game engines.
- Locating BSP problems in the CSG can be very difficult. Not only may there be actual visible issues, but you essentially have to go around and shoot at or jump at every play-area surface to make sure it has collision, and walk along every standard path (floor/hall) to check for invisible collision errors that might be lurking somewhere along a hallway.
There are some good tutorials on CSG errors.
I recommend reading the ones from my mapper friend Hourences.
BSP Errors
Semi-solid Brushes
Also see this UnrealWiki page on
BSP Holes.
It is a bit messy, so take it or leave it for some of its comments.
- Both stairs and rotation of CSG brushes are leaning towards being bad.
Stairs, especially the Curved and Spiral, should not be used unless necessary. They are bad for creating CSG build issues. Better luck is usually found replacing all stairs with Staticmeshes (which is actually a good idea for something I should add to my RO mesh library, a variety of lightmapped staticmesh stairs).
Rotation of CSG brushes can be a bad thing, as any rotation
does throw all of the brush vertices off-grid.
Even with Rotation Snap ON and rotating to 90, 180, 270 degree values, all of the vertices will now be off grid.
Personally, I always create CSG as standard cubes, never rotate unless I absolutely have to, and usually create each brush independantly. And vertex editing for changing the brush shape.
- Fixing one CSG build error often leads to another, since changing brush location, brush order, etc. causes the CSG build to change, which can lead to issues on other boolean operations.
- A BSP Build only performs the boolean operations on the CSG Brushes, it does
not perform all of the final build functions such as lightmapping, etc. So you cannot rely on a BSP Build only to give a valid representation of the completed build.
Be aware that there is a lot of false information regarding the UnrealEd CSG construct out there in tutorials etc., as many of the "mappers" who wrote them do not fully understand what is occuring inside of this portion of a game engine.
For example, "deleting and re-creating" a brush to fix BSP errors is not ever necessary, unless you wish to actually change the actual shape of the brush beyond what vertex-editing can do.
Re-creating a brush of the identical dimensions in the same location simply puts that brush at the end of the CSG construct list order.
This
same function can be performed with
less work simply by right-clicking on the brush, and changing its Order to Last.
Don't rely on CSG Build versus Build All to determine where any errors may be, you require a Build All to see the actual final construct.
Don't rely on a non-Zone-Portal'ed CSG construct to determine that there are or are not any errors.
Until the map is fully Zoned and all of the Zone Portals are in place, you
cannot tell how the build will split up the construct, and whether holes/errors/Cuts will or will not be in specific locations.
And after adding all of the ZonePortals, if you did not do this as the last step in the CSG construction, all ZonePortals should be set to Order Last. Note however that I have seen this kill maps, so be sure to make a backup before setting all of the ZP's order to last.
Use SemiSolid brushes where you can for surfaces that the player will not be walking directly on (SemiSolids often lose faces or collision when booleaned by Solids). SemiSolids can often resolve issues with forced triangle creation from Solids, however, it does result in more total triangles in the construct.
Solids always force removal of internal solid-space faces, coplanar hidden faces, and triangles are constructed from each brush vertex across other brush surfaces. SemiSolids do not.
Use the Zone/Portal View mode to see where the CSG surfaces and BSP Cuts are occuring across surfaces in the map, such as floors and walls.
You can encounter errors/holes/collision by Cuts passing through surfaces that you do not want it to do so, for example across a floor at an angle and through a wall.
This can be solved by numerous methods depending on the design. For example, Cuts running through floors and into walls can often be changed by forcing a new subtract/add coplanar brush pair into the floor (perhaps a good spot for an area-rug anyway, and don't just submerge an add brush, use a subtract followed by an add). Or if a wall or stairs are causing triangle creation or Cuts to occur across a floor, you may be able to raise the stairs 1UU above the floor (floating) so that it doesn't force triangle creation across the floor (at the expense of more total triangles).
Some people use off-map construction areas to build various complex brushes that are then brought over into the map area. This can be helpful when building specific objects. And allows you to use Intersection to obtain a single final brush.
However, unless you retain the construction area, you lose the ability to modify the original design if need be.
- You
never want to use CSG Spheres, they are "BSP-hell" and are guaranteed to cause issues.
Always use StaticMeshes for spheres, hemi-spheres, or other rounded or more-angular shapes.
Basically, if you are using the Stairs brushes, especially the Curved or Spiral, or Spheres, or BSP Terrain, you are pretty much guaranteed to have problems.
These shapes should always be done with StaticMeshes instead.