[Tutorial] Building angled roofs (the Valve way!)

Discussion in 'Tutorials & Resources' started by Randdalf, Nov 3, 2009.

  1. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    Introduction
    People make angled roofs in all kinds of weird ways, and recently the number of, what I'd call “wrong” roofs has fluctuated greatly. Do not fret however, I'm here to tell you the “right” way, which is also the way Valve does them. There are some variants on this, and I've seen some where only the overhang is a func_detail, not the roof, but that's neither here nor there - I prefer this method. Ready? Let's go!

    Building the base
    First, let's start with a cube in which to build our building.

    [​IMG]

    Note: I build everything in nodraw, and then texture per-face (for most world brushes), this makes texturing in the latter stages of development easier. I also use 16 as my preferred width for walls.

    Next, build a hollow set of walls.

    [​IMG]

    Then, create a triangle on either end of the brush (generally, the pair of shortest walls), this will define the basic shape of your roof. Make sure the triangle is not too high, otherwise the roof will have an unnaturally high gradient.

    [​IMG]

    Create a brush for each side of the triangle, using vertex editing, that extends from the peak of the triangle to the wall, with the bottom face matching that of the wall, and the top face vertically downwards from the peak. This is better explained by an image.

    [​IMG]

    Copy and flip over the brush as below, and you have the basic structure for your roof – you do not need to texture this, as it will be hidden by the actual roof. Note that these are all the world brushes used – the rest is func_detail.

    [​IMG]

    Note: I based my technique on Badwater. It does not, in any meaningful way, make a difference (it hasn't for me), if you leave the angled bits as world brushes (excluding the func_detail added in the following steps of the tutorial). Dustbowl, for example, func_details the brushes. My method is especially good for buildings with interiors, as you can not only give the roof a different texture to the ceiling, but also not have strange ceiling brushes - problems which I both ran into before. If you are worried about vis, you can simply place a flat brush inside the very top of the walls, and func_detail the triangles (you do not need the angled brushes because it is not seen from inside, I still do it like that out of habit though).

    Building the roof
    Next, we start to build the roof, create a brush whose width is the same as one half of the roof, and whose height overhangs by 16 units either way – make this brush 2 units thick, and put it on top of the peak as thus (and before we forgot, press ctrl+t with the brush selected to make it a func_detail).

    [​IMG]

    Vertex edit the ends of this brush so it is in-line with the angled brush below it, keeping the end edges vertical.

    [​IMG]

    Now here's the clever bit, look at your roof in the top view and determine which direction its gradient is in. In my case, it's in the y direction (vertical), but in your it could be in the x direction (horizontal).

    [​IMG]

    Then press ctrl+m with your roof selected, click the scale radio button and type in the following based on which direction your roof is in.

    x-direction
    Y: 0
    X: 2
    Z: 2

    y-direction
    Y: 2
    X: 0
    Z: 2

    Then press OK and you should have something that looks like this:

    [​IMG]

    Move the left hand side of the brush, so it's aligned with the peak of the triangle. Then, on the other side of the brush, clip off the brush 16 units outwards from the wall, so it overhangs, leaving you with something like this.

    [​IMG]

    To make things a little easier for ourselves, we're going to texture this little bit now. Apply a texture of your choice to the top face (I used metal/wall011g here), and make sure the “grain” of the texure is in-line with your roof's gradient.

    [​IMG]

    Now, with the top face selected, hold down alt and right-click on every other face on the brush, excluding the one at the peak, this will align every texture in the direction of the roof. You'll get something like this.

    [​IMG]

    Note: some people (including the affable Dario Casali) like to use ibeams on the side of their roofs. I however, do not, I think that doing it “Sawmill-style” looks a lot better, but that's down to personal preference.

    Clone and flip the the roof to the other side, and you have an essentially complete (though undetailed) roof.

    [​IMG]

    The previous step can be skipped if you're making roofs like the one below.

    [​IMG]

    Concluding remarks
    Thanks for reading, and may your roofs be good ever-after.

    The VMF of this map can be downloaded here: http://dl.getdropbox.com/u/1085379/rooftutorial.vmf

    This is intended to refine or initiate your technique in this realm, if you already have a method that looks good and works, I'm not saying yours is wrong :p
     
    • Thanks Thanks x 18
  2. Fraz

    aa Fraz Blu Hatte, Greyscale Backdrop.

    Messages:
    944
    Positive Ratings:
    564
    Thanks, although I do my roofs as per: [ame="http://forums.tf2maps.net/showthread.php?t=4372"][TUTORIAL]Angled roofs - TF2Maps.net[/ame]
     
  3. Acumen

    aa Acumen Annoyer

    Messages:
    704
    Positive Ratings:
    594
    great to see how you inspire each other to write more great tutorials !
    i got one question. why did you the scaling instead of vertex editing the roof in place ?
     
  4. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    Yar, this produces more realistic looking roofs, and will make your map look better (it also doesn't produce horrifically thick things D:), money back not guaranteed.

    All to their own :)

    If you vertex edit, the bottom edge of the roof won't be aligned with the "base" brush below it, or the triangle. By scaling, you keep the same gradient, and therefore it aligns with the base, meaning you can simply clip off the excess. The 2 unit thickness is to compensate for this (as it will produce a 4 unit thickness when scaled).
     
    • Thanks Thanks x 1
    Last edited: Nov 3, 2009
  5. martijntje

    martijntje L8: Fancy Shmancy Member

    Messages:
    539
    Positive Ratings:
    168
    looks like a decent way. I added a reference to your tutorial at my "building buildings" tutorial
     
    • Thanks Thanks x 1
  6. Acumen

    aa Acumen Annoyer

    Messages:
    704
    Positive Ratings:
    594
    ah, great to know. i learn so many things in this forum every day, that i get more and more afraid of starting another serious mapping attempt, if can't even build a roof properly :D
     
  7. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    You shouldn't be looking at building roofs really until you've done the layout and tested it :)
     
  8. Acumen

    aa Acumen Annoyer

    Messages:
    704
    Positive Ratings:
    594
    plz ! let me be :D
     
  9. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,682
    I sometimes use both methods. :p
     
  10. Blue552

    Blue552 L3: Member

    Messages:
    137
    Positive Ratings:
    18
    This is extremely useful as I'm about to make a map full of these roofs
     
  11. Botervloot

    Botervloot L1: Registered

    Messages:
    21
    Positive Ratings:
    2
    Smoothed angled roofs, are they made with displacements?

    Or are they models?
     
  12. pitto

    pitto L3: Member

    Messages:
    109
    Positive Ratings:
    73
    Valve sometimes uses displacements for a bent metal roof effect as you can see in this picture. The displacement roofs are made similarly to straight brush roofs, but the brush is then turned into displacements and manipulated for the desired look.
    [​IMG]
    From Goldrush

    There are more good detailing tips in this thread [ame="http://forums.tf2maps.net/showthread.php?t=974"]http://forums.tf2maps.net/showthread.php?t=974[/ame]
     
  13. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    Yeah, make them using the same way as the tutorial, then select the whole brush and make every face a displacement.
     
  14. DaBeatzProject

    aa DaBeatzProject

    Messages:
    1,276
    Positive Ratings:
    1,091
    noes! not every face! only the ones that are visible! otherwise you could get the NODRAW DISPLACEMENT kind of error. Not that it's too bad.. but just... :bored:
     
  15. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    well, okay not the ones with nodraw on them then :p
     
  16. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    Helpful, I'll have to remember this when I make roofs for Tadmlib or w/e... also, were there supposed to be pics? If so, they're kinda not showing up for me :/
     
  17. Bermuda Cake

    Bermuda Cake L9: Fashionable Member

    Messages:
    679
    Positive Ratings:
    192
    I- I...
    I used to rotate a rectangle and hope it was the right size.

    :O
     
  18. strangemodule

    strangemodule L5: Dapper Member

    Messages:
    223
    Positive Ratings:
    59
    This has been one of the best and easiest-to-understand tutorials I have even read. Great work.
     
    • Thanks Thanks x 1
  19. Grim Tuesday

    aa Grim Tuesday

    Messages:
    1,257
    Positive Ratings:
    371
    I am sorry I am an idiot, but how do I make triangular brushes? I know there must be an easy way that I am passing by...
     
  20. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    Use the vertex edit tool to combine two vertices (in a 2d view), thus removing one (technically 2, as it's 3D)