Tutorial: Displacements - Part 1 Last edited 18 years ago2006-09-28 04:00:00 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.

This article was converted from a previous version of TWHL and may need to be reviewed

  1. The formatting may be incorrect due to differences in the WikiCode processing engine, it needs to be revised and reformatted
  2. Some information may be out of date
  3. After the article is re-formatted and updated, remove this notice and the Review Required category.
  4. Some older tutorials are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.

Download attachment

One of the best improvements in the Source engine from the original Half-Life was the addition of displacements. Without displacements, HL2 wouldn't look half as good as it does. This five-part series of tutorials will explain how to use them, as well as tips and tricks on using them.

What is a Displacement?

What do you use displacements for?

Displacements are generally used for realistic looking terrain like the ground and cliffs, But they have other uses. Look at some of the coast levels in hl2 to see liberal use of displacements.
Displacements can be used as cliffs as well as groundDisplacements can be used as cliffs as well as ground
Examples of displacements in HL2Examples of displacements in HL2

How to make a displacement

Displacements are fairly easy to make, so here is a quick step-by-step guide to make a displacement.

Step 1: Make a brush
Get out your brush tool and draw out your brush in the 2d views, and press enter. Put the top of the brush where you want your displacement to be (or in the case of cliffs, the side). Your brush should be a cube/block, as displacements must have 4 sides.

Step 2: Texture your brush
Select your brush, and click the texture application tool.
The Texture Application toolThe Texture Application tool
Hold ctrl, and click the top side (the one that will be the displacement plane). You should have 5 of the 6 sides selected. Now, in the texture application window, click browse. Select the nodraw texture, and click ok and apply.

Now, select the top face. Displacements can use normal textrures like everything else, but they have special textures made especially for them. They are 'blend' textures - to find them filter for 'blend' in the material browser. Pick one and apply it - I'll pick blendgrassdirt001a. Keep the texture application window open and your newly textured displacement plane selected.

NOTE: Texturing non-displaced surfaces with blend textures does work at the moment. Although Valve states when you load up a map with a blend texture on a non-displaced surface that they are 'removing this soon', there doesn't seem to be a timeframe set for when this will happen. As well as this, Valve have used blend textures on non-displaced surfaces in their own maps, so for the time being, you can assume it's ok to do.
A brush with a blend texture, ready to goA brush with a blend texture, ready to go
Step 3: Create your displacement
In the texture application window, there is a displacement tab. Click it. This is your main window for displacement-ing.
Creating a displacementCreating a displacement
Click the 'Create' button (you still only have the top face of your brush selected) and in the box that pops up, pick 3. This is the largest grid size. 3 is medium, and 4 is smallest. Avoid using 4 on small faces.

Click ok in the box and you will see two things happen:

1. Lines form on your top plane
2. The 5 NODRAW faces disappear!

Try looking at your displacement from the back in the 3d view. Its gone! As said before, displacements can only be seen from one side.
A top-down view of the newly created displacementA top-down view of the newly created displacement
Step 4: Manipulation
With the displacement window still open, select the 'Paint Geometry' button. The new window that opens up lets you raise and lower points in the displacements.
Painting the geometryPainting the geometry
Have a muck around with this until your displacement looks nice and curvy. NOTE: The 'distance' and 'radius' lets you change the amount of effect the tool has. Turn radius up to move more points on the displacement, and put distance up to move the points faster. Left click to raise a point, right click to lower.
Curvy.Curvy.
Now close the window and choose the 'Paint Alpha' button. This new window lets you manipulate the texture on the displacement.
The Paint Alpha toolThe Paint Alpha tool
Remember when you picked the 'blend' texture for the displacement before? Well, the blend texture actually contains two textures which slowly blend into each other. The paint alpha feature lets you make patches of dirt in your grass, for example. Also, alot of blend textures automatically insert random grass sprites onto the places of the displacement painted with alpha. Its really handy. Make some of your displacement alpha, just for fun. The paint alpha window works exactly like the paint geometry window ('Value' is the speed of change from one texture to another).
Blended...Blended...
Here is what the final product looks like in Hammer:
...and served...and served
That's the end of this tutorial, Part 2 will explain all the features of displacements.

There is no BSP in the example map, just a VMF. I will include a BSP at the end of Part 5 showing all the techniques shown in all five tutorials.

6 Comments

Commented 16 years ago2008-06-22 15:01:21 UTC Comment #100768
splendid stuff Pengi, thanks a bunch...

LeFtY
Commented 16 years ago2008-07-11 06:56:13 UTC Comment #100769
nice work!
Commented 16 years ago2008-09-03 19:45:30 UTC Comment #100770
holy crap that's what i'm talking about!!

thank you very much
Commented 14 years ago2010-04-04 16:12:46 UTC Comment #100771
WOW! thank you!
Commented 13 years ago2011-02-16 01:04:01 UTC Comment #100772
Superb tutorial! I'M DISPLACMENTING!!1

)

Commented 12 years ago2012-02-19 06:05:05 UTC Comment #100773
Thank you for making this.

You must log in to post a comment. You can login or register a new account.