[TUTORIAL] Stepped Hillside Displacements

rt3407v06p909

L1: Registered
Apr 16, 2008
30
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

attachment.php


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:
attachment.php

-Now choose the Filter Menu, Pixelate, Crystalize, and choose a cell size of 236. This step will create the following image:
attachment.php

-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:
attachment.php


-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.
 

ryodoan

Resident Bum
Nov 2, 2007
409
117
I actually played on your example map, and its pretty fun to just run around killing each other on the map.
 

Mar

Banned
Feb 12, 2009
607
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.
 

Altaco

L420: High Member
Jul 3, 2008
484
120
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.
 

DJive

Cake or Death?
aa
Dec 20, 2007
1,465
741
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.
 

Mar

Banned
Feb 12, 2009
607
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.
 

DJive

Cake or Death?
aa
Dec 20, 2007
1,465
741
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.

nope, it wont work. you'll just get a TON of very sharp spikes.
 

Mar

Banned
Feb 12, 2009
607
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.
 

DJive

Cake or Death?
aa
Dec 20, 2007
1,465
741
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.

nope, it wont work. you'll just get a TON of very sharp spikes.

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

=/

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

MungoKing

L3: Member
Jul 12, 2008
148
47
Yeah it has gradient... it's the Gradient Tool ;). That's the one that looks like a gradient in the tool menu.