User login

Navigation

Poll

I downloaded the ETQW demo and....
...I'm too busy playing for polls.
0%
...it's awesome.
60%
...it's okay, I expected better.
20%
...I'm lost in the valley, anyone have a map?
0%
...my machine won't run it. :-(
20%
Total votes: 5

Who's online

There are currently 0 users and 45 guests online.

Welcome to RUST | Gamedesign.net

Practical Displacements

Submitted by yesukai on Sun, 2005-03-27 19:39.

Displacements grant users the ability to "paint" surfaces, allowing for more realistic terrain. On problem with this is that it is difficult for newer users to meld these chaotic surfaces into their very ordered brush based maps. I'll go through a few ways to control your displacements more precisely. For information on displacement basics, check out the Official SDK Doc on displacements.

To start with, when you make a brush and turn the top side into a displacement, that edge is considered "0" height. You can go up or down from this height. Now, lets say our displacement has to line up with the brushes next to it, but when we go painting it, we always end with the edges above the surrounding brushes. Moving them down can fix this, but we can end up under the zero-level or slightly above it. In order to control exactly what elevation a vertex in a displacement ends up, we are going to use the "Raise To" tool under displacements. Set the slider to 0, then simply click each of the edge vertices. Each time you click a vertex on the displacement, it is moved to the zero level. As you have guessed, this is also useful for things like ramps, when you have a 32 unit high brush next you displacement, and you want the displacement to act a ramp. You would simply type 32 in the box next to the slider, and up it goes to the proper level. It should probably be called the "raise/Lower To" tool; it is often handy at lowering a displacement.

As you can tell in the previous paragraph, you can set numbers for "raise to" that are not on the slider. This lets you go above 30 units, to match a 32 unit high brush. What you can also do, though, is specify a negative number here. Lets say our displacement is around a bunch of other brushes, and the edges, though at 0, are showing up very obviously in game. A solution for this is to lower the edge vertices of the displacement to -1. Simply type -1 in the box next to the slider, and click the vertices, they are now below the zero point. You also need to extend the brushes around the displacement over the displacment's brush. The displacement will have its bottom underneath the brushes, getting rid of that nasty "square" look.

Another great use of displacements is for their alpha properties. This lets you smoothly transition between two textures on the displacement, good for hills and the like where the side of the hill has a different amount of vegetation then the top. However, this is also useful for normal brushes, like a piece of ground with a path on it. Instead of making a path texture, you can have your displacement texture that uses a grass texture and a dirt texture. By turning this surface into a displacements, you can "paint" the dirt path onto the grass. You can use this for many things besides a path, like mold on walls.

Displacements are a great tool that save mappers loads of time otherwise spent in vertex manipulation with tons of triangles. In the hands of the untrained, though, it can be unruly and prone to looking like crap when mixed with normal brushes. Fortunately, we now know how to instill a little order into them. If you have any questions or comments about the article, please post here or send me an email at jeffca51 at yahoo dot com. Any further questions about mapping in general can be directed to the Half-Life 2 or Worldcraft/Hammer forums.

RUST | Gamedesign.net is your source for all the latest game-editing news and tutorials. If you are seeing this message, this means that you are using a browser that does not support CSS. Please upgrade your browser and enjoy your stay at RUST and if you have any questions, comments, or suggestions, please contact a site administrator.