Complete Displacements Guide
Tutorial Quick Nav
1.0 - Brief Intro.
2.0 - Displacement Settings Info
2.1 - Basic Displacements
3.0 - Advanced Uses
3.1 - Basic Shaping
3.2 - Sealing
3.3 - Sudivision Tricks
3.4 - Caves and Tunnels
3.5 - Carving Into Displacements
3.6 - Curving Displacements (Roads)
4.0 - Blend Textures
4.1 - Using Blend Textures
4.2 - Custom Textures
5.0 - Detail Props
5.1 - Use on Blend Textures
5.2 - Manual Placement
5.3 - Custom detail.vbsp
Brief Intro
This is my second attempt at a displacement tutorial, however unlike the first I will not just quickly state something and move on, I'm going to go into detail on how to do more advanced tricks with displacements and achieve better results and beautiful looking maps. Displacements go hand in hand with ground for most mappers so its almost a requirement to use them. Also displacements give us the chance to get away from the rigid shapes and structures that dominate the mapping community and create more organic looking scenes and environments.
Through this tutorial I'm going to assume you know a few things about hammer and its tools so I won't explain the absolute basics but will go over the basic rules for displacements and how they can be modified. I will try to keep the word count down in this tutorial and have mainly visual steps but there will be some dry spots nonetheless.
Displacement Settings Info
Displacements become entities once they are made into a displacement, resulting in how they don't effect vvis during its processing and doesn't block the player from seeing things behind it. So the first thing people should know is that if you make a displacement, don't then again tie it to yet another entity type, ie Func_detail etc which is a common mistake some people make.
However, since a displacement is more or less an entity, we can play with its properties and settings. The basics you should all know about. Increasing and decreasing the power of the displacement makes it more or less detailed in its shape that you can modify by using the Paint geometry feature, Alpha painting to use blend textures, subdivision, sew etc should all be fairly well known. Those are the basics I shouldn't have to go into too much detail about here but there are more options that are not used often. I'm speaking of the flags that you can enable on displacements. There are three simple options:

- Physics objects will pass through the displacement. Players wont.

- Players will pass through the displacement.

- Bullets will pass through the displacement.
Those properties can have a few applications for mapping, first basic idea would be if your making snow then you could duplicate the displacement and have the second one a few units above the real one, turn on all three settings and then players will look like they are actually running through snow, minus the foot prints of course, Resulting in something similar to this.
Could use this same technique for mud or even the moving water effect that can be seen in the tutorial below so that players can still pass through it, bullets and objects won't stay on top either. What you can do with these is completely up to your imagination.

Flowing Water
Basic Displacements
Going to run over some ground rules when it comes to displacements, things you simply cannot do with them, first and foremost is that when you make displacements you cannot tie them to another entity, like func_detail or func_breakable, this will cause your entire map to fail compiling and end up wasting your time. Just don't do it, the other thing is that displacements don't seal your level, they leave gaps in the geometry that must be sealed because once again, your map will fail to compile. Also, a displacement cannot be any shape other than a rectangle, trying to create one with more sides will simple fail and provide yet another error in the compile log.
Keeping those main issues in mind we're going to go through some basic displacement work.
Creating displacements, well its a fairly simple thing to do, just start with any normal brush, then with the texture application tool select the faces of the brush you want to be a displacement which for this tut will just be the top face, ( This is because we normally don't need all sides of a displacement but only 1 or 2 sides of it, the rest are not needed so we don't use it ) then go into the displacement tab of the Texture Application Tool and hit the create button, Should have something like whats on the right.
Just like any normal brush, you can modify, stretch, cut and use vertex manipulation on them without any problems that you don't already encounter with normal brushes, invalid shapes for example. However that plays only a minor role for displacements, the other tools you have available to use on them are far better than the standard set for brushes.

The tool we are going to explain here is the standard "Sew" button, its purpose is to seal the gaps between separate displacements by sewing them together. Now this will only work if the displacement edges are touching already and are flush along the entire edge. You can't try to sew two displacements that have a physical gap between them of even a single unit. This tool is handy because when you start modifying the mesh along several displacements you may accidentally make gaps in the heights between them so its good to just absently click the sew button now and again when working with them. This will not work perfect 100% of the time however, sometimes things are too advanced that the engine doesn't know quite what to do, it happens but very rare or caused by human error.
To show how this works I've quickly made another vertical displacement beside the flat one we started with, adding some bumps and drops to the flat one so you can see gaps between them, then I simple select both displacements with the Texture Application Tool and click the Sew button. See how it fixed the gaps?
Now, the tool used to modify the displacement mesh like that to create the bumps themselves is the Paint Geometry button. By default its on spacial editing, which you will use 90% of the time as its quicker and creates smoother looking curves when on the right settings, but if you want to just edit single points you can uncheck "Spacial" and you now can modify single mesh points or select in "brush" field to effect 1-5 point radius as well.
Some of the settings are self explanatory, spacial radius and distance mainly. However you can change on what axis your modifying the mesh from the standard "Face Normal" to the X or Y planes as well to move the mesh beyond its original brush boundaries, can also be used to curve a displacement which is covered later.
On the bottom of this panel is a checkbox to enable "Autosew" which is handy but only good when your editing between multiple displacements, still no harm in leaving it on when working on a single displacement however.
Play around with this tool for a moment, get used to using the right and left mouse buttons to raise and lower the mesh points on the displacement, play with the settings before moving onto the next few steps.
Advanced Uses
Basic Shaping
For this tutorial we are going to be making a simple island type setting because it will use the most displacements by its design. Now to start off before just jumping straight into making your displacements and mountains, terrain etc, you should be blocking out the basic shape of the path you want players to be on, the shapes of the hills etc and lining up all that basic brushwork before so that you can ensure that all displacements will line up perfectly.
Now in the screenshot on the right you can see I've made a simple round path that will wrap around the islands center. I've made it by starting with normal blocks as displacements must be made from blocks, used vertex manipulation to shape and form them to what I needed. Always keep in mind that you cannot have any concave shapes or two faces along the same line as those will be invalid solids. Now the island design itself will be a 3 platform height design with paths that run up the sides and also later in the tutorial adding tunnels within the island as well.

So we need to add in the vertical faces that will be our displacements on the way up in our stairs pattern to the top. Again, your dealing with displacements so make sure the edges of the faces that you will be turning into displacements once again line up along those of the ones we've already made for our path so that they sew correctly. Lots of vertex manipulation will be needed again obviously so if you don't have a lot of experience with it I suggest you read a few other tutorials on the subject before continuing any further as its the most valuable tool used in this tutorial.
Continuing on, each step higher up onto the mountain I'm going to make the steps up 512 units so that our small island can have quite a bit of height to them. Also to save brushes the ones your using to make the steps up from the main floor will also be the floor on that next level by using their top faces, so have them inset enough into the center to provide walkable ground. A note though, because of the vertex manipulation the textures may appear to be stretched on the vertical faces, by using the cutting tool however you can fix that stretching effect. Your own island should now look similar to that on the right screenshot. Be sure to go back and double check your work so that all the faces line up perfectly and there are no gaps or issues.
Sealing
Now we need to create a few basic nodraw brushes to seal the displacements on the inside as they don't block vvis and cause leaks. Now if you wanted to go over the basic brushwork and use vertex manipulation to remove some faces you don't need and make them more prism shaped then feel free to do so.
There are two reasons why we seal the area behind displacements, the first as already mentioned is because they leak, the second is because they let light and shadows in from behind as well as displacements are one sided, things pass through the other. To fix that some simple nodraw blocks to fill in the empty space, and also to increase performance, are added. Now since every brush we have there is going to be turned into displacements there is quite a bit of work to seal them all. Now a simple trick is to take the steps brushes, duplicate them and shrink them a bit in width and length, and texture them with nodraw. Do this for as many steps as you have and it creates a smaller solid block version of your island which will then be inside your final displaced island by the end of this section. If you can simplify the block structure or use less then do so.
Subdivision Tricks
With that out of the way we finally get to the step where we select each face that we want to turn into a displacement with the Texture Application tool(Shift+A). Do not select all the brushes and then the tools, we don't want all the faces to be displacements, only those on the front, having each entire brush as displacements would cause other visual errors and problems with subdivision. So make sure your using the Texture Application tool and selecting each individual face while holding CTRL until they are all red. Then hit the displacement tab and the create button, leave them with a power of 3 as less would mean too blocky of an island.
If doing smaller areas that don't have as many curves then lower powers would be better for performance such as simple things like mostly flat grass wouldn't need to be above a power of 2, but because of what we are building the higher power serves us better to provide a cleaner and smoother looking island. Now, leave all the faces selected as you can see in the screenshot because we are not done just yet as we still have to subdivide the faces.
The more faces you have selected to subdivide the longer hammer has to process the information and it will remain in the frozen state for quite a long time if you have too many selected, now because these are simple shapes here it won't take too long, around a minute on lower end computers, but try to not have more than 15 or 20 selected at a time to subdivide but do them in sections as the possibility of crashing and losing your work is never a fun one.
Once you subdivide all the faces of the displacements you will see that there are a few spots where the nodraw blocks poke through as you can see in the screenshot, while these won't cause any problems players however would still notice them when running over them and hitting the edges, so its still a good idea to manually move the displacement mesh to cover any of the exposed nodraw pieces that you encounter. Although this problem may be solved in the next step of the tutorial so its not necessary as of this moment but keep that in mind.

You can probably see already that the steps don't have a lot of level walking space but curve very quickly to the next steps hight. There is a not so well known trick to making that a flat surface again, most would think lots of manual editing of the mesh but it can be done by the system on its own. So by simply selecting only those displacements that were originally the horizontal sections of the step we then subdivide them amongst themselves to remove the upwards curve and they stay strictly on the horizontal plane.
Thats the first part, now there are large gaps between those displacements and the ones below and above as well, select all of the adjoining faces and sew them. See the difference? rather than a lot of manual editing there is maybe a few spots left that need touch-ups as compared with the original version. Might as well do the same thing to the second level as well, but no point in doing the third and leave it as a rounded top. The steps are shown on the right in the gif so your results on each step should be the same.
Now once thats done you'll need to manually edit the displacement mesh to round out some of those more harsh edges, notably on the second step where it comes to a point as the first one can be left as it is because that shape reflects that seen on most cliff faces where water has slowly been eroding away the rock leaving a bit of a lip at the top.
Manually adding in a little bit of a dip in the middle of the pathways to give them a worn in feeling is also another good idea to include as just yet another small detail that adds up.
After the manual reshaping of a few areas to make them more realistic you can then do the standard thing of adding a touch of noise to the displacements. Most make the mistake of doing too much noise when in its smaller values it looks so much better. So select all the displacements and hit the noise button, I find -5 and 5 brings a good balance while retaining its shape. But try to stay under a range of 10-15 to keep it looking smooth.
There is a visual tool that you can turn on to view more information on displacements. By clicking the button on the top panel that looks like this

it will display yellow triangles over the displacements where players cannot walk as seen in the right screenshot. Use this information to again manually edit the displacements where there may be spots that they cannot walk on because the angle is too steep. Along the path and the upper platforms there should be no yellow triangles within them but only on their outer edges as they point up or down towards the displacements that they are sewn too. If you have a lot of yellow triangles in your displacements that were meant to be walkable then you've added too much noise and need to redo it with less or fix each one on its own. The first option is the best as the noise level will be uniform across the entire surface.
Don't forget to sew displacements all back together just in case you've made a gap somewhere, make it a habit to just do it now and again, much like saving. Quickly threw on some textures for the island and added in the water to see how this turns out in-game and this is the fruit of our labour. Now its not perfect as you can see, because of the sewing we did on the last step there is a bit of a sharp edge there, though manual mesh modification you can soften that up very quickly with the normal face edit button. Just go along the edge and drop it down several units. Now I didn't bother doing that step because its not absolutely necessary for this tutorial but for a completed map don't forget to check the displacements afterwords for any errors or sections you don't want and edit manually.
I will be returning to this island for the blend textures section of this tutorial and we will make this truly look amazing.
Caves and Tunnels
Simple Tube Tunnels
Starting with something easy here that you can build and design fairly quickly. Tube tunnel systems, they are the most common used tunnels that mappers make in counterstrike or any other source mod for that matter because they are simple to create and fairly organized and simple to optimize afterwords. A complex tube based tunnel system can be created within a few minutes when you have just a few basic "prefabs" created in which to build it.
Just going to be working off a 16 unit grid size and making some bocks that are 128*128*16. Going to need 12 that are arranged to form a hallway as seen in the screenshot. Each block should have only the inner face edges touching, no overlap or gaps between them. This is because the inner faces will be our displacements and they need to be able to sew and subdivide together.
Now the reason that there are three displacements for the top, bottom, left and right sides is that only the middle section is what we need because it will be perfectly round whereas if we used only one the subdivisions then they would go to the square shape at either end, which is useless for what we want.
Carving Into Displacements
...
Curving Displacements (Roads)
...
Blend Textures
Using Blend Textures
...
Custom Textures
...
Detail Props
Use on Blend Textures
...
Manual Placement
...
Custom Textures
...