# Wolf's Tutorial #1 - Custom Brushes

## Introduction:

This tutorial will discuss various ways to make (and save for later use) custom shaped brushes. This is an intermediate tutorial and I assume you have used UnrealEd before, and can do basic things with it (such as make rooms, add lights, change textures, etc...). I will be using keyboard shortcuts so it is a good idea to print the Toolbar Reference in Creative Carnage's Basic Tutorial and the Keyboard Shortcut Both can be downloaded from My tutorial page. (If you are reading this tutorial offline then go download these two files before starting). Familiarize yourself with the keyboard short cuts (invaluable) and the Toolbar (so when I say things like "click the Scale Brush icon" you know where it is). I highly suggest that you read a BASIC tutorial or two if you are just starting out, and then come back to this tutorial when you have a basic idea how to make rooms and such. This tutorial will walk you thru the process, step by step. It is suggested you follow along using the examples presented. The same prinicples will apply to any shapes you want to make (look at some of my prefabs on my prefab page for examples). Once you get the hang of it then go experiment with your own shapes.

I will try to be thorough and use a lot of pictures in my tutorials. If at anytime you are not clear on something e-mail me and I will try to clarify it for you.

Other Game (Quake 2) level editors read this: There are many differences between Q2 style editing and Unreal Editing. The biggest is that in Q2 you used 6 brushes to make up a cube. EVERYTHING was added to the world, and you used CSG subtracting to carve "holes" in previously added brushes. In UnrealEd it is different. There are two types of brushes you add. Think of them ass Positive (added) and Negative (subtracted) brushes. The Subtracted ones appear brown in the the 2d views, and the added ones blue. You can only add brushes inside of subtracted areas. You use subtraction to make your basic room (remember the world starts out solid and you use the red brush like a cookie-cutter to carve out rooms) then add brushes into it for details. Any Q2 converts who used QED should be familiar with negative brushes. If you are used to Worldcraft or Qoole then you are used to using a brush to "carve" or "clip" out parts of a brush, and then deleting your carving brush. With UnrealEd you don't delete the carving brush. You shape the red brush around the area you want to carve out and then SUBTRACT it from the existing brush. If you are not clear on that e-mail me and I can give you a better example. Let's move on.

### Part One - Intersecting

You should know by now that UnrealEd has built-in "primitive" brushes. Cubes, Cylinders, cones, spheres, even stairs. This tutorial will cover how to make other shapes, like wedges, ramps, etc. All these shapes will be built using only UnrealEd. If you have a 3D modelling program like 3DStudioMax and you intend to use that for making your shapes you will have to wait for a later tutorial. This tutorial will show you how to use the above mentioned primitives to make various shapes. But before I get into shape specifics let me teach you about some tools you should know about to help you better understand what we are going to do, and familiarize you with the terms we will be using.

Brushes

You should know by now that a brush is a shape (block or whatever) in 3-d level making. In UnrealEd there are different types of brushes. The red brush is your builder brush. It is the brush you will shape to make your brushes. Remember the UnrealEd map starts out as a huge block you carve your world out of. You will also use the red brush to add things back into the areas you carve out. Wether adding or subtracting brushes, the red brush works the same way. You shape it, position it, and then click the appropriate button (wether you are adding or subtracting) to make your brush. At this point you should open UnrealEd, load a texture set (I am going to use NaliCast.utx but you can use any you like), and build a 512 X 512 X 512 room. Add a light in the middle so when we rebuild it doesn't go dark. Let's build our first custom shape.

The Wedge There are several ways to make a simple wedge. For the purpose of this tutorial I will show you two ways. The second way is much simpler, but go thru both methods so you can learn how to use Intersect and Deintersect (two things you HAVE to know to make custom brushes in UnrealEd).
Okay, your room is built. Now you want to put a wedge along one wall to act as a torch holder. The overall dimensions of the wedge will be 128(h) x 64 x 64. So lets resize our red brush by right-clicking the cube icon and adding those numbers in. Click "build" and you should now have a proper sized red brush. Move this red brush to the center of the room (so it's not touching anything else) and click the ADD BRUSH button. You should now have a 128 x 64 x 64 rectangle in the center of your room, hanging in the air. Now, without moving the red brush, click on the SKEW BRUSH button. Now we skew the brush until it looks like the figure below.
Now that we have the area we want to move surrounded by the red brush, we need to do one more thing before we subtract it. Click the INTERSECT tool. What this does, is reshapes the red brush. It will "cut away" any part of the red brush that is NOT touching a solid. Press it and see what happens.
now, the red brush is only where we want to subtrac, so go ahead and click the SUBTRACT BRUSH button. Now where the red brush is the rectangle we started with is brown. You can see that in the 3d view only the blue brushes show up. That is bcause the brown brush is a "negative" or subtrated brush, and is basically "not there" to the naked eye. "But Wolf, I don't want the wedge to look like a two-toned rectangle in the 2d views! How can I fix this? Easy. The game engine prefers you don't have a bunch of negative brushes hanging around anyway, so let's fix that. First you have to reset your red brush so it's not skewed anymore. Right click the red brush and select "reset" then "reset scaling." Now go to cube properties and resize the red brush to 140 x 80 x 80 and click "build." What this does is makes the red brush bigger than the original rectangle. Now position the red brush so that it totally surrounds the original rectangle, and doesn't touch anything else.
Now click the INTERSECT button and your red brush should re-shape itself to to the wedge. The intersect tool will "ignore" subtractions and only shape itself around additive brushes. This will make one wedge shaped brush instead of a half-positive, half-negative brush.
Now move the new (wedge shaped) red brush to where you want the wedge to be against the wall.
Click the ADD button and you should now have a wedge against the wall. Now highlight the original blue rectangle and the brown subtract we took from it.
Make sure nothing else is highlighted and press the delete key. Answer "OK" to the pop-up window which is asking you to confirm the deletion. Now rebuild the map and you should have a wedge against the wall. You can add a torchflame actor on top of it (like I did in the first picture) or whatever you want. Saving your Brush

Great, we made a wedge! If you are using this as a torch holder you are probably going to want to use it again, so let's learn how to save it so we can reuse it later. The Red brush should still be "wrapped around" the wedge. If it's not, simply highlight the wedge, right click it and choose COPY POLYGONS and TO BRUSH. Now it should be back. Other tuorials on the web have told you to save the brush (as a .u3d file) and then load it when you want to use it again. That would be great if the tool worked! It's a bug in UnrealEd and doesn't work properly. What you really want to do is EXPORT the brush. From the file menu at the top choose Brush, and Export Brush. The default file type is .t3d and this is fine. UnrealEd likes these much better than .u3d files! Just name it (keep it simple, call it wedge1.t3d or something)and click SAVE. Now you have exported the brush to a good .t3d file. Let's test it! Click the CUBE icon to make your wedge-shaped red brush a rectangle again. Now go to Brush, IMPORT Brush, and find your Wedge (wedge1,t3d) and double click it. A pop up window will open. Make sure that SOLID MESH and KEEP ORIGINAL POLYGONS INTACT are selected and click "OK." You should have a wedge shaped red brush again. You can move this where you want it and ADD it to your world! This method works for all shapes in UnrealEd, no matter how many additive and subtraction brushes you have. Just remember to make the red brush totally surrounding the shape you want before INTERSECTING it. Always EXPORT and IMPORT brushes, rather than save/load.

### Part Two - Deintersecting

So, you liked the wedge? But isn't it a little boring? Wouldn't it be cool if it were more, "jazzy?" How about a kind of conical shaped Wedge? Let's do it!

The Conical Wedge
This method is acutally easier than the Wedge example. I used the wedge to t3each you how to use the INTERSECT tool. Now we will use the DEINTERSECT tool! Okay. Let's start a new map. Again, make it 512 x 512 x 512. Now, since we want the wedge to be conical choose the cone tool. Right click it and select properties. Let's make this wedge 128 tall and an outer radius of 64, with eight sides. Don't worry about "cap height" or "inner radius" at this point. You should now have a red builder brush in a cone shape. First we need to rotate it so that the point is pointing down. One that is done, position the red brush against the wall where you want it, but leave half the cone "outside" your room.

Once you have the cone positioned right click the DEINTERSECT tool. The half of your cone outside of your room should disappear. Deintersect will cut away any part of the red brush that is not visible, wether it is inside another brush, or outside of your room.
Now click the ADD button and you should have a wedge shaped cone against the wall. Again, you can put a torchflame on it or whatever you want.

Wrap Up

Deintersect is a powerful tool. Along with Intersect you can use it to make some really cool, complex shapes. Remember: INTERSECT will remove any part of the brush that is not touching another brush, and DEINTERSECT will remove any non-visible part of the brush. The next tutorial will get into some more complex shapes.

©Copyright 1999 Tony Garcia (a.k.a. Wolf). No part of this tutorial may be reproduced without my permission.