Snarkpit Articles


Background, methods, pros/cons



I recently discovered a quick and simple way to use the Clipping tool to realistically create holes in walls that look like they've been broken down or exploded. This method works very well for concrete or brick walls, but it could be adapted to work well with (thin) metal or even plaster walls.

A bit of background: I really needed to destroy several walls in my map. I needed this to work realistically because the destruction would be visible all over the place.

The first thing I tried were displacement surfaces. The problem with these is that they're quite hard to seam together when you've got four of them, one for each edge of the hole you're trying to shape. Another is that they stretch the texture that they've been applied, and so if you're trying to get some hugely jagged or varied walls, the texture will look quite stretched and won't line up (even worse if the texture has some sort of pattern on it).

The next thing I tried was a different method with the clip tool, basically splitting brushes into triangles. The problem with this was that the walls looked way too sharp and jagged to be destroyed concrete - although they'd look nice if I were trying to get a broken window look!

So finally I tried something else and got it. I cut up some brushes that rougly illustrated the size of the destruction I wanted with straight lines. I then clipped each one of these resulting thin "strips" of wall with varyingly diagonal edges that lined up with each other. Via this method, the texture isn't affected at all, and the jagginess of the wall can be of varying intensity and detail. It's even quicker than either of the above two methods to boot. Through some suggestions here on Snarkpit, I've realized an even easier way to get this done even quicker - instead of clipping, using the vertex edit tool.

Interested? Read on!

Getting started


To begin you'll want to create a square hole in the wall or floor you wish to demolish, slightly larger than you want the hole to be in the end (since our destruction will "stick out" from this square, taking up a bit of space), like so:



You'll then need to create four brushes of the same width from the floor edges around the inside of this hole. These brushes should approximate the maximum "range" of the destruction - from the "inside" edges which are right up against the square hole, which is as far in as the destruction will go, and the exposed "outer" edges which are as far as the destruction may stick out from the square hole. You should have something like this:



Once the four brushes are created, you will want to clip (using the "separate" mode) the longer ones (the ones whose edges overlap with the brushes perpendicular to themselves) along the edge of the perpendicular brushes themselves. You should have a total of eight brushes now:



These four "corner pieces" we just created will be unaffected in the end, so make sure they're sized right - the crumbling concrete will join up with these and seam each edge together. You can adjust them later but it's easiest to get this right from the start.

Clipping



Now that we've got eight brushes laid out how we want them we're ready to start destroying them.

The first step is to cut the four longer brushes up into short "strips" of varying width, though generally not too big; try to cut the brush into anywhere from around 4 to 8 seperate brushes total if it's going to be onscreen with a lot of other detail, or up to maybe 12 brushes if it's an indoors area where you can afford such a level of detail. Since I'll be doing this to an indoor area, I've chosen to be generous with detailing; here's an example in which I've cut the brush up into twelve seperate strips:



Now you need to repeat this for the three remaining "long" brushes (leave the small, "corner" brushes alone). Here's what you should end up with something similar to:



Now it's time to start giving the concrete some shape. Select all the strips along one side of the hole. While keeping in mind the properties of concrete, start working your way across the selected side of the hole with the Vertex editing tool, selecting the exposed vertices one at a time in the Top view (going from one corner block to the other). Leave the farthest vertices alone - the ones that line up with the corner blocks - and begin to adjust all the ones in between to get the shape you want. Keep "Snap to Grid" on, and grid size on the low end (2 or 4 units). Here's the first edit I'm making:



Now I'm moving on to adjust the next strip. Using the Vertex editing tool, all of the brushes should always flow together and line up exactly. Again, remember how concrete would crumble and break - don't make anything too jagged, keep deformations subtle (e.g. don't make any edges more than a 45 degree angle), and avoid straight lines. Try to adjust the strips inwards in a general direction for a while, with some variation, and then maybe start to angle another way. Here I am after editing several more strips:



Work your way around. Make sure that you always end up back at the corner at the end of each side (the four corner blocks we clipped off the longer sides earlier). Keep some length variation; maybe, for a small section of the strips, have the average length be only a few units long, and for another section have the strips all be nearly as long as possible. Even though you have a lot of strips to work with and thus lots of detail potential, keep a "general shape" in mind that your edits should follow with some variation. Make sure this general shape isn't too round or too square if you want a realistic hole; make it sporadic and a bit lopsided.

After you're finished you should choose a texture for the rough edge of the destroyed hole. Use the material face edit tool to apply it to the visible edges only. Two nice examples are plaster/plasterwall037e and plaster/plasterwall037f. Also don't forget to select all of the strips as well as the corners that the destruction consists of and tie it to a func_detail; Vvis would have a really hard time with splitting up leaves to conform with this detail of destruction and the strips aren't very large, so they aren't needed for blocking visibility anyways.

Here's what I ended up with. Editing the edges only took around one minute:



Taking it further



Alright, so now you've learned how to create realistic wall/floor destruction using the clipping and vertex editing tools. What's next? There are several things you can try to take this further:


  • Props. A lot of nice props in the props_debris folder would work good here, such as the rebar ones (small bent pieces of metal). Having some of them stick out of the hole bent downwards would imply that something fell through instead of the hole just "appearing". There are also lots of nice rock chunks in this folder, piles of debris.. that sort of thing.
  • Decals. Filter the material browser with the word "decals" to see them all. There are plenty of good ones that would work here, including some concrete dust/chunks, wood pieces (which work well in places where there isn't any wood, even), as well as some scorch marks to imply explosions, varying densities of trash to litter the floor, maybe some water damage, etc.
  • Chunks of concrete. Create these in a similar way - take a small brush, cut it into strips (between four and six or so), and use the Vertex edit tool on both edges of the strips in order to create a lopsided, chunky piece of concrete. Do this several times in varying shapes and sizes, and litter them about the floor. Also, tying this in with the rebar concept, you could have several pieces of rebar sticking out of the edge of the hole and have a chunk of concrete hanging off of one or all of them.


That's it! I hope you found this tutorial helpful and informative, if a bit lengthy (hey, wanted to illustrate each step in detail!) smiley This method can be adopted to plenty of materials and applications. Experiment away and have fun!

Example .VMF file.


Post ReplyView Topic
Discussion
0 starsPosted by Captain P on Fri Aug 4th 2006 at 6:56pm

Hmm, I can see your point. Yeah. I used them for natural holes, but man-made structures are a different thing indeed. smiley
[author]
Posted by midkay on Fri Aug 4th 2006 at 5:33pm

Omegaslayer: Good idea, if any strips end up to be about the same "slope"; but when the strips were cut the goal was to use them all in different ways so that combining them wouldn't be necessary (i.e. don't let two next to each other go in the exact same direction). I'll probably update this with some information on that though.

Captain P: I'd have to disagree, having used displacements for broken walls about.. four times now, they're harder to work with to get the shape you want, "too dense" in some areas and too sparse in others (not enough vertices to work with on the long sides, too many to deal with on the smaller parts). They also stretch the texture they're given as I pointed out in the tutorial, so anything with a pattern will be ruined; this also screws with lightmaps, so you might have *really* skewed lightmaps (e.g. on the displacements I used in my map last time, vertically the voxels were spaced about 16 units apart, and horizontally around 1-2 units apart).

Interesting suggestion with the vertex tool, though.. I'll have to try this and see how it works. smiley

Thanks for the comments.
0 starsPosted by Captain P on Fri Aug 4th 2006 at 1:17pm

I'd say dismaps are perfect for this, given or taken a few occasions where brushwork really beats them.

Anyway, good tutorial, with an eye for technical details. Even a quick overview of it reveals it's purpose, and that's well done. smiley
Only thing I'd add is that you can use the vertex tool where you defined the edges - selecting multiple brushes at once, selecting the shared vertices with a selection box and then moving it out/inwards can save some time over clipping each edge.
0 starsPosted by omegaslayer on Fri Aug 4th 2006 at 6:10am

May want to take it a step further and talk about optimization by combining a lot of those pieces to form single ones. But it was well written and formatted.
[author]
Posted by midkay on Fri Aug 4th 2006 at 5:57am

Thanks, Morph! smiley Glad you like it.

I was hoping to do this after I wrote the "Taking it further" section but I had run out of image slots. I didn't feel like working any of the earlier ones out, but maybe I can imageshack an ingame shot or two and attach them so people can get an idea.

Thanks again. smiley
0 starsPosted by Addicted to Morphine on Fri Aug 4th 2006 at 2:59am

Great tutorial midk, glad it finally got put up smiley

Well written, clear, nice use of images to illustrate your point. Glad you mentioned func_detailing as well as vertex manipulation, and I like how you included the "taking it further" section. Nice of you to include the vmf as well.

What I think would be nice is to include a shot of this method compiled and in game, with the various debris, rebar, and decals you mentioned. You could probably just use a shot from dm_residential. Doesn't really effect the tutorial overall, but sometimes before someone wants to try a new method they'd like to see how it'll look in game.

Thumbs up.
Post ReplyView Topic