|
|
|
|
|
|
|
|
| Links |
|
|
|
Advanced Geometry with the Clip Tool - By Raeven0 |
|
This tutorial was submited on Dec 17, 2005.
All good maps are composed of more than just similarly-sized rectangular blocks.
There's no way around it: blocks are boring. But how can we do better?
Skill: Clip Tool
The Clip Tool is extremely useful for manipulating geometry. With it, one can cut off parts of an object, or simply split the object into pieces. Suppose we have a brush like this:

We can use the Clip Tool, for example, to turn this into an angled face. We need to select the brush, then click the Clip Tool Icon. Next, we click and drag a line across our brush:

That line defines a plane along which our brush will be cut. When we drag out that line, one part of the brush becomes red, and the other part becomes white. The red part will be deleted; the white part will remain. So, if we press Enter at this point, we get this:

But the clip tool is capable of more than that. Let's go back to the line step again:

Now, instead of pressing Enter, let's click the Clip Tool Icon again.

Wow! The white and red switched positions. If we press Enter at this point, we'll have the northwestern half of the brush (formerly, we had the southeastern half). But click the Clip Tool Icon one more time, and marvel:

If we press Enter at this point, we'll have two different brushes where we formerly had one. This capacity to split brushes has important applications in creating good-looking complex geometry.
A Hole(Requires Clip Tool)
One easy way to make a hole in the wall is to build four blocks that chance to have a space between them. But we can't always foresee that we'll want a hole in a certain position, and building blocks around oddly-shaped holes can be difficult. Suppose we have a wall, and we want to open a window in it.

With the Clip Tool explained above, we can cut a hole in this brush to function as our window. We'll work in the lower right (Side) view; and, before we begin, let's reduce our grid size a little for precision. We'll press the [ key once.
Remember that we are working in the Side view. We'll select the brush, click the Clip Tool Icon, and drag a line across the brush. Note that we don't want to delete anything at this point, so once we've drawn the line we'll click the Clip Tool Icon until both sides of the brush are white.

(And press Enter. We're done here.) But that's just one cut--there's no window yet. We need to go further. Select the larger of the two new brushes...

...and cut it up in the same way.

This cut will create an isolated centre block. This isolated centre is important. If we cut a hole in it, because it is visually the same as the other blocks, we will appear to have a hole in our wall. Using the Clip Tool, we proceed to cut up the centre block:

And, as if by magic, we finally have a block in the centre of the wall. I wonder what will happen if we delete it...

It's a window. Fabulous!
This is a rather specific example, but the principle can be used widely. Lo, a hole in the ground:


We can also think outside the box a little. Lo, a funny-shaped hole:



A Slope(Requires Clip Tool)
Horizontal and vertical things are boring. We can spice them up by sloping them. If we have some object like this:

--we can select it, then open the Clip Tool and cut off a corner:

That slope was very easy to make!
A Curve, Three Different Ways(Requires Clip Tool)
(Recommended: A Hole)
(We'll also mention Displacements)
When I was in primary school, one of the things my mathematics teachers would occasionally show (for fun) was how to draw a curve using only straight lines. Given a grid, we students invariably drew something like this:

The idea was to number the grid lines like so, and connect 1 to 1, 2 to 2, etc. Source is incapable of producing curves, but we can get pretty convincing curves using only the clip tool's straight lines. Be amazed:




Naturally, I just deleted the extraneous pieces before taking the final two screenshots. Curves made in this fashion may occasionally have vertices off the grid, and the compiler uses them to cut up surrounding space and geometry (this is the way the engine works--a beginning mapper need not understand it intimately) into perhaps too many pieces. Such curves should be func_detail entities in most cases.
Another, perhaps simpler way to make a curve is by drawing out a Cylinder. If we click the Brush Tool Icon, we have access to the Objects Toolbar on the right side of the screen:

If we open the Objects drop-down menu, we have access to this list of shapes:

Let's choose Cylinder, and in the Faces box we'll write 16. This will give our cylinder 16 side faces, or four in each quarter. Next we'll draw out a box as we normally would for a block, and press Enter:

We now have a cylinder, of sorts. If we wanted to make this into a single curved wall, we could cut off all but a quarter of it:

Again, this brush curve may have vertices off the grid, and it will cause the BSP compilation process to create extraneous cuts. It should be a func_detail entity.
Curves can be made in a third way, as well, with displacements. Review your displacement facts here, then continue.
Displacements may seem useless for producing good curves, but the Subdivide feature can actually be quite nice. Let's suppose we want to turn a square brush into a round column.

The first thing we need to do is open the Texture Application Tool (or Face Edit Sheet). The upper and lower faces of the brush are unnecessary; we only want the sides for this effect.
We ensure that the top and bottom faces of the brush are unselected by clicking any side:

Then comes a weird part. Without using the camera tool, we must move around our brush so that we can select all of the sides. An easy way to do this is to place the cursor in the 3D view and press Z; we can also navigate with the arrow keys. Note that W, A, S, and D always work as long as the cursor is in the 3D view.
So, moving around our brush, we must hold CTRL and click each side. We should result with the brush's four side faces selected:

Hard part's over. Now we're going to move to the Displacements tab and Create displacements on our four faces. (It doesn't matter which power we choose.) With those faces still selected, we'll Subdivide the displacement. Result:

Well, that looks cool, but we wanted a column, not an hourglass. Subdivide alone won't give us a column; instead, let's just clip off the pointy ends of the hourglass (I hope you still remember how to use the clip tool). With those points cut off, we'll expand the remaining cylindrical part to its original length. These screenshots were taken in Valve's new SDK.


The result is a very pretty cylinder. Yippee! Of course, since it's a displacement, we don't want it to be a func_detail entity. Displacements don't cause any BSP cuts, and they aren't allowed to be entities!
Still need help? Ask your questions in one of our HELP FORUMS
|
|
|
| Comments |
| Jack - Nov 26, 2008 |
| Just found this website. Best tutorials for Hammer ever. I like how you put the major parts in bold. lol Helps a lot really. |
| Dominic - Aug 3, 2008 |
| Awesome tutorial, i learned bunches out of this. |
| lemming77 - Jun 25, 2007 |
| What are you doing making cylinder shapes out of displacements? It may take longer to render, but you get about 10x the polygons and vertices you would with a cylinder. |
| MBD - Dec 17, 2006 |
| Displacements are much, much better than 32 sided cylinders. Render easier too. And you can do more with them than you can a brush. |
| Piuneer - Dec 16, 2006 |
| I don't really get the point of doing some of this. There's a cylinder tool for a reason. Oh well......... |
| MBD - Dec 16, 2006 |
| Well really you shouldn't use brushes for spheres. Those are more for models. |
[4 extra comments]
|
|
|
|