Atlas Engine

Cloth

Create anchored fabric with bending, collisions, and atmospheric wind.

Cloth is a component for deforming a triangle mesh through Bezel Jolt. Use it for flags, curtains, and other thin surfaces. Author it in the Inspector on an object backed by a CoreObject mesh.

Prepare the mesh

Start with a triangulated surface containing enough vertices to bend. A plane made from only two triangles has too little detail for convincing fabric. Use Subdivision to add detail before simulating, and begin with a low level while tuning.

Add Cloth from the Inspector's component menu. Let Atlas initialize and advance the simulation when the scene runs.

Anchor the fabric

The anchors list fixes selected mesh regions. Available positions are Top Left, Top Center, Top Right, Center Left, Center, Center Right, Bottom Left, Bottom Center, and Bottom Right.

For a hanging curtain, start with Top Left and Top Right. For freely falling fabric, leave the anchor list empty. Check the mesh orientation when choosing which edge should remain fixed.

Tune the simulation

SettingPurpose
massTotal cloth mass
stretchComplianceFlexibility of stretch constraints
shearComplianceFlexibility of shear constraints
bendComplianceFlexibility of bending constraints
bendTypeNone, Distance, or Dihedral bending
dampingReduces persistent motion
friction and restitutionContact sliding and bounce
gravityFactorScales gravity for the cloth
solverIterationsConstraint solver work per step
vertexRadiusCollision thickness around cloth vertices
doubleSidedControls the cloth's double-sided configuration
allowSleepingAllows settled fabric to stop active simulation

Lower compliance makes a constraint stiffer. Increase iterations only after checking mesh scale and density. A very dense surface increases simulation and vertex-upload work even when the cloth appears motionless.

Use rigidbody colliders for surfaces the cloth should touch. Give thin surfaces a sensible vertexRadius, then inspect contacts in play mode.

Add wind

Cloth receives wind from the current scene's enabled atmosphere. Configure the atmosphere's wind, then adjust windInfluence on the Cloth component. Set it to 0 to remove the wind contribution or begin with 1 for the default influence.

Wind is applied before the physics step. Changing a transform every frame can conflict with the simulated motion; use anchors to hold the fabric in place.

See the declared Cloth settings, AnchorPoint, and ClothBendType for exact names. Use the editor workflow for Cloth authoring.

On this page