Chapter 3 · Reading a scene
3.1The set-up in brief
-
Modifiers. Tnpix Solver is the only modifier that simulates. Every other Tnpix modifier contributes to it: gravity, fabric, colliders, painted regions and so on. A switched-off modifier behaves as if it had never been added, and nothing acts on the cloth unless it is on the stack. Without a Tnpix Gravity there is no gravity; an object collides only once it is in a Tnpix Collision list.
-
Solver group. Every object that carries the same Tnpix Solver instance is simulated together, as one Solver group. Its garments collide with each other, stack in layers and can be stitched together. Two garments on two separate Solvers never touch. An object carries one Solver.
-
Group-wide and per-garment settings. Group-wide settings have one value for the whole Solver group:
- gravity;
- the collider list (rows from every member are merged);
- the Self Collision settings;
- the Tear's trigger (Tear by), Ends and weakness range;
- Accurate strain limit, Solve steps per iteration and Multi-res levels. For these three, the Solver runs the highest value that any garment's top Material Standard sets.
Where two members carry different values for any other group-wide setting, the member created first wins.
Each garment keeps its own: channels, Pin, Stitch and Tear regions, materials (each with its own friction and grip, 3.7), Preserve, Forces, Volume, Rigid, Soft Body, Garment and Threads. Share the group-wide modifiers as one instance across the group.
-
A shared Solver changes nothing for a garment. A garment that shares a Solver with other garments behaves as it does on a Solver of its own: its weight and its self-collision sizes stay the same.
-
Each garment has its own space. A garment is simulated in its own space, and every tool follows the cloth's own space. Moving or turning the whole set-up gives the same simulation; the whole set-up is the garment with its colliders, the objects its pins follow and its forces. Moving only one part of it (the garment alone, one collider, or the object a pin follows) does change the simulation. The Solver's Unlimited ground always stays at Z = 0.
-
Stack order. Bottom to top:
- Tnpix Garment at the bottom, because it changes the vertex count;
- Tnpix Channel above it;
- the modifiers that describe the cloth;
- Tnpix Solver above them;
- Tnpix Threads directly above the Solver, and Tnpix Cache above the Solver;
- Tnpix Post Process above the Cache, and Tnpix Motion Brush above the Solver and its Cache;
- render modifiers such as TurboSmooth or Shell on top.
Where two materials paint the same points, the higher one wins. A Tnpix Soft Body or Tnpix Volume that has a Channel and sits above a Tnpix Pin or Tnpix Preserve lets go of the points it paints.
A typical stack, top to bottom:
TurboSmooth > Tnpix Post Process > Tnpix Cache > Tnpix Solver > Tnpix Self Collision > Tnpix Collision > Tnpix Gravity > Tnpix Pin > Tnpix Material Standard > Tnpix Channel > Tnpix Garment > Editable Poly. -
Channels. A channel is a named weight map painted with Tnpix Channel, from 0 (outside) to 1 (fully inside). Other modifiers bind a channel by its name, and a channel that nothing reads changes nothing.
- A material acts only on its own garment's paint.
- The channels of Pins, Stitches and Tears are merged by name across the Solver group, so give each garment's channels their own names, for example
shirt_collar.
-
Playback and memory. The simulation starts at the first frame of the animation range, and every simulated frame is held in memory.
- Changing a simulation setting simulates again from the first frame, up to the frame shown.
- Keyed settings are read frame by frame.
- Editing a shape below the Solver, a collider's shape, or the shape of an object a pin follows starts the simulation again.
-
Caches. A garment that plays from its Tnpix Cache file is read from disk. It is fast, identical every time and unaffected by changes below the Cache.
-
Units. Lengths are numbers in the scene's system unit; Gravity is in units per second squared. These values use real-world units instead:
Value Unit TenPix Wind speeds and sizes m/s and metres Fabric weight g/m² Tnpix Rigid density g/cm³ Soft Body stiffness and density kPa and g/cm³ Tear threshold not a length: a strength you set by reading the Tear's status line A new modifier expresses its length defaults in the scene's unit. A new Gravity, for example, is −386.22 in an inch scene, −981 in centimetres and −9.81 in metres.
-
Repeatable. The same scene with the same settings produces the same simulation every time.