Mapping 104: System Brushes

Unfortunately in JKA there is not a lot of good definitions for the building blocks of Jedi Academy mapping - System Brushes

Let's get into it a bit. You do not need prior shader knowledge, only a curiosity for how these work and a little bit of experimenting in a test map to see how they function. But do keep in mind you could easily make your own system brushes by creating your own shader with the right properties! The power of shaders goes beyond what a brush looks like, it extends into giving brushes certain powers which impact how the player interacts with the map environment as well. This is elaborated upon more in the Mapping 106: Shaders part of this tutorial series. Stay on target...

Before I begin describing each system shader, let's look under the hood and see what it is that's causing these shaders to interact so differently than a regular brush.

### Understanding surfaceparms

When you shift + left click on any of these system shaders, you will get to see the shader code. It may look overwhelming and confusing at first (check out chapter 106 of this guide on shaders later) but for now just pay attention to the surface parameters portion of this code.

In Quake 3 shaders, surfaceparms are used to define various properties of surfaces. These are the secret sauce which give your shaders unique properties. All of these system shaders have surfaceparms. Let's go over what each one does so that you might be able to more properly utilize them in the future. **All system shaders have various surfaceparms** in their shader properties! This is what makes them special powers, among other things written inside.

#### Common interactive surfaceparms

* surfaceparm **nodraw**: Indicates that the surface should not be drawn, aka invisible. (we see this used with nearly all system shaders)
* surfaceparm **nodamage** - cushion, no fall damage taken with this
* surfaceparm **trans**: Marks the surface as transparent, meaning light can go through this.
* surfaceparm **nonsolid**: Specifies that the surface won't stop players, items or projectiles passing through it
* surfaceparm **water**: Indicates that the surface represents water.
* surfaceparm **lava**: Marks the surface as lava.
* surfaceparm **slime** - acid physics volume
* surfaceparm **slick** - makes surface slippery
* surfaceparm **ladder** - doesn't seem to be working in jka

#### Clipping-related surfaceparms:

* surfaceparm **botclip** - blocks NPCs
* surfaceparm **playerclip** - blocks players but not projectiles
* surfaceparm **monsterclip** - blocks monsters (might not be functional)
* surfaceparm **shotclip** -blocks projectiles but not players (SP only)
* surfaceparm **nomarks** - no projectile or blood marks will be left
* surfaceparm **noimpact** - world entities will not impact this texture - swallows projectiles and leaves no damage marks.
* surfaceparm **forcefield** - reflects blaster fire

#### Invisibility parms

* surfaceparm **detail** - makes brush detail (obviously you can do this in the map editor as well, but good to know it can also be done at a shader level).
* surfaceparm **nodrop** -no weapon or siege item can be dropped here, useful for pits which can lose obj (siege) items.
* surfaceparm **nonopaque** - blocks NPC line of sight, useful if you want to block their vision from certain areas
* surfaceparm **nonsolid** - sets entire volume of brush to nonsolid
* surfaceparm **sky** - flags compiler to know this surface is to be a skybox

#### Footstep parms

* For emersion purposes, you can change the sound footsteps make on certain shaders. This is used via the q3map\_material line in a shader file.
	+ For example, **q3map\_material** **HollowWood** would give you wood footstep sounds, for example.
	+ Here is the list of possible surfaceflags available:
		- solidwood / hollowwood / solidmetal / hollowmetal / shortgrass / longgrass / dirt / sand / gravel / glass / concrete / marble / water / snow / ice / flesh / mud / bpglass / dryleaves / greenleaves / fabric / canvas / rock / rubber / plastic / tiles / carpet / plaster / shatterglass / armor

* surfaceparm **nosteps** - this would make it so that there are no step sounds

## System Shaders

If you are using MBII-SDK this comes with a new\_system pk3. This should be in your base folder. For the sake of understanding some of the newer system shaders added thanks to netradiant, I will be focusing on the shaders within textures/new\_system. Please note that the ones I have not described here are not applicable to Jedi Academy. new\_system includes shaders which are applicable to other games as well. As well, note that netradiant preferneces will need to be reconfigured for these new system shaders to work best.

#### Area Portal

An area portal is mainly used within doors as way to cull vis between areas. If you were to just place an area portal brush down on the ground and look at in game, you'd probably end up seeing a void. This is mainly used in JKA in doors. You want to essentially place this with a system/skip brush inside your door brushes with one of the faces of that brush as an area portal. More on skip later.

#### Anti Portal

These are basically more extreme portals and are not seen very often in JKA. If you desperately need to cull visibility between areas, this is worth a shot, but don't expect good results.

#### Caulk and Caulk Nonsolid

We have gone over this shader a bit before, but this is a very important building-block shader. Essentially it is a null shader. Caulk non-solid takes it a step further and is transmissible by players. There's also a few other caulk shaders in the new\_system directory that are mainly for organization purposes.

Caulk Water will create an invisible brush which also has the surfaceparm for water, meaning anywhere caulk water is, liquid exists in the water to swim in. Same goes for caulk lava, acid, etc.

#### Clipping Shaders

There are a few different variations of clip brushes out there. You'll have to determine on a case-by-case bases which works best for your needs. These are transparent shaders in-game.

* Clip is basic, blocks players but not projectiles
* Physics clips blocks players and projectiles
* Clip model - used around models, still draws marks from projectiles
* Clip wood, metal, etc - This adds material sounds for when a player is walking on them (changes footstep sounds)

#### Lightgrid

the min/max bounds of brushes with this shader in a map will define the bounds of the map's lightgrid (model lighting). You draw this around the entire area of your map where models will be, meaning both player models or map models. Note: make it as small as possible around player space to minimize bsp size and compile time

#### No Impact

Pretty straightforward, this shader prevents impact effects

#### No Draw

This is a very invisible and transmissible shader. Useful for when you want to make all sides but one invisible (good for holograms as an example). NoDraw solid acts the same but is solid. Alternative use case: have a slight in a glass and you need to make that one face invisible.

#### No Drop

This is useful when your map has siege items that are picked up. It will reset items back to their original spawn point or prevent items from going out of the map.

#### Origin

This is a very important brush for more advanced things, the onlyfocus of it is to define the origin of certain group entities which require it (examples: func\_pendulum, func\_bobbing, func\_rotating or sound). Rotating entities need to contain an origin brush in their construction. The origin point is the exact center of the origin brush.

#### Slick

This makes the area slippery! Don't fall...

#### Trigger

A very important system shader. Worth noting that if you change **any** brush to a trigger (right clicking on it - > applying it as a trigger), it will automatically apply this shader to it. This is done for convenience of organization (being able to easily hide shaders as you need when mapping). Any brush CAN be a trigger.

This shader and the concepts of what a trigger does in game are so important I have created an entire guide on it. Check it out here: Mapping 104: Triggers and Target Entities:

#### Trigger\_Hurt

Self explanatory - walk into me and you get hurt somehow. Again, you first need to turn this into an actual entity for it to work (right click on the selected brush and change it to trigger\_hurt.

#### Hint / Skip

In the Quake engine, "hint" and "skip" brushes are tools used by level designers to improve the efficiency of the compiler (q3map2)'s visibility determination and rendering process. These brushes help optimize the rendering performance of a map by providing additional information to the compiler about how to handle visibility calculations. How it should work: If the player can't see the thing, it doesn't load. How it does work: Any portal a player has visibility of, loads everything inside it.

1. Hint Brushes:
	* Purpose: Hint brushes are used to guide the engine in determining which portals of the map should be considered visible to the player from a given viewpoint. They are particularly useful in complex indoor environments with multiple rooms and corridors.
	* How They Work: When a hint brush is placed in a map, it influences the engine's decision on where to split the map into potentially visible clusters (portals). These clusters help the engine optimize rendering by only drawing what is visible to the player at a given time.
	* Placement: Hint brushes are typically placed in areas where the geometry is complex or where the engine might have difficulty determining visibility. They are often aligned with doorways or other transitions between rooms to guide the engine's visibility calculations.
2. Skip Brushes:
	* Purpose: Skip brushes, also known as skip textures, are used to instruct the engine to skip rendering certain surfaces entirely. This can be beneficial for surfaces that are not seen by the player or do not contribute significantly to the visual quality of the scene. Very similar to no
	* Similar to nodraw, when a skip brush is applied to a surface, the engine skips rendering that particular surface, saving processing power. This is particularly useful for large surfaces or areas that are not in the player's line of sight.
	* Placement: Skip brushes are typically applied to surfaces facing away from the playable area or areas that are obscured by other geometry.
	* A common use of skip is also in between doors with one of the faces set as an Area Portal. This helps doors actually block rendering in the next room until that door is opened.

Both hint and skip brushes are crucial tools for level designers working with the Quake engine or similar engines that use portal-based visibility determination. They help improve the overall performance of the game by allowing the engine to focus its rendering efforts on the most relevant and visible portions of the map. Efficient use of hint and skip brushes can lead to smoother gameplay experiences, especially in large and intricate game environments.

#### Subtle Hint

This is a slightly newer netradiant way to use hints, consider it a slightly more accurate hint in that it will not cause splits in portals outside of where you have set that subtle hint. Hints can sometimes cut portals into larger areas than Subtle Hints and continue with their hinting past where the brush ends.