Skip to content
RED+
Contents

Textures

Wrap Texture

Wrap carries one face's texture mapping on across shared edges to the faces you pick. Use it where a texture has to run on without seams round a curve, a bend or a climb, such as a tunnel.

Where to find it

  • The Wrap Across Edges... button at the bottom of the Texture Mode panel. It applies as soon as you click it, with no options window.
  • RED+, Wrap Texture Across Edges (RF+) does the same.
  • RED+, Wrap Texture, Strips Along V (RF+) walks the faces in the other order (see The two walk orders).

The two commands are in the RED+ menu only, not in RED's own menus.

How to use it

  1. Switch to Texture mode (Shift+T).
  2. Map one face the way you want, with any of RED's usual tools. This is the seed face.
  3. Click the seed face first.
  4. Ctrl+click the faces the texture should continue onto.
  5. Click Wrap Across Edges..., or choose one of the two RED+ commands.
  6. Read the result line in RED's log window. The same line goes to the RED+ log.

Wrap makes an undo step before it changes anything. Edit, Undo (Ctrl+Z) puts the old mapping back. If Wrap refuses once it has started, for example because the seed face has no usable mapping, the undo step is still made.

What it does

  • Starting at the seed, Wrap moves from face to face across the edges the selected faces share. Each face gets its neighbour's mapping, unfolded across the shared edge. Every edge it crosses matches exactly, and no face is flipped.
  • It crosses flat and gently bent edges before sharp ones. On a curved surface the mapping cannot match everywhere, so the mismatch lands on corners and on edges Wrap did not cross.
  • Where a neighbour has a different texture, Wrap keeps the same pixels per metre, not the same number of repeats.
  • It changes texture coordinates only. Textures, face flags, lightmap coordinates and geometry stay as they are.

Closing a loop

When the faces form a ring, such as the walls of a tunnel, the ring comes back round to the seed. Wrap then stretches the mapping slightly, so the texture repeats a whole number of times round the ring and meets itself without a seam.

  • It closes a ring only if the texture already goes round the ring at least once, and only where two faces with the same texture meet.
  • It stretches only when the change needed is small: from about 15 percent shorter to about 18 percent longer.
  • Only faces with the seed's texture are stretched.
  • The result line reports the stretch as loop stretch.

The two walk orders

The button and the two commands all close loops. They differ only in the order Wrap takes between edges that bend by about the same amount.

  • Wrap Across Edges... and Wrap Texture Across Edges (RF+) work along the texture's U direction first. With a seed whose U runs round a tunnel, they go round each ring before they move along the tunnel.
  • Wrap Texture, Strips Along V (RF+) works along V first.

The order decides where any leftover mismatch ends up. If a seam lands where you can see it, undo and try the other order.

Faces Wrap leaves alone

The button needs at least two selected faces, and refuses when a selected face has no texture. The RED+ commands ignore faces without a texture.

The result line reports these counts:

In the result lineWhat it counts
not edge-connectedFaces Wrap left unmapped, for any reason, apart from faces with no area.
foldedCrossings Wrap refused because, unfolded, the face would fold back over the face it joins.
non-planarCrossings Wrap refused because the face is not flat.
degenerateFaces with no area, and crossings Wrap refused because the neighbour's mapping could not be carried over.

A face refused across one edge may still be mapped across another.

The line also reports closing edge(s), where two mapped runs met without Wrap crossing between them. Only edges between faces with the same texture count. worst residual is the largest mismatch on those edges, in tiles, measured before the loop stretch. with no world copy counts mapped faces that have no copy in the built geometry.

Messages

MessageFromWhat to do
Select textured brush faces in Texture mode first.ButtonSwitch to Texture mode, select the faces again, and click the button.
Select at least one textured brush face in Texture mode.ButtonNothing is selected. Click the seed face, then Ctrl+click the others.
Click the face with the correct mapping first, then Ctrl-click the adjoining faces to wrap onto.ButtonOnly one face is selected. Ctrl+click the faces to continue onto.
A selected face has no texture. Apply a texture first.ButtonGive that face a texture, or leave it out of the selection.
Wrap works in Texture mode: click the face that is mapped the way you want, Ctrl-click the faces the texture should continue onto, then Wrap.RED+ commandsSwitch to Texture mode, select the faces again, and run Wrap.
Select the seed face first, then the faces to continue onto.RED+ commandsNothing is selected. Click the seed face, then Ctrl+click the others.
No brush faces are selected.AllThe selection holds no textured brush face Wrap can use.
The first-clicked face has no usable texture mapping (degenerate uv).AllMap the seed face properly, then run Wrap again.