Search Unity

  1. 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

[RELEASED] Magica Cloth

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

  1. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Okay, I understand your point of view.
    I would like to consider whether it can be implemented.
    However, please note that this is a low priority.
    <Performance>
    The smaller the number of Virtual Deformers, the better the performance.
    Please consider whether it can work with one Virtual Deformer if possible.
    MagicaCloth can introduce multiple MeshCloth/MeshSpring into one Virtual Deformer.
    (However, please be aware that moving the same vertex with multiple Cloth components may cause unintended movement.)
     
    local306 likes this.
  2. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    MagicaCloth works fine with HDRP/URP.
    Performance is written by the Burst+Jobs system, so it's much faster than C#.
    (But note that the performance in the editor is lower than at build time)
    If you would like to test the evaluation version before purchasing, please contact us at the following email address.
    I will send you an evaluation version.

    support@magicasoft.jp
     
    DGordon likes this.
  3. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Update: 1.7.6

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

    Flip with minus scale is now possible.
    However, only one axis of xyz can be flipped.
    This is useful for 2D games etc.
    flip-1.jpg

    Release Note:
    Added: Added support for character minus scale (flip). However, only one xyz axis can be reversed.
    Added: Added negative scale sample scene.
    Improvement: The [Once per Frame] update option is now left forever.
    Improvement: Changed the minimum value of particle radius from 0.01 to 0.001.
    Fix: Fixed the problem that the normal/tangent recalculation of MeshSpring was not done correctly. Affects lighting.
    Fix: Fixed the problem that an error occurs when the execution is stopped in the editor.

    https://magicasoft.jp/en/release-note-2/
     
    local306 likes this.
  4. luffystrong

    luffystrong

    Joined:
    Jul 31, 2020
    Posts:
    2
    why not add a Create All Button?
     
  5. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    Actually, currently, [Create] process cannot be called from outside.
    This was due to a problem with the original design.
    We are currently investigating whether this issue can be improved.
    If it can be improved, it will be possible to call the [Create] process as a function from outside.
     
  6. Quang_Phan

    Quang_Phan

    Joined:
    Dec 28, 2016
    Posts:
    11
    You mean like Nvidia Apex cloth in UE4 right? That will be great if Magica cloth can do the same, cause I try add to my Hair Cards, it work but very heavy and lag if I drop more than 2 characters to scene.
     
  7. Zante

    Zante

    Joined:
    Mar 29, 2008
    Posts:
    405
    Can someone explain how this is different from Unity's existing cloth physics?
     
  8. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    Thank you for your interest.
    The differences with UnityCloth are as follows.

    (1) Transform-based cloth simulation is possible with BoneCloth. This is similar to Dynamic Bone.
    (2) With MeshCloth, you can combine multiple meshes into one virtual mesh for cloth simulation. This eliminates the need to modify the original mesh for simulation.
    (3) Virtual mesh can be reduced. Even if the original mesh is high polygon, the simulation can be performed with low polygon. This has the effect of reducing performance.
    (4) Time operation such as slow operation is possible.
    (5) Scale operations such as runtime scale and flip are possible.
    (6) Full source code is included.
     
    Alic, ObiOneStenobi and DragonSix like this.
  9. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Update: 1.8.0

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

    Added BoneCloth mesh connection mode.
    This will automatically mesh and connect from the bone structure.
    Since horizontal bones are connected to each other compared to the past, movement of skirts etc. due to bones becomes more natural and collision detection is also improved.
    boneskirt2-9.jpg


    Here is a guide to setting up your new BoneCloth.

    https://magicasoft.jp/en/boneclothskirtguide2/



    Release Note:
    Note: The data format has changed. Since the new function cannot be used with the past data, it is necessary to press the [Create] button again to recreate the data.
    Added: Added BoneCloth mesh connection method. This will automatically create a mesh from the bone connections. The movement of the skirt by the bone is improved.
    Added: It is now possible to turn on/off the entire cloth simulation by operating the enable of MagicaPhysicsManager.
    Improvement: Adjusted some preset parameters.
    Improvement: Improved collision detection.
    Improvement: The operation of Penetration has been improved.
    Fix: Fixed the problem at the time of negative scale (flip) of Penetration.

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

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    573
    I originally was going to ask about an issue I was seeing while jumping, but v1.8 seemed to have fixed the issue, so thank you for the update!

    One thing I'd like to ask is what parameters should I be looking at to make this less rigid I suppose would be the word? Basically the movement and how it handles is how I want it to be, it just feels like it moves very stiffly.



    The world influence max speed is set to 30, and here are the other parameters:
    upload_2020-9-3_16-27-46.png
     
  11. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    If you want to soften the movement, try adjusting the following parameters.

    [Gravity]
    By lowering the gravity, the cloth becomes loose.

    [Restore Distance]
    The tighter the particles are, the harder the cloth will be.
    It becomes softer by lowering the Stiffness.
    However, be careful that the cloth stretches if you lower it too much.

    [Restore Rotation]
    The force with which the cloth returns to its original shape.
    Lowering the Stiffness will allow the cloth to return slowly.

    Also, I'm curious, is this character moved by FixedUpdate() instead of Update()?
    I was worried about the vibration of the cloth.
     
  12. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    573
    Yes, it's currently root motion during FixedUpdate. I have the physics manager set to 90_Default + Unscaled Time, would there be a better combination? And I will check out those parameters, thanks!
     
  13. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    There is no problem in the setting.
    Since MagicaCloth expects movement/animation in normal Update(), vibration may occur in FixedUpdate() like a movie.
    This is because FixedUpdate() is updated at a different timing than Update().
    We will work hard to resolve this issue, so please be patient.
     
  14. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    573
    No worries, when on the ground and running / walking, it looks smooth (to me at least), it's only an issue when falling / jumping that I've noticed with regards to the cloth, but I'll play around with the settings you mentioned earlier and see what I can come up with.
     
    hoshos likes this.
  15. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,058
    Hi,

    I am loving your asset so far for my other games. It really is an excellent asset. I would like to ask for your input/advice on my next project, I am making a Paraglider simulator, and the wing should be flexible/bending, and inflated.

    Can I achieve this inflated/flexible behaviour with magica cloth? I suspect yes with the MeshCloth.

    My game so far:

    Sample of how I'd like wing to flex:


    Thanks for any tips on this.
     
  16. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    This is not a very intended use, so please forgive me if it doesn't work.
    Probably the swaying thing is the wings of humans and paragliders.
    So I defined the human sway and the wing sway separately and tried a little test.
    Please look at the image.
    The parent-child structure of Transform is simply humans hanging from the center to the bottom of the wings.
    And the wings extend from the center to the left and right.
    If you set BoneCloth for each and move it, it will look like a Gif.
    If it shakes a little, adjust it with Clamp Rotation, Drag, World Influence, etc.
    I tried to make it somehow, but I hope it will be a hint.

    paraglider-1.jpg

    paraglider-2.jpg

    paraglider-3.gif
     
    khos likes this.
  17. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
  18. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,168
    I've been considering this for a while, but I have a couple of questions:

    1) Does this work with Unity's new Freeform Animation Rigging package? (i.e. I want to make custom animations that react to the gameplay state dynamically, but I'd like to use your system to handle the "bouncy" secondary animation.)

    2) How fast can it be setup on a new character? -- (I didn't see any video tutorials showing the process/workflow on the asset store and I've read that it is tedious to setup due to a lack of weight painting on some of the reviews, so I was just looking for a few details on this.)
     
  19. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    I'm glad you're interested.

    (1) Animation Rigging
    It's speculation because I haven't tested it, but basically it should work fine.
    However, there is no confirmation.

    (2) Setup
    The setup is a little more than other assets (Dynamic Bone).
    However, once you get used to it, you will be able to set it up fairly quickly.
    As you pointed out, there is a problem that it is difficult to paint vertices now.
    This will be resolved in the future.

    <Manual>
    https://magicasoft.jp/en/magica-cloth-install-2/
    First, import the package according to the [Installation Guide].
    Then read the [System Overview] and proceed with the [Setup Guide] for a better understanding.


    After all, I think that you will not understand well unless you actually touch it, so I will put an evaluation version in your [InBox].
    Feel free to test it.
     
    awesomedata likes this.
  20. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,058
    Hi,
    Thank you for your great help, with some initial setup I ave been able to setup a wing, see demo video:

    It works quite nice for a first attempt!
    What I would like to ask is when setting the vertex/move points (Start Point Selection) on mesh to be either fixed, invalid or move, can you set fixed but still have those move (but with high drag?)? Or can I set the drag option per vertex/particle/point? I want to be able to make some areas of the wing more flexible than other areas.
    Thanks or any advice on this topic.
     
  21. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Oh, great!
    I wasn't thinking about how to use it like this, so I'm happy to realize it!

    The control of fixed points and moving points of MagicaCloth is unique, so I would like to explain a little.
    First of all, a fixed point is required when setting cloth.
    Therefore, it cannot consist of all moving points.
    For example, even in the case of the following cloth, a fixed point is always required.
    In this example, the top line is fixed.

    paraglider-3.jpg

    When you create the data, a line called [Rotation Line] is automatically created from the fixed point to the end moving point.
    This can be confirmed by checking the [Rotation Line] of Cloth Monitor.

    paraglider-4.jpg

    [Depth] is automatically set from 0.0 to 1.0 from the start point to the end point of this [Rotation Line].
    This depth can be confirmed by checking [Particle Depth] of Cloth Monitor as follows.

    paraglider-5.jpg

    The straight line / curve for each parameter is then mapped to this depth of 0.0-1.0.
    For example, if the [Mass] setting is as follows, the start point (Depth:0.0) will be 10 and the end (Depth:1.0) will be 1.0, and the curve value will be set according to each [Depth] value.

    param2.jpg

    I hope this explanation helps.
     
    khos likes this.
  22. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,058
    Many thanks for your detailed info, if I understand correctly I could use the curve for each parameter, e.g. drag to try control some of the movement to make some points looks like they are fixed (but move a a little), I have to experiment with that :)
     
    hoshos likes this.
  23. zhongchongfeng

    zhongchongfeng

    Joined:
    Jul 13, 2014
    Posts:
    1
    Hi,
    • Unity2018.4.0(LTS) or higher
    • Project Settings [IL2CPP][.NET4x][Allow ‘unsafe’ Code]
    • [Burst] package
    • [Jobs] package(preview)
    • [Collections] package(preview)
    • [Mathematics] package

    Both Jobs package and Collections package are preview packages, But Unity Documentation Said :

    upload_2020-9-18_16-36-15.png

    Can I use it safely.
     
  24. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    [Jobs] is the only preview package used by MagicaCloth.
    This is speculation, but the [Jobs] package has various features required for DOTS (Data-Oriented Technology Stack).
    Jobs is a very important package for building ECS (Entity Component System).
    Therefore, it is unlikely that the [Jobs] package will be deprecated in the future.
    I think it's okay to use it.
    (However, I think you should use the latest version of Unity as much as possible)
     
  25. davedev

    davedev

    Joined:
    Jan 12, 2009
    Posts:
    66
    I'm having an issue with Unity 2020.1 and "Upgrade Project Materials to RP Materials". The materials don't convert and I get numerous errors such as:
     
  26. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Sorry.
    The shader used by UnityChan does not currently support URP / HDRP.
    Since UnityChan is a model included as a sample, you can safely ignore this error.
    If the Unity Chan sample works with URP / HDRP, sorry to trouble you, but you need to recreate the material.
    Please understand that this error has nothing to do with the performance of Magica Cloth.
    MagicaCloth works fine in URP / HDRP environments.
     
  27. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,031
    @hoshos
    Good morning. Hows the cloth grabbing coming? :)
     
  28. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    Sorry I made you wait.
    I finally start developing a cloth grab.
    It will probably be completed within a month, so please be patient.
    (If there is no trouble)
     
  29. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Update: 1.8.1

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

    This time it's almost a bug fix.

    Release Note:
    Improvement: BoneCloth's Mesh connection has been changed to create Rotatin Line from the Transform hierarchy.
    Improvement: Tweaked collision detection.
    Fix: Fixed an issue that caused an error when the timescale was 0.
    Fix: Fixed an issue where initialization would fail if multiple components were attached to a GameObject.
    Fix: Fixed an issue that caused an error when disabled while running Penetration's connection collider.

    https://magicasoft.jp/en/release-note-2/
     
  30. MoYing

    MoYing

    Joined:
    Dec 24, 2013
    Posts:
    7
    hello,The skirt model start point selection is normal, aaa.png and the vertices of the model are greatly offset after running, and deviate from the original vertex position. Finding documents and testing for a long time, what is the reason?Looking forward to your reply
    aaaa.png ab.png
     
  31. dongliang28

    dongliang28

    Joined:
    Oct 3, 2010
    Posts:
    177
    Hi,i have a question about your Magica Cloth before i buy it.
    does the virtual deformer support custom mesh?
    my cloth is double side mesh with some small item parts attached on it.
    i don't think the auto mesh reduction in the virtual deformer will do a good job on my model.
     
  32. mbhagat

    mbhagat

    Joined:
    Dec 15, 2013
    Posts:
    28
    Throwing something around 651 errors after import through package manager ?
    What to do now ?
    upload_2020-9-22_17-23-7.png
     

    Attached Files:

  33. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    98
    install Mathematics from package manager
     
    hoshos likes this.
  34. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    We apologize for any inconvenience.
    This may be due to an unknown defect.
    Perhaps something went wrong with the Virtual Deformer reduction algorithm.
    I can't confirm it, but it may be solved by increasing the connection vertex distance of Virtual Deformer a little.
    It will be the red part of the image.
    Wouldn't it be improved by changing this a little and recreating the data of Virtual Deformer / MeshCloth?
    (It is recommended to back up the project before testing)
    deformer10.jpg
     
  35. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    Virtual Deformer reduces the original mesh shape as much as possible, but it is not perfect.
    Therefore, the shape of the model can cause problems.
    Therefore, I would like to give you an evaluation version to test them.
    Send the download link to your [InBox].
    We would appreciate it if you could test with this evaluation version.
     
  36. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    MagicaCloth requires four packages: [Jobs] [Mathematics] [Collections] [Burst].
    Check the version of Unity you are using, and then follow the installation guide below to install the package.

    https://magicasoft.jp/en/magica-cloth-install-2/
     
  37. dongliang28

    dongliang28

    Joined:
    Oct 3, 2010
    Posts:
    177
    Thank you so much!
    i will do some test with it and let you know the result a few days later!

    Btw,i bought the plugin.
    no matter it fits my project or not,it's a good plugin with a good developer.

    Edited:
    I figured out the bone type cloth could do the job for me.
    thank you for this amazing plugin!
     
    Last edited: Sep 25, 2020
  38. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    30

    Hi hoshos! Are there any changes about unity regular colliders?
     
    khos likes this.
  39. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    We haven't started development yet.
    Currently, we have begun to develop a function to grab the cloth.
    Perhaps next is the improvement of vertex paint.
    Therefore, even if it is implemented, it will be a long way off.
    I'm sorry to disappoint you, but please understand.
     
    Hobodi likes this.
  40. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    64
    First of all - thanks for this amazing asset. I find it very useful and predictable, although the initial setup is a little bit complex.

    If it makes a difference - I am really excited about improvements to the painting of the vertices. It would be awesome if we could have different options such as manual painting, weights from textures, and so on.

    Keep up the great work guys!
     
  41. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Thank you for using it.
    Vertex paint will be improved.
    It will take some time due to a major renovation, but please wait for a while.
     
  42. unity_J5-NwkNpFGvDew

    unity_J5-NwkNpFGvDew

    Joined:
    Mar 23, 2018
    Posts:
    1
    Hi, I´m intereted in buying this pluggin, some quick questions:
    - Does it works with Humanoid?
    - Is this plugin compatible with 2020 versions?
     
  43. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    I don't understand the definition of humanoid a little, but I think it's okay because MagicaCloth works with Skinned Mesh.
    Yes, MagicaCloth works fine with Unity 2020.
     
  44. ChigaSho

    ChigaSho

    Joined:
    Jul 10, 2020
    Posts:
    1
    Hello!
    I recently started using [Magica cloth]!
    I think it's a very nice product.

    But I just have one question!
    I'm running the model that [Magica cloth] is adapting with rigidbody velocity.
    However, if you move [Magica cloth] with rigidbody velocity, everything to which [Magica cloth] is applied becomes funny.

    The shaking is too much.

    But if you move it with a transformer, such a funny thing doesn't happen.

    Is this a specification?
    Sorry for your busy schedule, but I would be happy to answer any questions you may have.

    Translated with www.DeepL.com/Translator (free version)
     
  45. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    205
    Hello.
    As you pointed out, moving or animating with FixedUpdate does not work.
    I know the cause of this, but I haven't fixed it yet.
    This fix is not easy and requires a complex fix.
    Currently, we are in the process of trial and error to see if we can manage to integrate stably.
    I'd like to solve this problem somehow, so please wait for a while.
     
  46. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    274
    I get Nan errors in the bone cloth when I use Q-costume to combine the mesh.

    upload_2020-10-15_11-44-12.png

    This causes the lab coat to lose it's form when combined.

    upload_2020-10-15_11-47-3.png

    But it's fine if it's just the prefab. I can't seem to find any way to get the bones to work properly...

    i've considered using Magica Avatar but that would require a significant change in my game, and i really like Q-costumes features.

    EDIT:
    There is a similar issue with mesh cloth
    upload_2020-10-15_12-9-46.png

    I guess it doesn't recognize the mesh for some reason?

    Please help!
     
    Last edited: Oct 15, 2020
  47. siumanchun

    siumanchun

    Joined:
    Apr 7, 2013
    Posts:
    37
    Hi ! Please Help !

    Unity 2019_4_0 Import Magica Cloth 1.6.1 is Not Error .

    why , Unity 2019_4_0 Import Magica Cloth 1.8.1 is Two Error !

    Error 1 !
    Assets\MagicaCloth\Core\Utility\NativeCollection\ExNativeMultiHashMap.cs(56,43): error CS1061: 'NativeMultiHashMap<TKey, TValue>' does not contain a definition for 'Count' and no accessible extension method 'Count' accepting a first argument of type 'NativeMultiHashMap<TKey, TValue>' could be found (are you missing a using directive or an assembly reference?)

    Error 2 !
    Assets\MagicaCloth\Core\Utility\NativeCollection\ExNativeHashMap.cs(52,38): error CS1061: 'NativeHashMap<TKey, TValue>' does not contain a definition for 'Count' and no accessible extension method 'Count' accepting a first argument of type 'NativeHashMap<TKey, TValue>' could be found (are you missing a using directive or an assembly reference?)

    Thank You
     
  48. themightyx

    themightyx

    Joined:
    Nov 25, 2014
    Posts:
    3
    Hello,
    I've emailed you, but I'm posting here in case it helps another developer in the future.
    This is a great system and very very lightweight, but the mesh reduction system could use some optimization I think.

    I'm getting unexpected results from Mesh Reduction (Virtual Deformer component).
    As you can see, the proxy mesh does not follow the original mesh:
    DeformedMesh.JPG

    There is large and unexpected deviation from original mesh:
    unwantedGeometry.JPG

    The original mesh is normal:
    OriginalMesh.JPG

    All Reduction settings set to 0: ReductionSettings.JPG

    I believe this also causes random parent-child chain links on Mesh Cloth:
    RandomChildParent.JPG

    Why not just have a bool "Use Original mesh as Proxy mesh" and when true have
    Code (CSharp):
    1. MeshData GetFinalData(Transform root, bool orig){
    2.       if(orig){
    3.             final.vertices.AddRange(SkinnedMeshRenderer.sharedMesh.vertices);
    4.       }else{
    5.       for(int i = 0; i < shareVertexList.Count; i++)
    6.             {etc}
    7.       }
    8. (
    For PC and small scenes this is no problem.
    Due to these strange results we currently cannot use this system, as the base mesh wants to follow the (badly deformed) proxy mesh shape.
     
  49. themightyx

    themightyx

    Joined:
    Nov 25, 2014
    Posts:
    3
    Works fine on Unity 2020.1+
    You should be able to update your project without breaking anything.
    But to be safe; duplicate project folder and rename for backup.
     
  50. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    274
    I had the same issue, you're either missing burst compiler or jobs in the package manager.
     
unityunity