Forces

Gravity
Damp
Wind
Turbulence
Air
Spring
Volume
Sew
Magnet
Gravity

The gravity is a uniform force. For any point in space, the force is the same (as if the earth was flat). The gravity force has the following attributes:
  • Active
    The force is applied only when this attribute is set to 'on'.
  • Gravity
    An (x,y,z) value specifying both the direction and intensity of the gravity.
    The magnitude G of the gravity depends on the units of the scene, and of the planet. On earth G = 9.81 m/s2. If the scene is in centimeters (1 meter = 100 centimeters), and time is in frames (1 second = 24 frames) then the value for G must be:
    G= 9.81m/s2 = 9.81*(100 cm)/(24 f)2 = 1.703 cm/f2 .
    Examples:
      meters centimeters
    seconds 9.81 981
    frames (24/s) 0.017 1.70
    frames (30/s) 0.0109 1.09
Damp

Damp is a viscous force that slows down the movement by dissipating energy. The intensity of the damp force is proportional to the speed. The damp force has the following attributes:
  • Active
    The force is computed only when this attribute is set to 'on'.
  • Damp
    The damp constant. The default value is 0.0001.
Damping prevents infinite oscillations (such as in a pendulum). On a cloth it is often better to lower the damp constant, in order to prevent dragging the cloth.
High values (> 0.001) will slow down the simulation.

Wind

The wind force is defined by the main direction of the wind, and a perturbation blowing in another direction. The wind force has the following attributes:
  • Active
    The force is applied only when this attribute is set to 'on'.
  • Wind
    This is the main direction and intensity of the wind.
  • Delta Wind
    The perturbation to the main direction of the wind. The wind direction at any time is :
    Wind + K x DeltaWind
    where K varies randomly between -1 and 1.
  • Delta Time
    This is the time between two changes in the perturbation.
  • One Side
    The wind force can be applied on both sides of the cloth, or only on one side. For example in the case of a flag the wind must be applied on both sides. But for a t-shirt, the wind doesn't blow inside the cloth: the force is applied only outside.
    - side= 0: wind applied on both sides
    - side= 1: wind applied outside
  • Seed
    Defines the initial seed of the random values for the wind.
    When set to 0, a different seed value is used each time the simulation is recomputed.
Turbulence

The turbulence force is similar to the wind, but it is not uniform both in space and time. The turbulence force has the following attributes:
  • Active
    The force is applied only when this attribute is set to 'on'.
  • Wind
    This is the main direction and intensity of the wind.
  • Intensity
    The magnitude of the turbulence.
  • Grid Size
    The wind intensity and direction is not the same in different points in space. Imagine a 3D grid ("Grid Size" being the size of a cube in this grid). The wind will have a different intensity at each node of the grid.
  • Frequency
    Time between two changes of the wind.
  • Seed
    Defines the initial seed of the random values for the turbulence.
Air

This force is very similar to the previous force: it's also a viscous force. It takes into account the orientation of the cloth and its speed. The force will be maximum for the faces of the cloth moving in the direction of their normals:

The air damp force has the following attributes:
  • Active
    The force is computed only when this attribute is set to 'on'.
  • Damp
    The intensity of the damp. A common value is 0.0001.
  • Side
    This attribute controls whether the force is applied on both sides of the cloth (such as on a flag), or only one side (as on a cloth):
    - side= 0: damp applied on both sides
    - side= 1: damp applied outside
    - side=-1: damp applied inside
    This attribute must be set to 0 for open surfaces (like flags), and set to 1 (or -1) for closed surfaces (like clothes).
Spring

This force connects pairs of vertices of the cloth with springs. To create a spring:
- select 2 points of the cloth
- Syflex > Forces > Create Spring
This creates a sySpring containing one spring.
To add another spring:
- select 2 vertices of the cloth
- shift-select the sySpring
- Syflex > Forces > Add Spring
The spring force has the following attributes:
  • Active
    The force is applied only when this attribute is set to 'on'.
  • Length
    If there is only one spring in this force, this is the rest length of the spring. The length is set to the initial distance between the 2 vertices when the spring is created.
    If there are more than one spring, this coefficient multiplies all the rest lengths of the springs. Default is 1.0.
    It can be animated to move closer the vertices.
  • Stiff
    The stiffness of the spring(s).
  • Damp
    The damp coefficient of the spring(s). A common value is 0.0001. damping allows to remove oscillations and vibrations.
The spring force can be used to model buttons or zippers.
This animation shows a spring which length is animated:

Volume

This force helps preserving the volume of an object. It is recommended to use it on closed objects (volumes), although it works on any object.
The force is applied on the surface of the object, and is proportional to the change of volume. The Volume force has the following attributes:
  • Active
    The force is applied only when this attribute is set to 'on'.
  • Volume
    The ratio between the current volume and the initial volume. Default is 1.0
    The volume can be increased in the same way you blow in a balloon.
  • Pressure
    The magnitude of the force.
  • Damp
    The damp coefficient to remove oscillations and vibrations.
Sew

This force creates a stitch between 2 edges of the same cloth. The edges must be at the same place.
Select vertices of the cloth, and choose "Sew" from the menu. Then specify the maximum distance between each point. The vertices selected must be pairs of vertices at the same position. Two kind of springs are created:
- "sew" springs, connecting the vertices on the edge of the cloth
- bending springs, that allow to keep the bending properties of the cloth
The stiffness of the bending spring must have the same value as the cloth bending stiffness. The "sew" stiffness must be stronger, to ensure that the stitched points stay together.
The sew force is controlled by the following attributes:
  • Active
    The force is applied only when this attribute is set to 'on'.
  • Sew Stiff
    The stiffness of the sew springs.
  • Bend Stiff
    The stiffness of the bending springs..
  • Damp
    The damp constant of the spring. A common value is 0.0001. damping allows to remove oscillations and vibrations.
To get a clean and smooth edge, it is possible to, while keeping history on:
- merge the vertices that are very close
- smooth the normals along the edge.
At each frame, vertices that are close enough are merged in the mesh, and the normals are smoothed on the edge.
Magnets

A magnet is a force that attracts a set of vertices toward itself.
A magnet force is controlled by the following attributes:
  • Active
    The force is applied only when this attribute is set to 'on'.
  • Distance Max
    This is the maximum distance of influence. Beyond this distance, a point does not fill the magnet.
  • Strength
    The magnitude of the magnet force.
The vertices attracted by the magnet can be set using the two items in the menu:
- Set Vertex Magnet
- Get Vertex Magnet
To set the vertices:
- Select the vertices
- Select the magnet (with shift or control to keep the vertex selection)
- Choose Syflex > Forces > Set Vertex Magnet
To change this list of vertices:
- Select Syflex > Forces > Get Vertex Magnet
- Modify the list of vertices
- Select Syflex > Forces > Set Vertex Magnet
Syflex LLC - www.syflex.biz