This applies 2D rope type physics to a mesh. The modifier will build a system of masses to form a rope type structure with options for extra stiffness constraints. Then a custom 2d physics system will simulate the rope behavior and the mass positions will be used to update a mesh so allowing for cloth like behavior suitable for objects such as ropes, banners, or rope bridges. This modifier is a beta mod so is subject to a little change and improvement.
Rope Deform Param Description
Rebuild
Click this if a fundamental change to the system hasnt been recognised.
Floor Off
Not currently used.
Num Masses
How many masses to use in the system. The more used the finer the end result but more CPU power used, again use the lowest value that gives you the results you need.
Mass
Mass of the system, each mass in the physics will be this divided by the Num Masses.
Axis
Axis which to deform the mesh on.
Stiffness Crv
Adjust the stiffness of the system along the length.
Stiff Spring
Stiffness spring rate.
Stiff Damp
Stiffness damp rate
Spring
Spring rate
Damp
Damping rate
Off
Offset of springs in the mesh, used to adjust the floor of say a rope bridge to match the physics masses and links.
Spring Compress
Add some pre compression to the system
Bend Springs
Add bend spring constraints to the system.
Constraints
Add length constraints to the system
Damping Ratio
Damping ratio for the system, use this instead of damp value.
Left
Left object transform to constrain system to
Right
Right object transform to constrain system to
Weight
Simulate a weight on the system of this mass at the position described below
Weight Pos
Position of weight across the system
Physics Params
Time Step
Physics update rate, the lower the value the more detailed the physics will be but more CPU power used, find the highest value at which the system perfroms nicely.
Gravity
Value for Gravity
Air Drag
How much air resistance to movement there is
Friction
General friction in the system, damping force really.
Iterations
How many steps to use to solve the constraints, again keep this value at the lowest needed for a nice result. Higher numbers lead to a stiffer system.
Method
Which method of integration to use, Verlet is probably the best place to start, if you choose another integrator then you may need to adjust your params. Integrators available:
- Euler – Euler integration, fast and accurate but can be unstable.
- Verlet – Verlet integration, fast and stable.
- VerletTC – Verlet time corrected integration, fast and stable should be more accurate than Verlet.
- MidPoint – Midpoint integration.
Apply Constraints
Toggle constraints being applied.
Debug Info
Display Debug
Show debug info
Draw Steps
How many steps to use in the debug display lines
Box Size
Size of mass boxes in the debug
Rope Deform Class
{
public float floorOff;
public int NumMasses;
public MegaSoft2D soft;
public float timeStep;
public float Mass;
public MegaAxis axis;
public AnimationCurve stiffnessCrv;
public float stiffspring;
public float stiffdamp;
public float spring;
public float damp;
public float off;
public bool init;
public float SpringCompress;
public bool BendSprings;
public bool Constraints;
public float DampingRatio;
public bool DisplayDebug;
public int drawsteps;
public float boxsize;
public Transform left;
public Transform right;
public float weight;
public float weightPos;
}
Video of Rope 2D Deform
You must be logged in to post a comment.