A bumpy ride: A guide to displacements.

Suna

What's a greybox?
aa
Nov 10, 2017
407
613
displacement_render.png


Hey you! Yeah, you! You like gravel? How about some.. rock?
Aha, I knew it, I see you salivating. Well i've got the stuff for you.
It's called displacements and they're fantastic. Cheap, too.
So how about it, you want some?​

DISPLACEMENTS

Displacements are, in my opinion, probably one of the hardest things to learn for new mappers. They have their own set of rules, that while seeming simple to those who have been using them for some time, are confusing to those who are unfamiliar with them. So in this guide, i'll assume you've never used displacements in your life, and do my best to guide you through the process of making displacements for floors, walls, and hopefully everything else if i've managed to explain things well.

---------------------------------------------------------------------------------------------------------------------

THE BASICS

1. What is a displacement?

Displacements are effectively brushes based on a mesh. That means that they are 2-dimensional, and can be modified to create interesting and unique terrain and detailing. However, they come with their own set of weaknesses. They must have at least 4 edges, and will not seal a map.

displacement edges.png

2. How do I create a displacement?
To create a displacement, select the face edit tool (the multicolour cube), then click onto the displacement tab. This will present you with a wide array of displacement-related tools, but for now we're only going to need one. Select the face(s) of a brush that you want to be a displacement, and press Create. Set the 'power' to 3, and press OK.
Congratulations, you have created a displacement!
If your displacement is missing faces that you had selected, that is because you attempted to create an invalid displacement. Make sure all faces you selected had at least 4 edges, and try again.
If you accidentally selected a face you didn't want as a displacement, select the face in question and click Destroy

3. How do I edit a displacement?
To edit a displacement, go back to the displacement tool set, and press Paint Geometry. This will open another menu, with another set of tools. Your mouse will also create a sphere around points on a displacement in the 3D view, along with an arrow. Going back to the new tools, we have effect, axis, brush, distance, spatial, and autosew.

hammer_2020-07-27_20-27-42.png
  • Raise/Lower: This, when checked, will cause you to raise or lower areas of a displacement by clicking on it. Left click to raise, right click to lower.
  • Raise to: This, when checked, will make the displacement raise to an area determined by its original position, the distance setting, and the axis setting.
  • Smooth: This, when checked, will attempt to smooth areas of terrain when you hold the left mouse button on it.
  • Spatial: Check it.
  • Axis: From this, you select the axis to work from. Your options are: face normal, subdiv normal, and X/Y/Z
  • Face normal: By default, this will be aligned to the Z axis, but can be changed to be whatever you want. While using this axis, hold Alt and right lick on any face in the 3D view to align the axis to the brush. This is partiularly useful for working on curves that are misaligned with the other axis'.
  • Subdiv normal: Painted geometry will move along an axis determined by the curve generated after using the Subdivide command on a set of faces. Confusing, I know.
  • Brush: Selects the number of vertices affected when the Spatial option is unchecked.
  • Soft/Hard-Edge: Switches between soft and hard edge painting then the Spatial option is unchecked.
  • Distance: Determines how many units to move the vertices by whenever you click on a face.
  • Radius: Determines the radius in which you affect the position of vertices.
  • Autosew: Checking this will have hammer automatically try and sew faces after every displacement change. This is good when working with only a couple of faces but can cause major performance issues when editing a lot at once.
4: How do I connect displacements?
In order for displacements to connect, they must share an edge perfectly. This does not mean that their edges have to just share an axis, they have to be the same dimensions, and in the same position.
After that, you can connect these displacements by clicking the Sew button.

sew_example.png
5: How can I do a texture transition?
You can use the Paint Alpha tool in order to 'technically' use more than one texture on a single displacement. I say technically, because this works by adjusting the alpha layer of a texture. As such, one texture can only have two possible materials. Most textures don't support this, but ones that do often have 'blend' in the file name, so searching for that in the texture browser will be the easiest way to find them. Once you have applied a blend texture to your displacement, click the Paint Alpha button, and a menu similar to Paint Geometry will appear. It works almost identically, though rather than moving the position of vertices, it will adjust the alpha layer. Typically, you'll only ever need to use the Raise/Lower option. You can simply just hold left mouse button across the displacement and watch it 'paint' a new texture over the top. Right click will erase the new texture. If you want to completely fill the displacement with the new texture, you can use the Invert Alpha tool, which will instantly.. invert the alpha. Additionally, some textures may include detail sprites, which may appear as grass or flowers as you modify the alpha.

alpha_example.png
6: When should I use displacements?
In most cases, you should be using displacements for any kind of terrain. Obviously, this is mostly going to be outdoor areas. You can also use displacements as detail, but do keep in mind that displacements will not seal your map. For example, most of the buildings in the town area of Oasis are made with displacements, to blend between plaster and stone.
---------------------------------------------------------------------------------------------------------------------

CREATING DISPLACEMENT FLOORS + WALLS
This segment, if explained in writing, would be far too long. Instead, I have summarised it in this video.


---------------------------------------------------------------------------------------------------------------------
More stuff to come soon (maybe)
 

Attachments

  • engi_render.png
    engi_render.png
    515.9 KB · Views: 173
Last edited:

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
The X/✓ picture is kinda not correct. You can totally sew displacements if one is exactly half the length of the other, running from the corner to the middle. If the smaller one is one power lower, all the points will just snap to each other. If it's the same or higher, the same thing will happen that normally happens with mismatched powers: the extra points will be moved to the exact middle of the two adjacent points.
 

Suna

What's a greybox?
aa
Nov 10, 2017
407
613
The X/✓ picture is kinda not correct. You can totally sew displacements if one is exactly half the length of the other, running from the corner to the middle. If the smaller one is one power lower, all the points will just snap to each other. If it's the same or higher, the same thing will happen that normally happens with mismatched powers: the extra points will be moved to the exact middle of the two adjacent points.
Yes, of course if all the vertices along a displacement edge line up, they will sew. This was mainly used as an example to show that displacements won't sew when their vertices are mis-aligned (even though they would in the picture).