Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[RELEASED] Magica Cloth

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

  1. holyfot

    holyfot

    Joined:
    Dec 16, 2016
    Posts:
    42
    I am using a MeshCloth on a skirt and I have magica colliders correctly setup on the legs and they follow the legs. But the skirt still goes through the legs. Please help.
     
  2. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    215
    I just bought this. Will be working with it in the morning. Will this work on consoles (Xbox an playstation and Nintendo switch) and iOS?
     
  3. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    The roadmap will only support self-collisions.
    Self-collision is a big goal this year.
     
  4. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    I'm sorry.
    Problems with the Prefab Variant are still occurring and are under investigation.
    We would like to fix this issue as soon as possible.
    However, I don't know how to reproduce it.
    If there is an easy way to reproduce it, please let me know.
     
  5. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Thank you for your inquiry.
    This problem has existed before.
    Sorry to trouble you, but could you please tell me the version of Magica Cloth you are using?
    The current latest is 1.8.6, are you using an older version?
     
  6. athert

    athert

    Joined:
    Dec 31, 2012
    Posts:
    36
    It looks like i have latest version as well
    upload_2021-1-6_15-8-20.png
    I updated it like 2 days ago from older version (these prefabs are created in new version you mentioned). But maybe i updated it incorrectly? Should i remove all magica cloth files and then download/import from scratch or should download/import from package manager work as well?
     
  7. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Thank you for your inquiry.
    There are roughly three reasons why a collider does not respond.

    (1) Collider is not registered in the component
    (2) [Collider Collision] of the component is not checked
    (3) You have not pressed the [Create] button
    * Please turn off the global check of the collider.

    Please refer to the following documents for these steps.

    https://magicasoft.jp/en/bonecloth-start-2/
    https://magicasoft.jp/en/magicaclothmeshclothstart-2/

    Try testing this procedure first.
     
  8. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    Yes!
    MagicaCloth runs on all platforms except WebGL.
    However, it has not been completely tested on console machines (Switch / PS / XBOX).
    This is because I don't have the development equipment.
    However, some users are already using it on Nintendo Switch.
     
  9. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    It is recommended to delete the MagicaCloth folder and then install the latest version, but it's probably okay.
    One question is, is there a prefab copied from the prefab you are having problems with?
     
  10. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    669
    I think I might be able to get an example project if that would help.

    My base prefab is just a game object and some scripts, and the variants contain a different mesh. I encountered it by rebuilding the cloth data and then saving. The variant character mesh then gets put into the Base and each other variant.
     
  11. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Thank you for the information.
    I'm going to test this problem a lot.
    If you have a project that can be easily reproduced, it would be greatly appreciated.
     
  12. athert

    athert

    Joined:
    Dec 31, 2012
    Posts:
    36
    Im not sure if i understand correctly so im sorry if its not what you want to know :D This issue can be found even if prefab is first time created. Be aware that skinnedMesh will lost root bone (becouse in prefab is only skinnedMesh without bone rig) so maybe its becouse of that. I created another screenshot where im showing that i have object that is not prefab with all deformers created and when i just drag-drop it into project (so it will create prefab) it immediately corrupt all deformers.

    upload_2021-1-6_15-47-24.png
     
  13. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Thank you for your prompt response.
    Perhaps this is also a prefab bug.
    From now on, I will test various things based on your image.
    We will prioritize this issue and issues related to Prefab Variant.
     
  14. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    669
    Project sent in DM!
     
    hoshos likes this.
  15. athert

    athert

    Joined:
    Dec 31, 2012
    Posts:
    36
    Great! Thank you for fast response as well :) Do you have any ETA when you will work on it?
    When i looked at your code, i noticed that you are saving boneList as transform list and that will change into list full of nulls because you cannot point on anything outside from prefab (and that is case of my problem becouse i have just skinnedMeshRenderer without rig).
    For my personal issue, i changed code so i save names of all bones you need in boneList and when i Instantiate this prefab, i just search for bones with same name on my character and inject it to your boneList.
    Im not sure if its "safe" but its somehow working for now :D Can you please tell me if there is something i should watch out if i hack like this? (for example you know that it will cause crash if i spawn 10 clothing like this or something)
    (Edit: I found that this will not work with Collider penetration. Is there way for me to inject colliders same way as on boneList?)
    Im sending screenshot of boneList (i just draw it for this screenshot in your deformerInspector) so you can somehow in future have more knowledge about this issue :D

    upload_2021-1-6_18-33-9.png
     
    Last edited: Jan 7, 2021
  16. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    215
    Oh great. Can you tell me which games? So I can check it out.

     
  17. bhavesh_unity3

    bhavesh_unity3

    Joined:
    Dec 29, 2020
    Posts:
    7
    How can I scale Magica Collider as bone scale dynamically ?

    Integration Flow :
    1. Added Magica collider with default bone scale. (Capture1.PNG)
    2. Changing bone size dynamically.(Issue is collider not change scaled when bone scaled) (Capture.PNG)

    Issue i noticed Spear Collider is scaled with only X axis and Capsule Collider scaled according to axis we set in collider. like if we set Y axis on capsule collider then only Y scale of bone change reflect on collider.

    Thanks
     

    Attached Files:

  18. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    99
    Nice. There are a few more questions.

    Will it be with a magic mesh collider?
    Will the magica collider change shape at runtime?
    Is it possible to copying and synchronizing unity colliders and magica colliders?
     
  19. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    215
    UPDATE: so far so good. Loving the results Im getting. Especially with my palm trees using the meshDeformer. I will be leaving a review soon.

    but I have a question about the meshSpring, I can’t get this to work on a skinned mesh from mixamo. MeshSpring only works if I had the character with a SEPARATE mesh attached? I can use mesh Meshcloth on a skinned object ( all in one mesh, no extra meshes attached) but meshSpring seems to work differently. Maybe I’m wrong. I looked at the documentation and followed but nothing happens to the character. I cannot choose or color the green dots on my model when trying to do a meshSpring.
     
  20. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Thank you for the detailed information!
    We have now discovered obvious issues with prefabs and prefabricated variants and will fix them first.
    Next, I would like to tackle this problem.
     
  21. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    Colliders can be scaled at runtime.
    However, as a limitation, it must be even scale.
    Unfortunately, it does not support XYZ separate uneven scales.
     
  22. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Unfortunately mesh colliders are not supported.
    However, since there are many requests, we plan to implement it in the future.
    I am not thinking of linking with Unity Collider.
    MagicaCloth runs in a completely separate space from Unity Physics and cannot interact with it.
    However, it may be possible to convert Unity Collider values to Magica Collider values.
    In this case, it seems that you need to create a special component separately.
     
  23. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    MeshSpring does not paint vertices.
    MeshSpring swings the vertices within that range by separately setting the radius of the sphere from the center.
    (Example: Shaking chest)
    See the following documents for these:

    https://magicasoft.jp/en/magicaclothmeshspringstart-2/
     
  24. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    215
    Well yes that’s where I’m coming from.

    inread that on your page but my character is just one skinned mesh. So I can’t add the spring to a specific spot. Or am I missing something?



     
  25. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Certainly MeshSpring requires one Center Transform.
    This is necessary in the center of the chest if it is a sway.
    And you can easily make your own Transform.
    For example, for a human character, create a dummy GameObject as a child of the Chest bone and move it to the center of the chest.
    You can then set MeshSpring with this dummy node as the Center Transform.
     
  26. bhavesh_unity3

    bhavesh_unity3

    Joined:
    Dec 29, 2020
    Posts:
    7
    Last edited: Jan 9, 2021
  27. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    99
    One more question. Can merge be made larger than 0.1? In some objects, there are still more points than needed.
     
  28. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
  29. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    Yes. It is possible!
    Is about 0.5 all right?
     
    Hobodi likes this.
  30. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    99
    I think it must be enough, depends on the situation.
    Thank you. :)
     
    hoshos likes this.
  31. bhavesh_unity3

    bhavesh_unity3

    Joined:
    Dec 29, 2020
    Posts:
    7
    How can i change Mesh Cloth radius parameter max limit ?

    I want to set ,max limit more then 1.
     
  32. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    It's urgent, but you can resize it by modifying the part of the image in EditorInspectorUtility.cs.
    radius-1.jpg
     
  33. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    I found a problem with data storage in MagicaCloth, so I fixed it.
    I've sent the modified version 1.8.7.preview3 to your [InBox] so it would be helpful if you could just test it.
    Thank you.
     
  34. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    Perhaps this issue has been fixed.
    I have sent the modified version 1.8.7.prevew3 to your [InBox].
    I would appreciate it if you could test it.
     
  35. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    You've probably fixed a data storage issue with prefabs.
    I have sent the modified version 1.8.7.prevew3 to your [InBox].
    I would appreciate it if you could test it.
     
  36. athert

    athert

    Joined:
    Dec 31, 2012
    Posts:
    36
    Hello. I send you PM about my issue and that there is still problem. I also send you video, i hope it will help you in better understanding my problem :D
     
  37. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Update: 1.8.7

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

    You can now select when to update the simulation.
    If you are moving the character with FixedUpdate etc., you can suppress the vibration by setting it in Unity Physics.
    It also fixes an issue where sub-asset data was not saved properly in the prefab.
    updatemode-1.jpg

    Release Note:
    Added: Added a mode to sync with Unity Physics for cloth-components.
    Added: Added API to change cloth-component update mode.
    Improvement: Changed the maximum connection distance of Virtual Deformer from 0.1 to 0.3.
    Fix: Fixed an issue where data might not be saved correctly when saving a prefab.

    https://magicasoft.jp/en/release-note-2/
     
  38. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Update: 1.8.8

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

    You can now change the direction of gravity for each component.
    An API has also been added.
    Note that you specify the ceiling direction.
    gravity-1.jpg

    Release Note:
    Added: You can now change the direction of gravity.
    Improvement: The Collision [Keep Shape] option has been removed due to its many disadvantages.
    Fix: Fixed an issue where RenderDeformer would not display an error if there was a difference between the internal data and the current mesh data.

    https://magicasoft.jp/en/release-note-2/
     
    Acissathar likes this.
  39. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    @hoshos I'm having some difficulties for whatever reason trying to import Magica Cloth into a project. I've used the asset before no problems, but this one particular project isn't working out. I am getting the following errors after importing:



    Using:
    • Magica Cloth 1.8.8
    • Unity 2019.3.6f1
    • Burst 1.4.3
    • Jobs 0.2.9
    • Collections 0.8.0
    • Mathematics 1.1.0

    EDIT: Oh, I think I discovered something. The project has the IBM Watson SDK in it, and it has a class for Vector3Int for example, and Magica Cloth is reference that instead of the struct inside of UnityEngine.


    SOLVED: adding in
    using Vector3Int = UnityEngine.Vector3Int;
    after the namespace declaration fixed it.
     
    Last edited: Jan 19, 2021
  40. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    Vector3Int, like Vector3 and Color, is a standard Unity Engine value type.
    So there seems to be a problem with the IBM Watson SDK overriding these.
    Anyway, I was relieved to solve it.
     
    local306 likes this.
  41. bhavesh_unity3

    bhavesh_unity3

    Joined:
    Dec 29, 2020
    Posts:
    7
    Yes using double sided material
     
  42. bhavesh_unity3

    bhavesh_unity3

    Joined:
    Dec 29, 2020
    Posts:
    7
    How can scaled only cloth over the avatar?
    I am trying it but its was not fall down over the body.

    Untitled.png : With scale 1.
    Untitled1.png : with scale 1.2 Untitled.png Untitled1.png
     
  43. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.

    (1) Double Side material
    There is no problem if you are drawing on both sides of the material.
    If the front and back are represented by a close combination of two polygons, it is possible that the back side has popped out during the simulation process.
    In this case, you may be able to solve it by increasing the merge size of Virtual Deformer a little.

    (2) Clothes scaling
    I'm sorry, but could you please tell me in detail what kind of operation you performed?
    Did you set MagicaCloth on the human body of Untitled.png and set its root to x1.2?
     
  44. ChrisCoool

    ChrisCoool

    Joined:
    Jul 3, 2017
    Posts:
    14
    Hi!

    I update Migaica Cloth to version 1.8.6, however "Surface Penetration" seems to be invalid.

    First, when I am in play mode and open Cloth Monitor, the Penetration line doesn't show. Second, it looks like the penetration line doesn't involved in collision calculation.

    You can check the attached images.

    Thanks!
     

    Attached Files:

  45. bhavesh_unity3

    bhavesh_unity3

    Joined:
    Dec 29, 2020
    Posts:
    7
    Yes i have set magica cloth on tshirt and added magica collider on human bones.
    I am trying to do scaled cloth over human body for example trying X,XXL,L,SM,M sizes. So cloth will look like tight, loose etc.
     
  46. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Hello.
    I also experimented here, but it seems that there is no problem with the function of Surface Penetration.
    First, Surface Penetratoin limits the distance each particle can move from its original position.
    This is just a range of movement, with or without Collider.
    Therefore, each particle can move to the depth of the orange line in EditorMode.png.
    As far as PlayMode.png is seen, the particles seem to be within that limit, so it looks fine.

    Not seeing the Surface Penetration line in play mode was just a bug.
    This will be fixed in the near future.
     
  47. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    This is a difficult question, so I will answer it little by little.

    (1) Scaling
    First of all, you can't just scale the MagicaCloth mesh.
    Scaling to the character for which MagicaCloth is set up is supported only by uniform scaling of the entire character and minus scale of one axis.
    https://magicasoft.jp/en/runtimescaling-2/
    You probably can't do something like the image.

    (2) Performance of Magica Cloth
    And here's an important part, Magica Cloth isn't a very advanced Cloth simulation.
    For this reason, I am not good at Cloth simulation of the type that adheres to the body like a T-shirt.
    (The reason is that there is no mesh collider)
    Therefore, it seems to be a difficult matter to apply to a shirt like the image.
    I'm sorry, but please understand this point.
     
  48. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Update: 1.9.0

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

    Added support for Assembly Definition (.asmdef).
    For this reason, the directory structure has changed completely.
    If you are using an earlier version, please do a clean install.

    Release Note:
    Added: Added support for Assembly Definition (asmdef). As a result, the folder structure has changed significantly.
    Note: If you are already using MagicaCloth, please delete the old MagicaCloth folder and do a clean install.

    https://magicasoft.jp/en/release-note-2/
     
    Acissathar likes this.
  49. akihabarai965

    akihabarai965

    Joined:
    Oct 27, 2020
    Posts:
    6
    Is it possible to stop bone cloth individually from the script?
     
  50. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    807
    Yes!
    The Cloth component can be stopped and restarted by turning the component's enable flag on / off.