Chapter 4 · Recipes
4.7Preserve
A Preserve makes a painted region follow the animation of the mesh below the Tnpix Solver, instead of simulating it. That animation can come from a Skin, Skin Wrap, Tnpix Wrap, Morpher, Point Cache, or anything that moves the mesh.
undo "TenPix: preserve the cuffs" on (
local pv = tpaAddBelowSolver $Shirt (Tnpix_Preserve())
pv.channel = "shirt_cuffs"
)
-
It needs animation below the Solver. Check that the garment is deformed below its Solver. Without such animation, a preserved region stays where it was modelled.
-
The paint is the strength:
Painted The point 1 Sits exactly on the animation, on every frame. It is ignored by every collision (colliders, ground, self collision, other garments) and pushes nothing. Between 0 and 1 Follows that share of the animation: 0.5 follows half, 0.75 three quarters. It is still simulated, so it still collides. 0 Is simulated, as without a Preserve. Paint 1 where the part must ride exactly, falling to 0 over two or three rows into the simulated cloth. Keep the hard edge (paint 1) where no other cloth has to rest on it.
-
Stack position. Its place in the stack does not change what it follows. On the same point it wins over a Tnpix Pin.
-
Frame by frame. Play from the first frame with Real Time off, or simulate frame by frame (4.15), and every frame follows the animation exactly. Frames skipped by a jump ahead on the timeline are approximated.