Repository navigation
Live Deform Preview
The viewport can show how the mesh deforms by a different skinning method while you pose or play, so you can see a candy-wrapper elbow or a stretched hip before you bake anything. It is a preview only: exports, weights and bakes do not change.
Open the Deform section at the bottom of the Skin tab. The Preview block is at the top.
| Control | Does |
|---|---|
| Deform method | Linear blend (the standard skinning every game engine uses), Dual quaternion, Blend mask mix, or Delta mush |
| Smoothing passes | delta mush only, 1 to 30, default 10; a precompute setting |
| Smoothing step | delta mush only, 0.1 to 1, default 0.5; a precompute setting |
| Stretch map | tints the mesh by how much its edges stretch or squash |
Switching method or turning the map on and off never rebuilds the model or flashes the view. The preview gets everything ready before it first shows, so a short Preparing the preview line can appear on the first use.
- Linear blend is exactly what the viewport showed before. The picture is identical to the plain mesh.
- Dual quaternion keeps volume at twists, so a forearm turned 180 degrees does not collapse. Each vertex has a pivot: its influences are sorted by weight, largest first, and ties by bone number; the heaviest is the pivot, and any bone whose rotation points away from it is flipped. The engine and the viewport shader use the same sort and rule, so a Michelle pose with a hand turned 180 degrees and a shoulder 270 differs by 2.25e-4 of the model size (it was 5e-4), and only 2 vertices pass 1e-4, both among the 59 that sit at an exact 180 degree gap, where a rounding difference cannot be removed. Other poses agree to about 1e-6.
- Blend mask mix mixes linear blend and dual quaternion per vertex by the painted blend mask (see the Blend mask channel in Skin and weights): where the mask is 1 the vertex is dual quaternion, where it is 0 it is linear blend, and in between it is the straight mix of the two positions. Both are evaluated from the same rest vertex in parallel and then mixed, the shape the patent rules require. A mask of all zeros equals Linear blend and all ones equals Dual quaternion (difference 0.0 in the engine); a mask of 0.5 sits at the exact midpoint. With no mask painted the pane says the mask is empty, so the preview matches linear blend. The Preview with the blend mask switch in the Layers panel switches to this method and restores the previous one when turned off.
- Delta mush rounds off creases and loses some volume while keeping the rest-pose detail. It is evaluated by Direct Delta Mush: from the rest mesh alone, FormRig precomputes per vertex and per bone a small smoothing matrix, and each frame blends those with the joints' current matrices and finds the best-fitting rotation for the stored detail. The posed mesh is never smoothed itself. The passes and step are the same ones used when a corrective is baked (see Deform), so the preview matches the bake. Direct Delta Mush approximates classic delta mush rather than equalling it: against the old result the mean difference is a few millionths to 7 hundred-thousandths of the model's size, and the worst single vertex up to about 2 percent in extreme limb turns. Why it is built this way is on Patents and deformers.
Each edge is compared with its rest length. Blue and cool colours are squashed, neutral is unchanged, warm colours are stretched. The scale is fixed: the ends are a ratio of about 1.5 either way. Use it with the quality report in Skin and weights to find where weights need paint. At rest it is neutral (largest value 8e-5 on Michelle, 5e-6 on Xbot), seams included: vertices welded across a seam show one value.
The delta mush evaluation and the rules for dual quaternion skinning follow a patent check, described in plain words on Patents and deformers.
- Scaled bones. Dual quaternion cannot show scale. A bone that is scaled or sheared blends linearly instead (dual quaternion falls back to linear blend on scaled joints), and the pane says so: Scaled bones blend linearly, because dual quaternion cannot show scale. A skeleton with only moves and rotations is unaffected.
- Changing the smoothing. Smoothing passes and Smoothing step are computed ahead of time from the rest mesh, so moving either slider re-reads the preview data (a short Preparing the preview) instead of changing one number live. The cost per frame does not grow with the passes. The data is large, but it now travels as a binary pack instead of JSON: 8.6 MB for a 16,340 vertex mesh (11.4 MB before) and 33.9 MB for Michelle's 60,715 vertices (45.2 MB, 1.72 s before; 0.95 s now). The first preparation of the 60,000 vertex mesh takes about 1.6 s and a changed pass count about 2 s. If the binary route answers an error that is not a plain refusal, the window falls back to the JSON data.
- Float render target. Delta mush and the stretch map need a graphics card feature (float render targets). Without it the pane shows No float render targets here, so delta mush and the stretch map are off, and Linear blend and Dual quaternion still work.
- Morph shapes. Blend shapes now show in the preview, applied before skinning as glTF does, in all three methods (the 32 heaviest active shapes). Delta mush treats a shape's offset as part of the rest detail. Against the engine on Michelle with three test shapes and an arm raised, the difference is 4e-7 of the model size (linear blend), 8e-7 (dual quaternion) and 4e-7 (delta mush). The viewport's delta mush keeps the rest normal while shapes are active.
- Speed. Speed has been measured only on software graphics. On a 60,000 vertex mesh a frame, drawing plus the chain, took a median 298 ms for linear blend, 295 for dual quaternion, 424 for delta mush and 530, 490 and 658 with the stretch map; on 16,000 vertices 148, 171, 259, 186, 154 and 231. How it runs on a real graphics card is not yet measured.
-
Blend mask parity. The chain in the window matches
deform.evaluatewithblendedto 5.9e-7 of the model size over three poses including the 179 and 181 degree flip, and with the mask at 0 or 1 equals linear blend or dual quaternion exactly (material pixel difference 0.00000). Turning the mask on is a uniform and an attribute, not a new material: 200 toggles with the blend method in the cycle linked no new program. The window's dual quaternion has a scaled-bone fallback that the engine's lacks, so on a non rigid bone the window and the engine can still differ. - If the mesh changed after the preview data was built, the pane says the data does not match the mesh; pick the method again.
deform.preview_pack {mesh, iterations, step} returns the welded vertices, the rest-smoothed positions, the detail (rest minus smoothed, in rest space), the rest normals and the per vertex bone smoothing matrices (omega, 12 bones kept per vertex) as base64 arrays. The triangle arrays are empty. deform.evaluate {mesh, method (lbs, dqs, blended, delta_mush), iterations, step, optional clip, time, joints, compare, morph_weights} poses the model as pose.solve does and returns positions and normals, to check the window against the engine. morph_weights is one number per shape of the mesh and replaces the weights the clip and drivers give; the wrong count is refused in plain words. The result adds morph_count and, for dqs, pivot_near_ties. Both only read. The window fetches the same data as a binary pack from GET /api/engine/preview_pack?mesh=&iterations=&step= (16 little endian words of header with the magic FRDP, then the arrays); deform.preview_pack stays as the JSON route.