利用者:Lucarood/Cloth/Doc

提供: wiki
移動先: 案内検索

Improvements to the Cloth Simulator

Mass Spring Model

With the old mass-spring model used by Blender, the user could have no independent control over bending and compression, or stretching and shearing. As shown in the image below, the tension and shearing springs were coupled together.

Tension and shear springs shown in blue, and compression/bending springs shown in red. (springs of same color translate to a single property in the UI)


Also, a single linear spring was responsible for both bending and compression resistance, as can be observed in the animation below. Furthermore, the usage of linear springs for resisting bending, deviates significantly from actual cloth behavior, and even allows bends to be flipped to the opposite direction without any resistance.

(Crossectional view) This image shows that the same spring was responsible for providing both compression and bending resistance, by pushing opposite sides of a bend away from each other.


The new model has componentized springs, and the addition of angular bending springs. Combining these things, the user has complete control over every aspect of the cloth stiffness independently.

Tension springs shown in blue, compression springs shown in red, shear springs shown in cyan, and angular bending springs shown in green. (springs of same color translate to a single property in the UI)


Beyond that, the angular springs behave much more realistically, and are signed, meaning that the cloth is aware of the direction of the bend, thus not allowing it to get flipped.

(Crossectional view) Here in the new model it can be seen that a new dedicated angular spring was added specifically for bending, while the compression springs always stay flush with the cloth surface.


Below are comparisons of various aspects of the cloth model that were improved.

Comparison of the old cloth bending model (left) and the new model (right).
Comparison of the old combined isotropic cloth tension model (left) and the new componentized anisotropic stretch/shear model (right).


Plasticity

Plasticity is the most significant property of deformable materials that was missing from Blender's cloth simulator. Plasticity is the property in which materials retain deformations after being subjected to stresses, and thus don't return completely to their original shape. In addition to the improved mass-spring model, the inclusion of this property, is the final piece in enabling the simulation of virtually any known deformable sheet material.

The same simulation shown without plasticity (left), and with plasticity (right).

External Rest Shape

The "Dynamic Besemesh" feature allows the underlying cloth mesh animation to be used as the new rest shape on each frame, thus enabling effects where the cloth changes shape throughout the simulation. However, an issue arises when this feature is used in combination with pinning. Because the pins also utilize the underlying mesh state to determine vertex locations, one could not have independent control over the pin locations and the dynamic rest shape. Now support has been added for using another mesh (with identical topology) as the rest shape.

The image below demonstrates the described issue, and shows how one can now animate rest shape and pin locations independently.

From left to right: Animated cloth mesh (before simulation); Simulated cloth using own mesh both for pinning and as dynamic rest shape; Simulated cloth using external rest shape mesh; Animated mesh used as rest shape;