Texture alignment

From Valve Developer Community
Revision as of 20:41, 1 September 2009 by Cfoust (talk | contribs) (A description of possible texture projections in Hammer.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hammer has several options for projecting textures onto a brush face. How these work will be discussed below.

World Alignment

World alignment is an option in the Hammer Face Edit Dialog. When World alignment is checked, it means that the texture is projected along the x, y, or z axis (whichever is closest to the orientation of the face).

An illustration of World alignment on a face. Note the distortion on the angled face.

Face Alignment

With face alignment, the texture is projected directly onto the face, whichever direction it points.

Note that quite often, a face already points in the same direction as the Hammer grid. In that case, both "world" and "face" will be checked in the face edit dialog, and they can't be unchecked. This is not a bug; it just indicates that both texture projections are in effect for the selected face. Just as often, a face points in the opposite direction as world alignment. In that case there is a difference between "World" and "Face" alignment.

An illustration of Face alignment on a face.

Arbitrary Alignment

Textures can be projected along any direction. When neither "world" nor "face" is checked in the face edit dialog, texture alignment can be considered arbitrary.

Alt-right click

Select one face on a brush, and then right click an adjacent face while holding the alt key. The texture on the second face will be aligned and shifted to match seamlessly at the shared edge. The effect is as if you had "folded" the texture around the edge. This technique is useful for aligning textures across multiple faces.

The result of alt-right click. The blue box illustrates the new texture projection of the face on the left

Align to View

An often-overlooked feature is the ability to project textures using the angles of the camera. The usefulness of this feature is limited, but it illustrates how much felxibility there is in texture alignment.

The result of align to view. The distortion of Hammer's Camera is apparent here, but pulling the camera back would show how these textures are perfectly aligned.