Search Unity

[RELEASED] Magica Cloth

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

  1. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Unfortunately there is currently no way to reconstruct the data while it is running.
    The data must be created in advance.
    However, this request has been received from many people, and we are looking for ways to improve it.
     
    weto4ka likes this.
  2. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
  3. bamncan

    bamncan

    Joined:
    Dec 15, 2013
    Posts:
    47
    Thank you!
     
  4. imariagano

    imariagano

    Joined:
    Dec 20, 2012
    Posts:
    25
    thank you very mush
     
  5. imariagano

    imariagano

    Joined:
    Dec 20, 2012
    Posts:
    25
    instal bust job already

    but eror
     

    Attached Files:

  6. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    The installed [Collections] package seems to be out of date.
    [Collections] is automatically installed when you include the [Jobs] package and now looks like the image.

    package-1.jpg

    Therefore, try updating the [Jobs] package version to the latest 0.7.0.
    If that doesn't work, try removing the [Jobs] [Collections] [Mathematics] package and installing the [Jobs] package again.
     
  7. imariagano

    imariagano

    Joined:
    Dec 20, 2012
    Posts:
    25
    ok I can fix now( install is very hard why you can't make it easy

    now I will try to setup project
     
  8. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    We apologize for the trouble.
    Currently, the [Jobs] [Collections] package is a preview version, so if there is an update, the function will be deleted or renamed, so an error like this will occur.
    Unfortunately this is out of control here.
    Therefore, we are always developing to match the latest package.
    Once the [Jobs] [Collections] package is official, this shouldn't happen.
     
  9. weto4ka

    weto4ka

    Joined:
    Feb 8, 2019
    Posts:
    48
    Thanks a lot)
     
  10. weto4ka

    weto4ka

    Joined:
    Feb 8, 2019
    Posts:
    48
    Hi there!
    Will you be doing blendshapes compatibility? And if so, when will it be released?
     
  11. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    Unfortunately, we still don't know how to merge the vertices of the blend shape into Magica Cloth.
    Therefore, there are no plans to work at this time.
    However, the policy may change if a solution is known in the future.
     
    weto4ka likes this.
  12. NSokolovskyi

    NSokolovskyi

    Joined:
    Sep 1, 2017
    Posts:
    5
    Hi. Having some strange problem after 1.8.3 update. Looks like when velocity equals zero, generated mesh disappear where simulation done.

    Any suggestions? (tried to recreate components, rebuild magica components, and clear library folder (latest unity2020 and packages))

    Even if i am bad programmer, have no ideas how can i break this with my code =/


    And another one, can't reach jitter fix with updated version. I will be grateful for any help.
     
    Last edited: Nov 10, 2020
  13. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    We apologize for the inconvenience.
    I watched the video.
    First of all, I would like to investigate the problem of clothes disappearing.
    Is it possible to turn off the Burst compiler and execute it as follows?

    Disappear-issue-1.jpg

    And is there any error message in the Console when the clothes disappear in this state?
     
    NSokolovskyi likes this.
  14. ChrisCoool

    ChrisCoool

    Joined:
    Jul 3, 2017
    Posts:
    14
    Hello! I have a technical question about Magica Mesh Cloth. I know Magica Cloth uses Job System and Burst Compile. However when I check the Profiler, it shows that the job CollectLocalPositionNormalTangentJob3 always takes much time and almost 99% of the job runs in only one worker thread while other threads are in idle state. You can check the upload file.

    In my production environment, CollectLocalPositionNormalTangentJob3 can take up to 4 ms to finish and 99% of it runs in one thread. This is too much load and main thread is waiting for it. I wonder if there is any way to improve this job's
    parallelism.

    Thanks a lot!
     

    Attached Files:

  15. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    CollectLocalPositionNormalTangentJob is the work of shaping the vertices of the mesh and is executed for each renderer.
    Therefore, if there are three renderers, three jobs will run in parallel, but if there is one, it will be occupied like a profiler.

    The reason for this design is that this implementation will result in faster speeds if there are multiple characters.
    However, if there is only one renderer like this time, there is a problem that the job will be in a standby state due to the processing.

    How many vertices are there in the mesh in question this time?
    Also, what percentage of the vertices are required for cloth simulation?
     
  16. ChrisCoool

    ChrisCoool

    Joined:
    Jul 3, 2017
    Posts:
    14
    Thanks for reply.

    When you say renderer, it's Unity's SkinnedMeshRenderer right? I am simulating a short skirt. The mesh of skirt contains 18000 verts and 26404 tris (is this too much?). After reduction work, there are 360 verts and 642 tris. You can check the attached pictures for more details.

    In my opinion, even if there is only one job, it still can run in serveral threads if the job is heavy. So if there is only one renderer, I thought it may run in multiple threads. Correct me if I am wrong.

    Thanks!
     

    Attached Files:

    • 1.png
      1.png
      File size:
      21.7 KB
      Views:
      324
    • 2.png
      2.png
      File size:
      32.4 KB
      Views:
      330
    • 3.png
      3.png
      File size:
      48.8 KB
      Views:
      321
    • 4.png
      4.png
      File size:
      17.4 KB
      Views:
      334
  17. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Thank you for the detailed information.
    Yes, the renderer is the Skinned Mesh Renderer.
    There are certainly many 18000 vertices, but there is no problem with a PC.
    The reason for asking this question is that graying (Invalid Point) for vertices that are not related to simulation, such as images, reduces the load.

    invalid-point.png

    However, I found that this was not possible with this skirt.
    Certainly, in this case, it is much faster to distribute the processing by vertex.
    In fact, we have already experimented with the process of parallelizing each vertex.
    Therefore, if the number of meshes is less than the available threads, it seems better to automatically switch to parallel processing for each vertex.
    I promise to test this implementation in the near future.
    And if there seems to be no problem, I would like to update with a near version.
    Please wait for a while until then.
     
  18. ChrisCoool

    ChrisCoool

    Joined:
    Jul 3, 2017
    Posts:
    14
    OK, thanks!
     
  19. weto4ka

    weto4ka

    Joined:
    Feb 8, 2019
    Posts:
    48
    how to make fixed point of cloth and whole cloth follow character animation?
    when I turn on character animation, clothes deform on colliders, but still at the same place as it was before. Is there some rule to do that? I set up penetration parameter for colliders, but it doesn't solve a problem
     
  20. ClementSchepens

    ClementSchepens

    Joined:
    May 27, 2020
    Posts:
    25
    Hi, I wanted to know if you were working on this improvement.
     
  21. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    I couldn't figure out the problem from the text.
    Do you have an image or video that shows the situation?
     
  22. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    rest assured.
    This process has already been tested and will be included in the future.
    It will probably be updated in the near future.
    However, I've been busy lately and haven't had much time to work.
    Please give me some time.
     
    ObiOneStenobi likes this.
  23. weto4ka

    weto4ka

    Joined:
    Feb 8, 2019
    Posts:
    48
    Hi!
    When I have two or three clothes on my character, they intersect and penetrate each other. How to make them lie on top of each other and reduce penetration? I use a different virtual deformer for each cloth. Could this be the reason for the intersections? Do I need to use one deformer for the whole outfit?
    This is how it looks:
    Cloth_penetration.jpg
     
  24. NSokolovskyi

    NSokolovskyi

    Joined:
    Sep 1, 2017
    Posts:
    5
    Thanks for the answer. The console is clean of course. Tried compilation off, everything goes the same.

    Problem reproduces when colliders have "global" option turned on.

    00:00 Everything is fine (no global colliders)
    00:39 Disappears with global collider option on, when i move model
     
    Last edited: Nov 13, 2020
  25. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Thank you for the image.
    First of all, I'm sorry, Magica Cloth is not a very advanced cross simulation.
    Designed for relatively casual games.
    It is difficult to accurately simulate such body-fitting clothing.
    This is for the following reasons:

    (1) Currently does not support self-collision
    (2) Does not support mesh collision
    (3) Since speed is important, the number of simulation iterations is small.

    I'm sorry to disappoint you.
    However, it may be possible to avoid it to some extent now.
    First of all, it is better to put together all the meshes required for one Virtual Deformer, instead of attaching a Virtual Deformer to each garment.
    Then, increase the reduction and drop it into a relatively low polygon.
    This can be found in the following MeshCloth documentation:

    https://magicasoft.jp/en/meshclothskirtguide-2/

    Then use the Clamp Position and Surface Penetration features to restrict movement.

    https://magicasoft.jp/en/paramater-clamp-position-2/
    https://magicasoft.jp/en/prevent-penetration-2/

    I hope this explanation helps.
     
  26. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Thank you for the video.
    It was very helpful.
    This seems to be a bug in the global collider.
    Let's test if we can reproduce the problem here.

    Basically, it is recommended not to use Global Collider except for special reasons.
    I don't think a global collider is necessary for this character, so can I remove the global check and operate it?
    If you check the global check box, all cloth components and collision detection will be performed, so the performance will be worse.
    Therefore, it is better to remove the global check.
     
    ObiOneStenobi and NSokolovskyi like this.
  27. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Update: 1.8.4

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

    A preset button has been added.
    Presets can be set with one click.
    You can easily select presets that you have saved anywhere in the project.
    We've also added some DynamicBone style presets.
    DynamicBone-like movements can be easily set up with this preset.

    preset-popup-3.jpg

    Release Note:
    Added: Added DynamicBone style presets.
    Added: Added a button in the Parameter Inspector that allows you to set presets with a single click.
    Improvement: MeshCloth performance has been improved in Unity 2019.4 and above.

    https://magicasoft.jp/en/release-note-2/
     
    NSokolovskyi likes this.
  28. NSokolovskyi

    NSokolovskyi

    Joined:
    Sep 1, 2017
    Posts:
    5
    Actually it's not a problem, i can set colliders on the fly.

    What about my second question?
    Do i need some special settings?
     
  29. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    I was investigating now.
    Apparently, I noticed that a collision detection calculation added in v1.8.0 is causing vibration.
    We are currently testing for improvement.
    This vibration is a problem and in some cases v1.8.5 may remove the problem calculation.
    The strength of collision detection will be slightly reduced, but it may be unavoidable.
    (Or it may be optional)
     
    NSokolovskyi likes this.
  30. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    I have one question.
    Do you use Update () to move the characters in the video?
    Or do you do it with FixedUpdate ()?
    Currently, moving by FixedUpdate () is not officially supported and vibration will occur.
     
    NSokolovskyi likes this.
  31. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    I've fixed two issues you pointed out and sent a fixed version to [InBox].
    I would appreciate it if you could test it.
    Thank you.
     
    NSokolovskyi likes this.
  32. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    Hello,

    I'm automating certain processes that copies available collider values into magica colliders, and I noticed that Magica capsule length is different than a normal capsule height.

    Shouldn't length and height be the same for both colliders? And is there a reason why the length is constraint at -1 to 1?

    upload_2020-11-15_19-44-31.png
     
  33. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    Oh, this is my mistake.
    At the time of design, I intended to match it with Unity's capsule collider, but it seems that I made a mistake.
    Half the length of Unity's capsule collider matches the length of Magica Capusul Collider.
    Unfortunately, this setting cannot be modified as it has already been released and is used by various users.
    The reason the length is clamped to 1 is because we have decided that a collider longer than that is unnecessary for the human body.
    If you need a collider longer than 1m, manipulate the scale of that collider's Transform.
    However, it must be on an even scale.
     
    ikazrima likes this.
  34. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    320
    I see.
    Also another thing on colliders, is it possible to add box collider? Or maybe a non-infinite variation of the plane collider (use case: multiple level grounds).

    +1 on this.

    Just want to add, this asset is great. :)
     
    ObiOneStenobi likes this.
  35. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    BoxCollider needs experimentation, but it can probably be added.
    This is included in the roadmap, but it's still undecided when to work.
    (Because a lot of work is currently being done)
    Therefore, it will take a little longer.
     
    ikazrima and ObiOneStenobi like this.
  36. weto4ka

    weto4ka

    Joined:
    Feb 8, 2019
    Posts:
    48
    Yes, Here is demonstration. The fabric follows the body, but the fixed point is in the same place)
     

    Attached Files:

  37. LXC005

    LXC005

    Joined:
    Apr 21, 2020
    Posts:
    1
    Hello, I have also met the same problem. I am very upset about the interweaving of costumes and ornaments on the characters.
    Do you have a plan to increase the self-collision function of clothing?
     
  38. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    I watched the video.
    Could you give me an image of the Virtual Deformer settings and vertex paint condition applied to these pants?
    The following image is a sample.
    deformer7.jpg meshcloth6.jpg
     
    weto4ka likes this.
  39. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    There are plans to implement self-collision.
    I have that as my biggest goal.
    I've already tested it, but I'm still not happy with the results.
    Recently, I have been busy and have to deal with problems, so the work has not progressed.
    So it will take some time, but I definitely want to implement it.
     
  40. weto4ka

    weto4ka

    Joined:
    Feb 8, 2019
    Posts:
    48
    Yes, this is it)
    Points.jpg VirtualDef.jpg
     
  41. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Thank you for the image.
    First of all, regarding the fixed point problem, try adjusting the following items.

    -Max Weight Count-
    Try setting the Virtual Deformer Max Weight Count to 4 instead of 3.
    This count is the number of skinning bones at one vertex.
    * Please do not forget to [Create].

    Also, I would like to confirm, do these pants follow the body without clipping in the absence of Magica Cloth?
     
  42. weto4ka

    weto4ka

    Joined:
    Feb 8, 2019
    Posts:
    48
    I increase Weight Count to 4, but clothes still don't follow the body movements.
    About the question: In some places cloth has clipping, but it follows all body movements until I turn on Magica Mesh Cloth.
     
  43. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Thank you for your answer.
    First, there seems to be a problem that the skinning of Virtual Deformer deviates from the skinning of the actual mesh.
    This seems to be noticeable in the mesh that adheres to the body like this time, and I will consider whether this point can be improved.

    However, even if this problem is solved, MagicaCloth is still unsuitable for cloth-simulation of the mesh that adheres to the body, as I answered earlier.
    Please understand this point.

    Unfortunately, I'm currently busy, so I can't get enough development time.
    At a later date, I'll investigate Virtual Deformer's skinning issues when I have time.
     
    weto4ka likes this.
  44. weto4ka

    weto4ka

    Joined:
    Feb 8, 2019
    Posts:
    48
    Okay, Thanks a lot for your answer!) It's helpful.
     
    hoshos likes this.
  45. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    123
    Hi hoshos!

    One small question:

    My character uses Final Ik with Grounder IK to handle feet iks (stepping on uneven surfaces etc), but Magica Cloth is jittering / vibrating when using grounder ik. I had the same issue with Dynamic bone, but it was solved by going to Script Execution Order and putting the Dynamic Bone scripts before the Final IK scripts.

    In the case of Magica Cloth, moving the scripts in the Script Execution Order list is not fixing the issue. Any idea how to solve this?

    I believe it only happens with MagicaBoneCloth with Collider Collision ON.

    UPDATE: Okay I think I managed to fix it by putting physicsmanager before the rest of FinalIk scripts.




    - David L
     
    Last edited: Nov 19, 2020
  46. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Hello.
    I own FinalIK, but I didn't know that these problems would occur.
    Is Grounder IK the Final IK (Grounder FBBIK) or the Unity Animator IK?
     
    xDavidLeon likes this.
  47. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    123
    Grounder FFBIK.
     
  48. ZeonIr

    ZeonIr

    Joined:
    Feb 23, 2014
    Posts:
    15
    Hi is there any way you can add Small thing like Search for host bone by Name coos i need for UMA cloths and all the time uma regenerate when i add new items is adds new set of bones i buy your asset if you can make something like that

    i use that on
    Dynamic Bone asset script your asset sounds like upgrade for me if you can do that [im not coder][plan using that for mmo game]
     
    Last edited: Nov 24, 2020
  49. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    Thank you.
    I have FinalIK and would like to experiment with this issue.
    How can I use GrounderIK to reproduce the problem?
     
  50. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    916
    * Please point out any mistakes due to translation.
    Hello.
    Please forgive me for not knowing much about UMA.
    Unfortunately Magica Cloth does not support runtime builds.
    All MagicaCloth data must be built in the editor before running the game.
    In the future, we plan to implement runtime builds for BoneCloth / BoneSpring, but it will still take some time.