The Bake Cage

· · Shared with Auto Remesh

When Vertexix bakes from the loaded model onto the Generated Mesh, every texel of the new mesh sends out a ray to find the original surface and records what it meets there. The cage is the set of rules for those rays: which way they leave, how far they may go, and what happens when they find nothing. Its controls sit in the 5. Create Normal Map accordion in Manual Remesh (7. Create Normal Map in Auto Remesh), just under Max ray distance (% of model size), and they apply to every bake that projects onto the loaded model — not only the normal map.

The Create Normal Map accordion in the Retopology tab, scrolled to Max ray distance (% of model size), with Smooth cage over hard edges and Fill misses from the nearest surface both ticked, the Paint Cage and Auto-fix Cage buttons side by side, and under them the dimmed 'Cage reach painted on ... points' line and a 'Cage auto-fixed: ...' status line; the Generated Mesh of a retopologized hard-surface mech model in the viewport
The cage controls in the Create Normal Map accordion, after an Auto-fix.

What the cage is for

The Generated Mesh is a simplified copy of the loaded model, so the two surfaces never lie exactly on top of each other: the new mesh cuts across hollows, skims over bumps and stands off the original by different amounts in different places. Vertexix casts each texel's ray both outward and inward from the new surface and takes the nearest piece of the original it meets, so you never build a separate, inflated cage mesh as some bakers ask you to.

Two things can still go wrong. A ray that stops too soon meets nothing — a miss — and that texel has nothing to bake. A ray allowed to go too far can land on a different part of the model wherever that part is nearer than the surface the texel belongs to: the next finger along, the far side of a narrow gap, a strap lying against a body. That part's detail is then baked onto the wrong place. So the reach must be long enough to meet the original everywhere, and short of the next surface beyond it. One Max ray distance (% of model size) for the whole model is a compromise between the two; the cage lets you do better.

Which bakes use it

  • Create Normal Map, including Transfer Source Normal Map and Combine with Source Normal Map, which find the loaded model's own normal map the same way.
  • Transfer Texture.
  • Create Height Map. Its rays always leave straight along the surface normal, because that is the direction a renderer displaces along, so Smooth cage over hard edges does not change it; the miss fill and the reach do.
  • Bake All from the Loaded Mesh, for the normal and height maps it makes.
  • Export as VDM Bake..., when its source is The Loaded Mesh, along the normals.

The Extra Actions bakes — ambient occlusion, and the cavity, curvature and edge maps — measure the mesh itself rather than the loaded model, so the cage does not affect them.

Smooth cage over hard edges

On a hard edge, the mesh's points are split in two: each side of the edge has its own copy of the corner point, carrying its own side's normal. If the rays left along those normals, the two sides of a sharp corner would cast apart like a fan, and the original surface lying in the wedge between them — the rounded or bevelled corner of a high-poly model — would never be hit. The result is a crack of unbaked texels along every hard edge, which the padding then fills with a guess.

With Smooth cage over hard edges on, every copy of a point casts along the same averaged direction, so the two sides meet and the cage is closed. Only where the rays go changes: the baked normals still follow the mesh's own hard edges, so a hard-surface model keeps its crisp shading. It is on by default.

Fill misses from the nearest surface

A miss is a texel whose rays meet nothing within reach in either direction. Left alone, it stays empty and the padding grows its neighbours' values over it. With Fill misses from the nearest surface on (the default), the texel takes the nearest point of the loaded model instead, looking up to four times its reach away. When a bake keeps to one material's part of the loaded model, the fill keeps to that part too.

A fill is a fallback, not a true match: the nearest point is not always the one straight ahead along the ray. It beats a hole, but where texels miss because their reach is too short, giving them more reach (below) gives a truer result. In a height map, a filled height is held to the texel's reach, so one far-off texel cannot stretch the range of the whole map.

How far the rays reach

A coarse retopology can stand well off the original in some places — across a hollow, or over the middle of a large face that bows away from the surface between its corners — while elsewhere two parts of the model almost touch. A single distance long enough for the first is too long for the second.

So each point of the Generated Mesh can carry a reach of its own, as a multiple of the max ray distance, from 0.05× to 8×. Across a face the reach blends from one corner's value to the next. Until you change it, every point is at 1× and the bakes reach exactly the max ray distance. There are two ways to set it: Auto-fix Cage measures the model and sets every point for you, and Paint Cage opens the Cage Paint window, where you paint it by hand. Once any point differs from 1×, a line under the two buttons counts the points with a painted reach, and the result of the last Auto-fix or probe is shown below it.

Auto-fix Cage

Auto-fix Cage in the sidebar, or Auto-fix in the Cage Paint window, looks along each point's ray, both ways, for the surface the bake would take there and for the next surface beyond it. It checks the middle of every face around the point as well as the point itself, because a retopologized face can bow away from the original between its corners. Then it sets the point's reach:

  • far enough to meet the farthest of those surfaces, with 15% to spare;
  • but held under halfway to the next surface beyond, so it stops short of a neighbouring part;
  • never shorter than the distance to the point's own surface, so a point squeezed between two close surfaces still reaches its own;
  • always within 0.05× to 8×.

It searches out to 8× the max ray distance; a point that finds nothing that far keeps the reach it had. Auto-fix measures with the Max ray distance (% of model size) just above it and along the directions Smooth cage over hard edges gives the rays, so set both first. It replaces every point's reach, including any you painted; with the Cage Paint window open, Ctrl+Z takes it back. When it finishes, the status line says how many points reach well, fall short, reach a second surface and find nothing — the same four groups as the probe.

The Cage Paint window

Paint Cage opens the Cage Paint window; click it again to close it. Both buttons need a Generated Mesh. The brush paints on the Generated Mesh only, so have it on screen (see Loaded Mesh vs. Generated Mesh), and paint from the Retopology tab: the Paint and Sculpt tabs keep their own brushes, and the window says so if you open it there.

While the window is open, the Generated Mesh is coloured by its reach: white at 1×, shading to blue where it reaches less (down to 0.05×) and to red where it reaches farther (up to 8×). The PBR view is held off so the colours show, and the mesh's own colours come back when you close the window.

The Cage Paint window floating over the viewport, with Reach (x the max ray distance) at x2.00, Brush radius, Brush falloff, Show the probe unticked, the Auto-fix, Probe and Reset buttons and the 'Cage auto-fixed: ...' line; the Generated Mesh of a retopologized hard-surface mech coloured by its reach after Auto-fix: red where the reach was raised, blue where it was cut short between parts that nearly touch, white at 1x
Painting the reach: blue reaches less than the max ray distance, red farther.
ControlWhat it does
Reach (x the max ray distance)What a stroke paints, from 0.05× to 8× (2× to start with): 2 reaches twice as far as the max ray distance, 0.5 half as far.
Brush radiusThe brush's size on screen, 1 to 500 pixels. Shared with Vertex Density Paint's brush.
Brush falloffHow softly the edge of a stroke blends into the reach already there, 0 to 1. Also shared with Vertex Density Paint.
Show the probeColours each point by what its rays find instead of by its reach (see Reading the probe). If there is no current probe, ticking it runs one.
Auto-fixThe same as Auto-fix Cage in the sidebar.
ProbeMeasures every point at its current reach, changing nothing, and shows the result on the model.
ResetPuts every point back to 1×, the max ray distance. Undo takes it back.

Painting

  • Drag with the left mouse button on the Generated Mesh to paint. Points under the brush take the Reach value, blended toward the brush's edge by Brush falloff. Painting over the same place again does not add up: it moves the reach toward the slider's value. A press off the model turns the view as usual.
  • Drag with the right mouse button on the model to paint the reach back to 1×.
  • Ctrl+Z takes back the last stroke, Auto-fix or Reset, and Ctrl+Shift+Z redoes it, up to 64 steps. These keys work while the Cage Paint window is open over the Generated Mesh.

Reading the probe

Probe sorts every point into one of four groups and colours the Generated Mesh by them. The counts appear as a line in the window and in the sidebar.

ColourMeaningWhat to do
GreenReaches well: its rays meet the original, and no second surface is in reach.Nothing.
OrangeFalls short: the original lies farther away than the point reaches.Auto-fix, or paint the reach farther there.
PurpleReaches a second surface as well as its own. The nearest still wins at the point itself, but texels between it and a neighbouring part can take the other surface.Look at the baked map there. If another part's detail shows through, paint the reach nearer.
RedFinds nothing within 8× the max ray distance.Raise Max ray distance (% of model size) and Auto-fix again.

A probe describes the reach it measured. A stroke, an undo or Reset clears it, and the model shows the reach colours again until you press Probe.

The Generated Mesh of the same retopologized hard-surface mech after pressing Probe at 1x, before any Auto-fix, with Show the probe ticked in the Cage Paint window: green points, wide orange patches across the middle of large panels, purple where an arm runs close to the body, a few red points, and the 'Cage probe: ... points reach well, ... fall short, ... reach a second surface, ... find nothing' line under the Auto-fix, Probe and Reset buttons
The probe: green reaches the model, orange falls short, purple reaches a second surface too, red finds nothing.

Painting or Auto-fix?

Start with Auto-fix: one click measures the whole model, and the probe after it shows what is left. A good order is:

  1. Make the UV map, then set Max ray distance (% of model size) and Smooth cage over hard edges.
  2. Press Auto-fix Cage.
  3. Open Paint Cage and tick Show the probe to look for orange, purple and red.
  4. Bake, and look at the result.

Paint when you want to change one region and leave the rest alone — Auto-fix always sets every point — and when a test bake shows a problem in one place: paint the reach nearer where a neighbouring part's detail has crept in, and farther where the map shows a gap or a smeared fill. Painting is also the way to set the reach without running a measurement at all, for instance to give one deep recess more reach.

Good to know

  • Smooth cage over hard edges and Fill misses from the nearest surface are saved with a project. The painted reach is not: after reopening a project, run Auto-fix again or repaint.
  • The reach belongs to the current Generated Mesh. When the Generated Mesh is rebuilt with a different number of points, the painted reach and its undo steps are cleared.
  • The reach is a multiple of the max ray distance, and Transfer Texture has a Max ray distance (% of model size) of its own. Auto-fix and Probe measure with Create Normal Map's; if the two sliders differ, the same multiples reach a different distance in Transfer Texture. Keep them equal (both start at 2) when you rely on Auto-fix for both.
  • The AI Assistant Ultra can probe, Auto-fix, reset and paint the cage, and show or hide the Cage Paint window, through the same steps as the buttons.