Fix: 'Texture axis perpendicular to face'

September 24, 2025 Daemon666 8 min read 5 vues

Your compile log fills with lines like:

Warning: Texture axis perpendicular to face

It is a warning, not a fatal error — the map usually still compiles — but it means a face has a broken texture projection, and in game that face will show a smeared, stretched, or garbage texture. The texture's projection plane is at 90 degrees to the face it is applied to, so the compiler cannot map the pixels onto the surface sensibly. It almost always comes from vertex manipulation or rotating a brush, and the fix is to re-apply a valid texture alignment to the offending faces.

1. Understand the cause

Every face stores a texture axis — two vectors describing how the 2D texture is projected onto the 3D face. When a face lies flat relative to that projection, the mapping is fine. When you use the vertex tool to drag a brush into a wedge, or rotate a brush so a face becomes near-vertical relative to its stored projection, the axis can end up perpendicular to the new face. The compiler cannot divide by that, warns, and falls back to a degenerate mapping. The face still exists; it just looks wrong.

2. Read the warning to find the face

Older ZHLT prints the warning with the brush/entity number and often the texture name. Vluzacn's VHLT v34 gives clearer diagnostics, sometimes with coordinates. Note the brush number, then in Hammer use Map → Go to Brush Number (or the equivalent) to jump straight to it. If you cannot get a number, the culprit is nearly always the last brush you vertex-manipulated or rotated.

3. Re-apply the texture with world alignment

Select the bad face with the Texture Application (Face Edit) tool, and re-project it cleanly:

  • Open the Face Edit / Texture Application dialog.
  • Select the offending face.
  • Click World alignment (the compiler-friendly default) — or Face alignment if the face is angled and you want the texture to follow the face plane.
  • Re-apply the texture. This rewrites the texture axis to something valid.

World alignment projects the texture along world axes and is the safest choice for most faces; Face alignment lays the texture flat onto an angled face and is right for ramps and slopes. Either one replaces the perpendicular axis with a working one.

4. Copy a good alignment onto the bad face

A fast fix in Valve Hammer: with the Face Edit tool, hold Alt and right-click a neighbouring face that looks correct. That copies its texture and alignment onto the face you clicked, replacing the broken axis. This is the quickest way to fix a wedge whose top or side went perpendicular after vertex work.

5. Fix the geometry if it keeps recurring

If the same brush keeps throwing the warning after re-aligning, the geometry itself is degenerate — a face collapsed to near-zero area, or three vertices nearly collinear from over-aggressive vertex dragging. Delete and rebuild that brush from a clean block rather than fighting the alignment; a near-invalid solid will keep corrupting its own texture axes. Keep vertex manipulation modest and check faces as you go.

A related habit prevents most of these warnings in the first place: build angled and vertex-manipulated shapes from a properly-textured block, then do your vertex work, then re-apply textures to the faces you moved. If you texture last rather than first, the projection is computed against the final face orientation and the perpendicular case rarely arises. When you must carve or clip a brush, run the Texture Application tool over the new faces immediately, because clipping inherits the parent brush's axes and a clipped face can land perpendicular the moment it is created.

Common errors

  • Warning: Texture axis perpendicular to face repeated many times — one vertex-manipulated brush with several bad faces. Re-align each face with World/Face, or Alt+right-click a good neighbour.
  • Warning gone but the face still looks smeared — you re-aligned but did not re-apply; click Apply after choosing World/Face so the axis is rewritten.
  • Comes back every compile on the same brush — degenerate geometry. Rebuild that brush from a fresh block.
  • Whole ramp textured wrong — use Face alignment, not World, so the texture follows the slope.
  • Ignored it and shipped — players see a stretched face. It is cosmetic but obvious; fix it before release.

Verification

Recompile and confirm the warning is gone from the hlcsg/hlbsp log for that brush. Load the map and look directly at the previously broken face — the texture should sit flat and undistorted, tiling correctly across the surface. Move around it to check the projection holds from every angle. If a few warnings remain on other brushes, repeat the re-alignment; a clean compile log for a finished map should have zero texture-axis warnings. For a broader texturing pass, see the optimization checklist.

Contributeurs: Daemon666 ✦
Partager :