Unity Magica Cloth(一)

Unity Magica Cloth(一)

Store Address:
Unity store - Magica Cloth
Requirements:

  • Unity2018.4.0 (LTS) or later
  • [Burst] Resource Pack
  • [Jobs] Resource Pack (Preview)
  • [Collections] Resource Packs (Preview)
  • [Mathematics] Resource
    Packages The installation location of the above resource packages is: Widows -> Package Manager. It should be noted that the preview version of the package needs to check "Show preview packages" in the "advanced" menu. Of course, if you are using Unity 2018, you also need to install the [Collections] [Mathematics] package, and Unity 2019 or later will be installed automatically.

Component introduction

MagicaPhysicsManager


The physics of the MagicaCloth plugin is controlled by its own physics engine, which is completely separate from Unity's physics engine. Therefore, it does not interfere with Unity's physics system at all, so each scene needs a MagicaPhysicsManager component for MagicaCloth to work, and the PhysicsManager manages the calculation time of the entire system and physics.

MagicaBoneCloth


The bone simulation component simulates some non-stretchable objects by controlling the bones. Such a physical model is more suitable for simulating hair, ropes and other objects that do not agree to be stretched but are easy to deform. stretch.

-Root List


Set the number of bones to be simulated and the root bone to be simulated. Click start Point Selection to enter the editing mode to modify the bone joint points. It should be noted that the Scene window needs to ensure that the Gizmo mode has been turned on, otherwise the bones cannot be edited.

- edit mode

  1. Z Test On & Select Near Point Only, depth point, means that when it is turned on, only the points that the camera can see will be displayed, and the points that cannot be seen will be eliminated

  2. Move Point (green), the bone point involved in the calculation

  3. Fixed Point (red), anchor point, such as curtain cloth, the top row of hanging points is the point that represents red

  4. Invalid Point (gray), invalid point, point that does not participate in the operation

  5. After setting, be sure to click End Point Selection, otherwise the set points will not be saved, that is to say, all the brushed points will be whitewashed. Note that it is best to lock the Inspector window of the component when swiping. Because if you accidentally point to other objects by mistake, after the Inspector is replaced, all points will not be saved.

  6. When the above confirmation is completed, you will find a line of red warning "No Data", this is because after editing our point, we did not tell the component that we can create flexible bone data.
    insert image description here

  7. At this point, you will look at the bottom of the component. Click Great, which means that the bone data can be created, which means that the basic settings of Bone Cloth are completed.

insert image description here

- Flexible bone collider

After the above operations are completed, you can see the corresponding flexible effect. Of course, this is only the most basic and simple operation, and there are still many parameters to be set later (I will add it after learning). Of course, we will find that hair or other objects will have the problem of passing through the mold. At this time, we need to add corresponding collision objects for the joints.

  • Sphere Collider (sphere): The sphere collider is only controlled by Position (position) and Sacle (radius), and Rotation (direction) is an invalid operation.
    insert image description here

  • Capsule Collider (capsule shape): It is very suitable for making collision bodies for arms and legs. You can change the radius of the head and tail to better match the shape of Mesh
    insert image description here

  • Plane Collider (plane shape): It is suitable for making ground collisions. It should be noted that the plane collider has no size, so it is regarded as an infinite plane. It is
    insert image description here
    worth noting that no matter what collider has the Is Global parameter, when checked Time means that no matter what kind of flexible bone will collide with this component, if it is not checked, you need to add parameters that need to collide with the flexible bone. Trouble.

reference article

Magica Cloth cloth simulation experience, and the introduction of plug-in functions (a big guy who personally likes to admire)

  • Message: A newcomer who has been working for almost 5 years, I hope to become someone I admire. Welcome to communicate with me.

Guess you like

Origin blog.csdn.net/chu19970426/article/details/121210747