Monday, April 2, 2012

Making Curvy Pipes!

This is a tutorial on how to make 12 sided brush 'curves' on the grid, such as if you were making a pipe with a bend in it. I'll be using GTKRadiant 1.5, and using quite a bit of the Clipper tool and CSG Merge. Here's a picture of what we want to end up with:

 

All right, so, first things first, we need to make a 12 sided column. We want to stay on the grid to keep our brushwork tidy, so let's carve out of a square block. 


 To do this, we're going to use the Clipper tool (Shortcut  key X). The cuts shown below use a 1-to-2 ratio of our grid units and as you'll note, this keeps our resulting vertices on the grid!



Keep going around the brush and you'll end up with a 12 sided cylinder like this: 


Why are we so concerned with staying on the grid? Well, now we can use the Clipper to cut our cylinder into wedges (shift + enter will keep both halfs of a cut with the Clipper), and we can resize those wedges by pulling on the outer edges, and the resulting wedges remain in proportion and on the grid as well!


So we have our cylinder, lets make a bend in our pipe! For starters, we'll copy the pieces we have and rotate them to be the horizontal part of our pipe.


Now we'll make ourselves some pieces as a guide that will define our bend. To do this, I duplicate a couple slices of my cylinder and resize and slice them to be a 1/4 of a donut.


Now we're going to start making our cylinder follow the guide, to begin, we don't really need our cylinders to still be made of wedges, so select all the pieces of each and use CSG-Merge to turn them back into one brush. The shortcut for CSG-Merge is Ctrl-U, and what it does is take a selection of brushes, and makes them into a single brush as long as it's a valid brush.

With the cylinder as a single brush, elongate it and then slice it with the Clipper tool to follow the first wedge of our guide.


Now for the tricky part, we need to turn our brush 26.5 degrees... but doing that in Radiant and expecting it to stay on the grid is impossible. So we're going to do an old trick known as Trisouping. Make a copy of your cylinder and clip the top to be flat again. We're going to slice this brush into several wedges vertically to prepare. For clarity, I've hidden the vertical cylinder we previously made (H key hides brushes in Radiant, Shift + H shows them again).


Let's also clip some guidelines into our guide. At this point we need to go down a gridsize. Using the same 1-to-2 ratio, slice lines where the bottom edge meets a vertical line on our piece. This will give us the points we will be matching our vertices to.


Now it's time to do some vertex manipulation. Grab one of our wedges we made and go into Vertex Manipulation mode (V key). Hold Shift and draw a box over a vertex to grab both the front and back vertices, and then move them to match our guide. Be sure to grab both vertices, otherwise Radiant will make a mess of your brush as you try and move them.


Now repeat that for each of the wedges.


Now the piece is complete... and it's a valid brush! Grab all the wedges and CSG-Merge them and you'll have a single 12-sided cylinder that is rotated 26.5 degrees!


All that's left to do is duplicate and rotate the piece we just made, and we have a 12-sided cylinder with a bend in it... in only 4 brushes! With a little texture work and detailing, and this is done! Have fun!

4 comments:

  1. Dunno if it's possible in radiant, but in WC it was easier to group the brush (or brushes if you are making a hollow pipe), scale by 1.125 (I think) in the axis you wanted the pipe to bend, then shear and clip. Difficult to explain without a diagram, but I think czg's curve tut did it that way. WC doesn't check for brush validity either, so you can just copy the straight section and manipulate it directly to the rotated version.
    I learned about 12 sided cylinders and curves from SPoG ages ago, and he used radiant, but I'm pretty sure he had a simpler method than yours that didn't involve wedges. I think Radiant's edge manipulation tool (not vertex) was probably used, and from what I remember from using it, it was pretty powerful, even with the annoying valid brush constraint.
    -than

    ReplyDelete
    Replies
    1. CZG's method took advantage of the Skew tool of Worldcraft... something Radiant doesn't have (too easy to make invalid brushwork with I'd suspect).

      I'd love to know SPoG's method, I'm sure whatever he did was brilliant, as many of his solutions to things tended to be.

      Delete
  2. much easier with shearing in older radiants or edge manip in 1.5\net, no need for tris http://www.quakewiki.net/archives/speedy/tut_pipe.htm

    ReplyDelete
  3. scale and skew wouldn't make brushes invalid. Shame Radiant lakes that handy feature.
    -than

    ReplyDelete