Search Unity

  1. Unity 2019.4 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[RELEASED] Magica Cloth

Discussion in 'Assets and Asset Store' started by hoshos, Jan 22, 2020.

  1. ChrisCoool

    ChrisCoool

    Joined:
    Jul 3, 2017
    Posts:
    5
    Hi, I have a problem when I use MagicMeshCloth to simulate hair. Everytime when I finish point selection and reopen it, the points change. Many points turn into red ones! Is there anything wrong?

    Thanks a lot!
     
  2. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Hello.
    First, can you check if you are using the latest version of MagicaCloth?
    The latest version is v1.7.2.
    In the previous version, there was a similar bug when two or more inspector windows were placed.
     
  3. ChrisCoool

    ChrisCoool

    Joined:
    Jul 3, 2017
    Posts:
    5
    Thanks for the reply.

    Well, I am using the latest version of MagicaCloth. Let me elaborate my problem.

    I am not sure if there is something to do with the mesh complexity. My hair mesh contains more than 40,000 vertices. I set the "Merge Vertex Distance" to 0.05, which reduces the number of vertices to 421(I leave other options to be default).

    Then I create the "Magica Mesh Cloth" component to do point selection. I set all points above the head to red(fixed) ones and set others to green ones. Then I click "End Point Selection", then "Create". It seems everything is going well.

    However when I click "Start Point Selection" again, it turns out that many green points become red ones. It's very strange. So the hair looks very stiff when avatar is walking.

    Is there any suggestions? Thanks.
     
  4. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Hello.
    This is likely a bug.
    Can you answer the next question, because you want more information?

    (1) Virtual Deformer settings
    Does the same problem occur even if [Merge Vertex Distance] is set to other than 0.05 such as 0.04?

    (2) Other mesh
    Does the same problem occur with models other than the hair model where the problem occurs?

    (3) Unity version
    What is your Unity version?
     
  5. ChrisCoool

    ChrisCoool

    Joined:
    Jul 3, 2017
    Posts:
    5
    Sure.
    1. I have tried serveral value of [Merge Vertex Distance] but the problem still exsits. I find a pattern that the smaller the value is, the fewer the green points turn to red ones.

    2. This problem only occurs with hair model. Other models are fine.

    3. My version is 2019.3.6f1.

    Hope these will help.
     
  6. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Thank you for the information.
    After all, there is a high possibility of problems due to the structure of the mesh.
    Is it possible to rent a model with problematic hair?
    Of course we will delete it after the experiment.
     
  7. ChrisCoool

    ChrisCoool

    Joined:
    Jul 3, 2017
    Posts:
    5
    Hi, thanks for your patience. I'm afraid that I cannot give model to you guys. Sorry about that. I will ask our artist to check it out. Thank you again.
     
  8. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    I am sorry that I cannot solve the problem.
    I will experiment with some high mesh models here as well.
    If you have any hints, I would appreciate it if you could contact me.
    (For example, only the problem mesh has different import settings..)
     
  9. adventurefan

    adventurefan

    Joined:
    Jan 17, 2014
    Posts:
    201
    I experienced the same thing today. Nothing fixed it until I tried a few other slightly different merge vertex difference. It was confusing.

    Also I wanted to bring up that having my own test character with cloth in the same scene with unitychan character for testing... it breaks both their physics simulation/stretches things if they are enabled at the same time. Nothing was copied from the demo character so this is strange. They both work fine if only one is enabled in the scene.

    It has this error:

    System.IndexOutOfRangeException: Index {0} is out of range of '{1}' Length.
    Thrown from job: MagicaCloth.RestoreDistanceConstraint.DistanceJob
    This Exception was thrown from a job compiled with Burst, which has limited exception support. Turn off burst (Jobs -> Burst -> Enable Compilation) to inspect full exceptions & stacktraces.

    Are multiple cloth characters supported in one scene?

    EDIT: Resolved. I'll leave this here in case anyone does the same thing at some point. The issue was their scale was too different. Putting my object the same as the demo character's scale fixed it.
     
    Last edited: Jun 25, 2020
  10. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Hello.
    I was worried because I did not understand the cause, but I was relieved that the problem was solved.
    Scaling at runtime is supported from v1.7.2.
    You'll need to create the data in v1.7.2 to enable this, but the scaling issue is gone.
    Thank you.
     
  11. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,021
    So I was using your rated version very nicely, today I purchased Magica Cloth as it works well for my game, I installed the paid version of Magica Cloth (1.7.2) via Unity package manager, now the hair works different, see below:

    Before (ok):
    before.PNG
    After:
    Update-Issue.PNG
    Looks like gravity just got turned upside down, or thee is some wind from the bottom upwards? Why is that happening..
    I am hesitant to install the paid version now as I have a working setup.., I have purchased the asset via the store and will keep that of course, but can I just keep using the rated version you initially gave me as that is all setup to how I need it?

    Thanks.
     
  12. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Hello.
    Thank you for your report.
    I can use the previous version, but I want to manage this problem somehow, so can you answer the following question?
    Can you tell which version of MagicaCloth was used before?
    Is it a pretty old version?
     
    Last edited: Jun 28, 2020 at 4:53 AM
  13. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Announcement

    We found a rare cause of mesh collapse when swapping characters with multiple MagicaCloths.
    It will be fixed in the next update.
    We apologize for the inconvenience.
     
  14. JossesMan

    JossesMan

    Joined:
    Aug 22, 2019
    Posts:
    2
    Hello! Hello! You can use the custom designs kiosk if you have unlocked the Able Sisters Shop and are Nintendo Switch Online. You can look at the entire collection via Model ID if you are looking for a similar outfit or via Maker ID!
     
  15. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,021
    Hi, you sent me magicacloth170.unitypackage
     
  16. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Thank you.
    Since v1.7.0 is recent, old bugs are unlikely to be relevant.
    Sorry for your inconvenience, but can you do the next experiment?
    (Please make a backup before doing this)

    (1) Turn off collision
    Turn off Collider Collision on the panel and turn off the collision detection.
    Does this fix the problem of growing up like the image?

    (2) Recreating the data
    Just in case, can you recreate the data for the corresponding RenderDeformer/VirtualDeformer/XXCloth?
    Does this fix the problem of growing up like the image?
     
  17. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,021
    Thanks for your reply, I will try your tests soon, I am close to a game release so may be delayed in getting back to you, as I put the version 170 files back and it works perfect, for now I am happy :)
    Maybe I need to click the create buttons again to update data?
     
  18. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Okay, wait for your test.
    The create button should not be necessary if you use v1.7.0 as it is.
    If you create data with v1.7.2 once and then return to v1.7.0, it is safer to press the create button again.
    However, if the game is already working properly, it's better not to do anything.
     
  19. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Hello, ChrisCoool.
    Probably the cause was found.
    Currently, the maximum number of vertices that can be handled by one Render Deformer is 65535 or less.
    This is a limitation of MagicaCloth.
    Exceeding this value will cause problems with vertex painting.
    Can you check if the mesh in question has more than 65536 vertices?
     
  20. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    30
    Hi Hoshos,

    I appreciate your constant updates on this plugin and I am trying to update from 1.6.0 to 1.7.2, but getting this compile error.
    Assets\MagicaCloth\Core\Physics\Manager\PhysicsManagerBoneData.cs(568,48): error CS1061: 'TransformAccess' does not contain a definition for 'localToWorldMatrix' and no accessible extension method 'localToWorldMatrix' accepting a first argument of type 'TransformAccess' could be found (are you missing a using directive or an assembly reference?)


    Could you help?
    My environment is,
    • Unity 2019.2.8f1
    • Magica Cloth v1.7.2
    • Jobs - version 0.1.1 preview
    • Burst 1.2.3
    • Unchecked "Allow 'unsafe' Code in the Player Settings.
    Thanks
     
  21. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Hello.
    It turned out that localToWorldMatrix of TransformAccess class was added from Unity2019.2.14.
    This is my design mistake, sorry.
    In Unity2018, we are taking measures because we knew this fact.
    The solution is to update your Unity version to 2019.2.14 or above.
    Is it possible to upgrade?
     
  22. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Update: 1.7.3

    v1.7.3 has been released on the Asset Store!
    http://u3d.as/1Hzx

    Added option to merge Avatar colliders when attaching AvatarParts to Avatar.
    The offset coordinates of the collider can now be set.
    Fixed a fatal issue where vertices collapse.

    mergecollider-1.jpg

    sphere-collider-2.jpg

    Release Note:
    Added: You can now add colliders to the cloth component at runtime.
    Added: Added option to take over Avatar collider when connecting Avatar Parts to Avatar.
    Added: You can now set the offset position on the Collider component.
    Added: Added OnAttachParts and OnDetachParts events to Magica Avatar.
    Improvement: Animation control of BlendWeight is now possible.
    Improvement: [Adjust Rotation] of Spring component is always enabled and changed to the method to set the behavior according to the mode.
    Improvement: Fixed the problem that gizmo of MeshSpring and Collider was displayed even in unnecessary situations.
    Improvement: The control of PlayerLoop is exposed as an external function.
    Fix: Fixed an issue where mesh vertices would occasionally collapse when swapping multiple cloth components.
    Fix: Fixed the problem that a GUI error occurs when loading a preset in Unity 2019.4.
    Fix: Fixed the problem that an error occurs when a mesh with vertex weights is put into MeshRenderer and MeshCloth is set.
     
  23. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    540
    What is the use case for this, does it increase performance or something and/or modify the accuracy? For example, I have colliders on the hips, thighs, feet and head for mesh cloth collisions, would merging them do anything to affect that?
     
  24. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    30
    hmm, at this moment, it's not possible to upgrade to Unity 2019.2.14 yet.
    In the meanwhile, I could use the older version.
    What's the best latest version I can use with 2019.2.8?
    (though I don't know how I can get the earlier version of the release)
     
  25. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    It has nothing to do with accuracy or performance.
    When attaching AvatarParts, there was a request to combine Avatar colliders, so I implemented it.
    Therefore, this is an option and can be turned off.
     
    Acissathar likes this.
  26. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    We apologize for the inconvenience.
    This issue will be resolved soon.
    However, in the meantime, I will put the download link for MagicaCloth 1.6.0 in your [InBox].
    (Is the version 1.6.0 good?)
    I think it's a problem that UnityAssetStore can't download older versions.
    Once the fix is complete, we will announce it on this forum.
     
  27. nekoneko777

    nekoneko777

    Joined:
    Sep 11, 2013
    Posts:
    30
    Understood. Thanks for the fix!!
    I am using 1.6.0 currently so I will hold off of upgrading until the fix is in!
     
  28. godrasetu

    godrasetu

    Joined:
    Sep 1, 2017
    Posts:
    1
    Hello,everybody
    I have a question about the animation of magica cloth. plz see the screenshot. that when the character play the sit animation, the cloth `s bone is not stay on the leg`s collider (It`s slide down of it ). So I want to know how to fix this problem. Thank `s very much.
     

    Attached Files:

  29. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    Hello.
    You're probably using BoneCloth.
    Long skirts are especially difficult, but try adjusting according to the following guides.

    (1) BoneCloth skirt
    https://magicasoft.jp/en/boneclothskirtguide-2/
    The important point here is to connect the sides of the bone with [Near Point] of [Restore Distance].
    This enhances collision detection.

    (2) Preventing penetration
    https://magicasoft.jp/en/prevent-penetration-2/
    This setting is especially important for skirts.
    This limits particles from moving in unintended directions.
     
  30. cherisechiao

    cherisechiao

    Joined:
    Yesterday
    Posts:
    1
    Thanks for your reply. The assets in our project are complex, considering the costs we can’t use Mesh Cloth mode. Bone Cloth is the only we can use in this Magica Cloth simulation system.

    We tried surface penetration and collider penetration, but it’s not working with Bone Cloth, the penetration problem still exists, as shown in pic below.

    图片1.png

    Also, we tried to increase the Friction but still didn’t work.

    图片2.png

    We hope to find a way to solve this problem base on the Bone Cloth simulation mode.

    Thanks.
     
  31. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    142
    I've understood the situation.
    In this case, it seems best to use [Collider Penetratoin] with BoneCloth.
    Regarding [Collider Penetration], can you check if the particles are properly connected to each collider as shown in the image?
    This can be displayed by checking [Penetration] on the Cloth monitor.
    If this line is not connected properly, it will not work.
    pene-9.jpg
     
unityunity