[TUTORIAL] Stepped Hillside Displacements

Discussion in 'Tutorials & Resources' started by rt3407v06p909, May 1, 2008.

  1. rt3407v06p909

    rt3407v06p909 L1: Registered

    Messages:
    30
    Positive Ratings:
    17
    Here's how to make stepped hillside displacements in under 15 minutes.

    The forum software only permits 5 attachments per post, so this will be broken up into three posts and edited appropriately.

    Software required: Photoshop, Dispgen, and Hammer.

    Steps:
    -Start Photoshop
    -Make your foreground color 192/192/192 (grey)
    -Make your background color 0/0/0 (black)
    -Create a new image with the following parameters:
    Width: 1024
    Height: 5120
    Resolution: 72 pixels/inch
    Mode: Grayscale
    Contents: Background Color

    [​IMG]

    I enable a grid of 256 because that's the size of the displacements, although you don't have to do that, it's entirely up to you. You can do it without a grid if you want, but you may not get the exact same results if you don't line things up just right.

    -Use the marquee tool to select from 0,1024 to 1024,4096. This will ensure your gradient (next step) will only affect this part of the layer.

    -Choose Gradient Tool, Reflected Gradient.
    -Drag from 512,2560 to 512,1024. This will create the following image:
    [​IMG]
    -Now choose the Filter Menu, Pixelate, Crystalize, and choose a cell size of 236. This step will create the following image:
    [​IMG]
    -Save this image as a .jpg with the highest quality possible. It will look like this:
    http://forums.tf2maps.net/attachment.php?attachmentid=231&stc=1&d=1209696772

    -Start up Dispgen, and set the settings as per this screenshot:
    [​IMG]

    -Change the output file location to wherever you store your .vmf's.

    -Start up Hammer, load up that .vmf you just made.

    -Clear the visgroups, select displacements only, drag and select them all, and group them. Select the group, and use the displacement tool to adjust the texture size and invert the alpha as necessary to get the look you want.

    I found four blend textures that looked pretty good with this style of hillside: blendgroundtograss001b, blendgroundtogravel001 and 002, blendrockground004 (the dark on light alpha) and blendgrasscanyon02. You'll have to invert alpha back and forth on some of these to get a good look.

    -Enable all the visgroups, add teamspawns, a cubemap, a light_environment, and you're done! Compile and enjoy. I changed the background to sky_tf2_04 in map properties, and I used a 240/240/240 bright and 200/200/200 ambient in my light_environment.

    An explanation of what's going on here: The image created in photoshop is a heightmap. It is drawn with black representing the lowest height on a displacement, and white (or the lightest shade of grey) representing the highest height. The gradient would normally produce a smooth hill, but the crystalization filter separates the gradient bands into discrete shaded chunks, which make up the "steps" in the hillside.

    Dispgen then alpha maps any angle of displacement greater than 46 degrees. That is, on the steep parts of the map it will apply alpha, so the secondary texture in the blended texture will show through. That's what causes the flat parts to be "green" and the steep parts to be "brown" (or whichever colors show through on whatever blended texture pair you choose).

    Tuning: A crystallization filter cell size of ~200 will make very small steps. A cell size of ~270 will make very large steps. The Height value in Dispgen will affect the overall "climbability" of the hillside, although in this example each slope is 1152 high and 1536 long (half the gradient area). You can undo and re-do the crystallization filter a few times to get things exactly as you want as it's semi-random.

    And finally, the reason I didn't use 255/255/255 white as my foreground/other gradient color is because you can manually add features or lighten/overlay white by hand on the 0 through 192 in the image prior to crystallization if you're inclined. If you use white as your gradient, though, you can't "lighten" it.

    Screenshots & more attachments in the next posts.
     
  2. rt3407v06p909

    rt3407v06p909 L1: Registered

    Messages:
    30
    Positive Ratings:
    17
    Screenshots:

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    Download VMF and BSP here. (I'd be happy if tf2maps.net wants to host that file...)
     
    • Thanks Thanks x 8
    Last edited: May 1, 2008
  3. ryodoan

    ryodoan Resident Bum

    Messages:
    409
    Positive Ratings:
    59
    I actually played on your example map, and its pretty fun to just run around killing each other on the map.
     
  4. ChronoTriggerFan

    ChronoTriggerFan L7: Fancy Member

    Messages:
    435
    Positive Ratings:
    72
    I tested it out with gimp, had to add a few extra filters and some minor tweaking, but its amazing!
     
  5. Mar

    Mar Banned

    Messages:
    607
    Positive Ratings:
    63
    This is amazing. Just think of the possibilities. You could make so many displacements in photoshop/gimp/paint.net and then put it in your map.

    Sexy!

    I realize this old, but some newer members (including me) might appreciate this bumb.
     
  6. katana

    katana L1: Registered

    Messages:
    9
    Positive Ratings:
    1
    Terrific stuff...thanks.
     
  7. Micnax

    aa Micnax I maek map

    Messages:
    2,021
    Positive Ratings:
    1,339
    Very good... I'm guessing you can use this technique to create abnormal shaped stepped-terrain too, like circles?
     
  8. Altaco

    Altaco L7: Fancy Member

    Messages:
    485
    Positive Ratings:
    121
    The only problem is that this uses a single displacement, not multiple ones for the sides, so any large height differences would create very stretched textures.

    Also, holy shit bump.
     
  9. DJive

    aa DJive Cake or Death?

    Messages:
    1,466
    Positive Ratings:
    736
    aye, and its dated. Ive been meanignt one do one up on displacements i used for the space map i did using same software. I should one of these days.
     
  10. Mar

    Mar Banned

    Messages:
    607
    Positive Ratings:
    63
    I wonder if you take a picture of a mountain, which has a white peak to it and then... omg I need to try this.
     
  11. DJive

    aa DJive Cake or Death?

    Messages:
    1,466
    Positive Ratings:
    736
    nope, it wont work. you'll just get a TON of very sharp spikes.
     
  12. Mar

    Mar Banned

    Messages:
    607
    Positive Ratings:
    63
    Agh! I hate gimp. I can't even figure out how to the example in the OP. Well, looks like I'm going to have to steal my brother's PC with his photoshop.

    And I realize that just importing the picture won't work, I'll still have to edit it heavily.
     
  13. DJive

    aa DJive Cake or Death?

    Messages:
    1,466
    Positive Ratings:
    736
    =/

    Anyways the OP used gradient, GIMP should have something of the sort.
     
  14. MungoKing

    MungoKing L3: Member

    Messages:
    148
    Positive Ratings:
    47
    Yeah it has gradient... it's the Gradient Tool ;). That's the one that looks like a gradient in the tool menu.