Chapter 3 · Reading a scene

3.7Friction and grip: which number acts

Friction is decided point by point, and every garment's material carries its own. Read the materials before you change friction anywhere else.

Contact The number that acts
Cloth on a collider The material at that point: Material Standard matFriction and matGrip, Material Advanced friction and grip; on a Tnpix Rigid's pieces, the Rigid's own friction. The collider row's own Friction (field 6) and Grip (field 8) act only when the row's Override material (field 11) is 1, Unpainted cloth only (the points no material covers), or 2, Everything (the row decides wherever it touches).
Cloth on cloth (Self Collision) Override material friction off: each point's material friction. A garment's own number in the garment list acts only where no material sets one, and the panel's Friction only where neither does. Override material friction on: the panel's Friction on every point, or the garment's own number in the list.
Two garments touching The average of the two points' frictions. With Layer ordering on and the two garments on different layers, the outer garment's friction acts (the higher layer number).
  • Defaults. A new Material Standard or Material Advanced starts with Friction 0.35 and Grip 3, both switched on. A new collider row has Friction 0.35, Grip 3 and Override material 0, Off. A new Self Collision has Friction 0 and Override material friction off. So in a new set-up every garment slides with its material's 0.35, against the body and against the other garments: the panel's 0 does not make the garments frictionless. A point that no material covers takes 0.35 and 3.
  • Grip multiplies Friction for holding cloth still on a collider; it does not act between garments. Raise Grip when cloth creeps slowly over a body, and Friction when it slides too freely.
  • Where to change it. For one garment against everything: its material (TnpixTool.goldSetAt g k "matFriction" 0.6, TnpixTool.matSetAt g k "friction" 0.6). For one region of a garment, such as the shoulders: a material bound to that region's channel (4.3). For one collider, whatever the cloth: that row's Override material 2 with its own Friction and Grip (4.4). For all garment-to-garment contact at one number: Self Collision overrideMaterialFriction = true and its friction.
  • Reading it. goldAt prints a Standard material's matFriction and matGrip, with (auth 1) when switched on. matAt does not print an Advanced material's friction and grip; TnpixPreset.text m does, as matFriction = 0.6 on and matGrip = 4 on (on = switched on). The report (3.3) shows the Self Collision panel, its Override switch and the garment list. In TnpixTool.rows, the column DynSlide is a row's Friction and ovr 1 means Override material 2; the column shows 0 for both Off and Unpainted cloth only.