Have you ever wondered how the official mappers made those rolling grassy knolls in de_aztec and the snow on the ground in cs_office? Well, you can make them too--with the displacement tool.
I'll use the
firstmap again for demonstration purposes. Let's add some small sand dunes in the outdoor area of the map.
Creating a Displacement Surface
First, we have to create a thin solid brush and layer it on top of our existing floor brush. We'll make it 16 unit thick. Please remember that we cannot use the existing floor solid brush as the displacement surface. I'll explain why later.
Adding the displacement brush
In addition, the brush we use for displacement surfaces must be a rectangular (or four-sided) solid brush. You cannot clip it or vertex manipulate it. It must have six surfaces, twelve edges, and eight vertices, period. Furthermore, it cannot be a brush entity (
i.e.func_detail or func_wall).
Next, we will transform the upper surface of the brush into a displacement surface. Select just the upper surface with the Texture Tool, and switch to the "Displacement" tab.
The displacement toolbox
Now, create the displacement surface by clicking on the "Create" button. You'll be prompted for the "Power" of the displacement surface. The power setting basically determines the mesh density of the displacement surface. It is an integer between 2 and 4. A higher power setting allows more smooth-looking surfaces, but it also takes the Source engine more resources to render. A power of 2 makes a pretty crude-looking displacement (quite angular); a power of 4 typically makes the displacement look very smooth, but it will reduce the framerates significantly in-game, especially if the displacement surface is large.
So, a power of 3 is generally a good compromise between aesthetics and performance. However, if you have a large displacement surface, you might want to lower it to 2. Conversely, if you have a relatively small surface, you might as well go with a power of 4.
Modifying the Displacement
So far, our displacement surface is still flat, yet it has the potential to be molded into all sorts of fancy shapes already. Click on the "Paint Geometry" button. The "Displacement Paint Geometry" box pops up. With the displacement tool in the "Paint Geometry" mode, we can use our mouse pointer to modify the displacement surface in the 3D view. You'll notice that the pointer changes into a green hemispherical mesh in the 3D view in this mode.
Painting geometry
The default setting allows us to raise the surface of the surface by left-clicking, and lower it by right-clicking. Notice you can also change the size of the editing point by altering the "Radius" setting (or
Alt-drag) and the sensitivity of each mouse click by altering the "Distance" setting. The "Axis" setting changes the angle of distortion relative to the plane of the original displacement surface or relative to a specific axis. I hardly ever change the axis, because "Face Normal" is the most intuitive setting.
It might take a few tries to get the hang of displacement modification, but you'll be an expert at it soon enough.
You can also add noise (or increase the "bumpiness") of your terrain to simulate rocks or make it silky smooth (like a fresh powdered blanket of snow). Pick "Smooth" under "Effect" to smooth out your surface, or click on the "Noise" button to make the surface more angular.