2Bit's Mapping Corner on www.PythonOnline.co.uk
ET Mapping Tutorial

Lesson 18

Topics

Detail brushes vs structural brushes
 
Detail brushes vs structural brushes
Back to main menu
Detail brushes vs structural brushes [Top]
What's the point in having Detail brushes and Structural brushes?

Imagine two large room walls, one detail and one structural.  This table shows the basic difference.

Brush type Blocks player line of sight? Blocks program line of sight?
Structural Yes Yes
Detail Yes No

What this means is that from a player's perspective, he can't distinguish "detail" brushes from "structural" ones - but the program can.

ET has to decide what elements of a map might need to be drawn for a player every time it refreshes the display.  And it does this by judging what is in a player's line of sight, based on what structural brushes are in the way.

When Radiant builds the map, it breaks the whole volume of the map down into chunks (called portals), whose edges are made up of structural brushes.  I'll use this picture to illuastrate what this means in practice.

Suppose an area has been created that connects two rooms, as shown here.  I'm sure you've often seen examples where connecting corridors or passageways go through seemingly pointless 90 degree bends, when a straight corridor would have made more sense.  Monte Cassino is one.

The map author has done this to reduce the amount of work ET has to do when drawing the screen for a player.

A player in room 1 can't see anything in room 2 and vice versa.  Indeed a player can't stand anywhere and see both rooms at once.  This is how it seems to the player and how the map author intended.

But this is only true when the brushes are structural.  If the brushes had been detail although it would all look the same to the player, ET would actually draw everything in the direction the player faces, regardless of all the intervening walls.  The player would still see the same though, because the nearest wall would get drawn last and would obscure all the stuff behind it.

So how do you choose when to use structural and when to use detail?  It would seem that if you made everything out of structural brushes there could not possibly be any wasteful drawing by ET and you'd always get the best FPS....

Well yes.  And no.  The problem arises when some of the brushes you make are small and irregular, say for crates that are scattered about at odd angles, likewise chairs, wall charts, steps of a flight of stairs, window ledges, cables, ducts, wonky fencing, planks stacked at different angles, etc etc.  You would make all these detail brushes, because they reasonably wouldn't affect overall line of sight - if you're standing on a step, you'll see about the same when you stand on the next step - but more importantly if they were made of structural brushes Radiant would break up the surrounding volume into vast numbers of portals that would make your compile take forever and would clog up ET when it ran with vast portal tables telling it the 450,000 portals you can see from one step, and the 450,000 very similar portals you can see from the next step and so on.

In summary:

Use structural brushes to define buildings and principal areas/rooms.  Keep it in mind to try to separate main areas in this way so that ET won't have to draw more than it has to.  For example, in 110 Factory all of the outside is detail brushwork, while the bunker and factory walls are structural.  A player standing on the submarine will make ET draw everything in the direction he is looking at, but not the insides of the factory, nor the rear of the bunker (it will have to draw the inside front of the bunker because of the window opening).

Use detail brushes to make small details, intervening walls where it really adds little to the display overhead, and any surface like steps, ramps, walkways etc where the view from one to the next differs very little.  Also you really must make terrain with detail brushes when using GtkGenSurf, which we'll cover later.

You will often forget to make brushes into detail as you make your map.  A very handy tip is to press ctrl+D from time to time to toggle the filtering of detailed brushes.  When you press it first, all your detail brushes will disappear.  It can then be very obvious that you've got some structural brushes that ought to be detail.  As you go around making them detail, they disappear too.  When you're satisfied, ctrl+D to get the detail brushes displayed again.
These pictures are of a Radiant view of 2Tanks.  The first shows all the brushes.

Then we press ctrl+D and filter out all the detail brushes.

You'll notice virtually all of the roads, terrain and buildings disappear.  They are all detail.  The main areas the players can get inside are made of structural brushes, so for example ET won't have to draw the inside of the Fuel Dump nor the inside of the V-1 Base unless the player is in there.

There was no point in making roads and dummy buildings structural, because there are too many ways for the player to see over the top of them anyway, so they wouldn't really act as efficient blocks to line of sight.  By keeping the dummy buildings simple the overhead in displaying them is small, and it cuts down hugely on unnecessary portals (and keeps my compile time sensible!).

With 6Flags the difference is even more startling.  Here's the normal view:

And now with the detail brushes hidden:

The open, rolling terrain, on which a player could get quite high, made it impractical to use structural brushes.  It also meant I couldn't go overboard on including too many fancy buildings etc as they would start to be a drain on the FPS.

Finally here's an "outside" view of TankBuster, showing how structural caulk brushes surround the overall environment.

Next lesson