Mapping 103: Patches

## Patch Meshes

Outside of using models in your map, patch meshes are the secret sauce to making your map stand out visually. Patches are like flexible pieces of fabric that can be molded into various shapes. While regular brushes are modular blocks and can be shaped in various ways, they cannot bend or curve in the same way. Patches allow you to design more complex, curved, or irregular surfaces. Things like cylinders, spheres, archways, railings and more are all accomplished via the Curve menu.

.

Another difference between brushes and patches is that only one side of a patch is visible. When you convert your brush to a patch (**shift+p**) you are essentially creating a one-sided mesh that you can modify curve points, add or remove vertex points to accomplish various goals.

* **Patches are not structural**. You still need to have a structural brush protecting your map from the void.
* When placing a Patch for the first time, where your orthographic 2d angle is facing is where the one-sided face of the curve will show.
	+ Use ctrl+I to invert the side which the patch is facing

Only one side of a patch is visible. To add additional planes, you can either add a cap or thicken the brush.

* Thickening a patch (Ctrl+T) or adding caps (Shift+C) are the key utilities to making your curve more than just a flexible 'cloth'. You can start to really make some fun fluid shapes by using more than one patch together.
* Cap/Thickening a patch is what turns your 'piece of fabric' into a full shape instead of just a one-sided mesh.

* You can merge and split patches using the (now built-in) plugin bobToolz.
	+ (Menu: Plugins > BobToolz or via this menu:)
	+ This YouTube tutorial gives you a fun idea of ways to split Bevels to allow for further texturing or customization of your patchwork.
* Generally speaking it's a good idea to have something a caulk brush inside a large curve - players are able to sneak inside patches depending on how they are formed.

## Curve Menu Commands

### Simple Patch Mesh…

(Menu: Curve > Simple Patch Mesh…)

All the following shapes you will learn are simply variations of a Patch. To make a Patch, first create a brush of the dimension desired for the patch. Shift+P (or selecting Simple Patch Mess from the menu) opens a Patch dialogue window. This lets you select the vertical (rows) and horizontal (columns) complexity of the patch. The more complexity means being able to perform more deformations on the patch. It also means adding a greater number of triangles that must be rendered. The more complex of a curve you create, the less optimized the patch will be.

You can add sides to your patch by thickening it or adding a cap.

#### How to thicken a patch

1. Select your patch.
2. Go to drop down menu labeled `Curve` and click on `Thicken`. shortcut is `Ctrl`+`t`
3. The Amount equals the amount of units to thicken the curve.
	1. You can change it however u see fit, but it looks best in increments of 8 (8,16,24 etc...)
	2. Make sure to delete any unnecessary patches that wont be seen in game.
4. If you want this entire thickened patch to act as one, try merging it. Just keep in mind this can potentially have texture alignment issues.

Here is an example of the thicken, cap and invert tools at work:

### Bevel

A bevel is essentially a quarter cylinder patch shape. One side of a halfpipe if you are familiar with skateboard terms.

Before (brush) / After (curve)

This is what a Bevel looks like with a cap (more on that later):

.

### Cylinder

(Menu: Curve > Cylinder)

Cylinders are quite useful shapes for pipes.

Select the cylinder and press `v` for vertices mode. Small green and pink spots will appear. You can edit the position of these points and therefore have an influence of the shape of it. I suggest selecting the middle points and then playing with the scale tool to scale all of the middle points on the sam axis. Now you can make 90° cylinders or other stuff. Depends on what you want to build. If you are curious about how to connect one cylinder to the other, take a look at this JKHub tutorial.

Using the transform tool will help when trying to curve tools. Select the vertex and control points you want to curve, select the transform tool and drag the blue lines:

### Square Cylinder

This is a cylinder with no curves. It essentially looks like a 'hollow regular brush'.

### Cone

(Menu: Curve > Cone)

A cone is a cylinder with control points drawn together and welded at one end to form a point.

**Design Note:** Half of a sphere can be constructed from a cone. Start with a cubic brush. Convert into a cone. Go into edit vertexes mode and grab the control point at the peak of the cone. Pull it downward to half the height of the cone until you like the results:

If you want to turn it into a full sphere, Clone the resulting piece and flip it upside down so that both patches are touching. Merge.

### Cap

(Menu: Curve > Cap)

This command adds "cap" patches to the ends of the patch. Generally these are combined with bevel, cylinders or more complicated/rounded patches. Play around with caps and thickening patches to get an idea of the differences.

The original brush and the caps or thickened patches are linked together as a func\_group entity if the original patch is set as a group. The type of cap depends on the selected patch:

Various forms of patches, practice transforming a brush into each of these to see the results:

 **Square End Cap** | Capped in the same manner as a cylinder

**Important to note: caps only work with certain patch sizing, so pay attention to any errors in the console if they do not show up and resize your patch accordingly.**

### Insert/Delete

(Menu: Curve > Insert/Delete)

*note: the bars at the top of this menu allow for it to be dedatched for faster access when doing a lot of patach work.*

Adding control points increases the complexity of a mesh while not actually increase the physical size. Press v to see the vertex points of your patch. The pink points are the curve points. Additions are usually done before manipulating the patch mesh. The best way to figure out how this all works is just to play around with adding/removing rows or columns and getting a feel for it.

Deleting control points reduces the complexity of a patch mesh. Be warned that the features created by the removed points are also removed. It does not make the mesh a less complex version of the former design. Deletions also change the dimensions of the mesh, removing the area created by the deleted control points. A mesh cannot be reduced smaller than a 3 column by 3 row complexity.

## Matrix Menu

### **Invert**

(Menu: Curve > Matrix > Invert)

(Shortcut: CTRL + I)

This command inverts the normals of the patch mesh. The normals control the direction of facing for the texture skin and the clipping surfaces.

### Re-disperse

(Menu: Curve > Matrix > Re-disperse)

This is used on a selected patch. When rows or columns are inserted or added to a patch, the dimensions of the patch are not changed. The distances between the new additions and the old points are not the same. This command averages out the distance between the points. It does not change the size of the patch.

(Menu: Curve > Matrix > Re-disperse > Cols)

(Re-disperse Columns: **SHIFT + CTRL + E** / Re-disperse rows: **SHIFT + E**)

**Smooth Rows / Columns**

(Smooth Columns: SHIFT + CTRL + W / Smooth rows: CTRL + W)

This tool is relatively self explanatory but an important one to play with if you aren't quite liking the shape of your curve. Useful for a soft-reset.

## Patch Workflow

* With "**Curve → Insert/Delete**" you can add or remove columns or rows to a selected patch, cylinder, cap or bevel.
* Press **V** to move vertices around.
	+ Use Grid snap **CTRL+G** on selected vertices of two different patches that won't merge and then try merging. Sometimes this fixes it.
* Use **SHIFT+LMB** to select more than one vertex. Another neat way to select more than one vertex is to hold shift and drag your right click. This will select anything within the lasso.
* Press **CTRL+I** to invert front side with backside of patch.
* Press **SHIFT+C** to add a cap to bevels and cylinders.
* Deforming a brush (Curve->Deform) is a nice way to add a bit of random variation to your patch

### Texturing Thickened Curves

The latest version of Netradiant helps to make texturing a patch easy compared to how it used to be. Just make sure you naturalize the texture via ctrl+n.

Patches are really cool and can create beautiful pieces to really take your map to the next level due to the seamless and smooth, rounded possibilities.

Take some serious time to practice creating various patches, merging patches, splitting patches, adding rows and columns to your patches and creating patch combinations. Just remember that if two connecting vertex points of patches are not aligned properly, a player may be able to sneak their way through your patch, so a good rule of thumb is to put caulk brushes behind patch work if it is complex. Safety first!

Next chapter: Mapping 104: Entities

## More Resources:

* An older tutorial on GTKRadiant, but some good ideas to try practicing can be found in this tutorial.
* There is a fun brush generator tool you can try out on this website.
* https://www.moddb.com/games/quake-iii-arena/tutorials/advanced-arches