Overview
Here we will explain an example of setting a skirt using MeshCloth.
We will proceed on the premise that you have already learned how to set up MeshCloth.
If you haven’t already, read the MeshCloth Getting Started Guide.
(* Make sure to use the latest version of MagicaCloth)
With MeshCloth, realistic shaking can be expressed by performing cloth simulation for each vertex of the mesh.
The following video shows the effect, pay attention to the shaking of the skirt.
Skirt mesh settings
First, assign Render Deformer to the mesh of the skirt.
Since the skirt of the model used this time is a pleated skirt as shown in the figure above, there are fine irregularities.
Next, create a Virtual Deformer that combines Render Deformer of the skirt.
As mentioned above, the original mesh has fine irregularities this time.
If this is left as it is, undesired overlap of neighboring vertices may occur during simulation, which is not very good.
Also, if there are many calculation vertices, performance will be wasted.
Therefore, adjust the settings of Virtual Deformer and perform reduction to the extent that fine irregularities disappear.
This reduces the number of calculated vertices, and the combined vertices retain their surrounding shape, making it difficult to collapse.
Virtual Deformer reduction is mainly performed from the following two parameters.
Merge Vertex Distance | Simply put the nearby vertices together. |
Merge Triangle Distance | Combines nearby vertices along a polygon structure. This is useful when you don’t want to change the shape of the polygon too much. |
Finally, I created Virtual Deformer as follows.
Note that the fine irregularities are almost gone.
Mesh Cloth settings
Now let’s set up the MeshCloth for the skirt.
Perform vertex painting and set fixed and moving points.
To set the cloth parameter, it is faster to apply the preset first.
Select [MeshCloth_Skirt] from the presets and apply.
Most parameters are set.
SPECIFY SPINE BONE AS WORLD INFLUENCE
Although not required, it is recommended to specify the hip bone in the Influence Target of the World Influence parameter.
This makes it possible to control the movement effect around the waist bone.
For example, if you assign a hip bone to Influence Target and set [Movement Influence] and [Rotation Influence] to low values, the skirt will hardly shake even when the main body is animated or moved.
ABOUT ROTATION LINE
It is this rotation line that is important in the cloth parameter Clamp Rotatin / Restore Rotation.
The rotation line extends from the fixed vertex to the end point of the moving vertex, and the rotation angle is controlled based on this line.
The rotation line of MeshCloth is automatically generated from the shape of the mesh of Virtual Deformer and the fixed and moving vertex information.
For example, the following rotation line was generated from Virtual Deformer of this skirt.
This can be confirmed by checking the [Rotation Line] on the cloth monitor.
Clamp Rotation settings
Although not required, it is better to limit the angle at which the skirt bends with Clamp Rotation.
This keeps the skirt in shape.
This time, I set it as follows.
This means that the start point (fixed particle) of the rotation line can be bent up to 20 degrees and the tip can be bent up to 50 degrees.
However, please note that pushing by collision detection has a higher priority than this limit.
Restore Rotation settings
This is also not required, but restoring rotation will give better results with the force needed to restore the bend in the skirt.
This ensures that the skirt will always retain its original shape.
Although the value is low, 0.012 restores the shape with a fairly strong force.
Restore Distance Settings
For the Restore Distance of the skirt, it is better to set the Bend and keep the shape as much as possible for better results.
By setting Bend, the vertices that span one polygon connection and the restoration line are connected.
This makes it difficult for the shape to collapse.
This time, I set it as follows.
The blue line in the image is the Bend connection line.
(The light blue line is a restored line of the original polygon structure in Struct)
Near connections don’t make much sense in MeshCloth.
This is because the Struct restoration line has already been added to match the polygon connection line.
Triangle Bend settings
Triangle Bend performs the processing to restore the angle between the two polygons that are connected.
This makes it difficult for the shape to collapse.
For MeshCloth, Triangle Bend is an almost mandatory feature.
Keeps the polygon shape strong.
This time, the strength (Bend Power) was set to 0.5 as in the image, but if you want to keep the shape, 1.0 is no problem.
Collider settings
After that, we will add colliders.
First, add the capsule colliders for both feet, and if necessary, the waist colliders.
The important thing here is to add one big sphere collider on your waist.
This acts as a lid that prevents particles in the skirt from slipping into the body due to violent movement.
It is not mandatory, but it is safe to add as much as possible.
Operation test
From here, try to actually execute it and adjust the parameters with trial and error.
Parameters can be changed during execution, so it is easy to adjust while actually moving.
Preventing penetration
If your skirt slips into your body or legs while running, try the following adjustments.
(1) Adjusting the position and size of the collider
(2) Adjusting particle size
(3) Adjustment of rotation interpolation
Rotation interpolation can set the following items with the Rotation Interpolation parameter.
Fixed Non-Rotation | When turned on, fixed particles will not rotate at all. |
Line Avarage Rotation | When set to ON, the line rotation is interpolated to the average rotation from the connecting parent-child structure. * It has no meaning in the polygon structure. |
(4) Reduction adjustment of Virtual Deformer
Depending on the situation, there may be too few or too many particles to simulate.
In this case, it may be possible to obtain good results by adjusting the reduction settings of Virtual Deformer variously.
(5) Settings for Surface Penetration / Collider Penetration
It limits the distance that particles can penetrate and prevents it from getting stuck.
Preventing penetration
This concludes the skirt guide using MeshCloth.