Search Unity

[RELEASED] Magica Cloth

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

  1. AngelGalaxyOfficial

    AngelGalaxyOfficial

    Joined:
    Apr 10, 2021
    Posts:
    16
    Hi there,

    I am using an imported character from Character Creator 4. I am using Magica Cloth v1.2.10 and using MeshCloth for the Skinned Mesh Renderer hair. (Your official guide)

    However, after using the 'Start Point Selection' tool and setting it up to where I want points to be fixed and others to move, then test the game. This happens:



    Points that are set to move are stretched while others aren't. How can I fix this? Thank you. (For testing purposes, I only set a few points on the hair to 'Move'. Those are the ones stretched out while the rest are fixed points. Hence why the rest of the hair isn't stretched!)
     
  2. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    This may be a forget to paint the movement point.
    For example, two vertices overlap and one is not painted well.
    But this image alone doesn't tell us the details of the problem.

    First check if vertex reduction is appropriate.
    https://magicasoft.jp/en/magica-cloth-virtual-deformer-2/
    MagicaCloth creates a mesh for simulation by reducing the vertices of the mesh for drawing.
    Simulation problems can occur if the resolution of the simulation mesh is too high.
    Try increasing this value slightly to reduce the resolution of the simulation mesh.
    This may solve the problem by merging two overlapping vertices.
     
    Whatever560 likes this.
  3. AngelGalaxyOfficial

    AngelGalaxyOfficial

    Joined:
    Apr 10, 2021
    Posts:
    16
    Hi there, I tried messing with that quite a bit and a few other settings but the same issue happens. Move Points in the hair cause it to stretch out like the following:

     
  4. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    I see.
    I still don't quite understand the cause.
    Can I get a project that has this problem?
    If you have a project, you can find out why here.
    If possible, could you send it to my support email or my [In Box]?
    mail: support@magicasoft.jp
     
  5. AngelGalaxyOfficial

    AngelGalaxyOfficial

    Joined:
    Apr 10, 2021
    Posts:
    16
    Hi there, I created a fresh project in order to send to your email and it magically works but only in the new project. I have no idea why... I'll try to figure this out.. :(
     
  6. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Sorry for the inconvenience.
    It appears to be a very unrepeatable glitch.
    If you have a procedure or project that causes it, please let us know.
     
  7. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Hello, I use DAZ characters with a lot of Blendshapes (so player can customize them runtime). Is there a plan to bring blendshapes support?
     
  8. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Unfortunately there are no plans to support blendshapes.
    Because MagicaCloth deforms vertices, it conflicts with the blend shape function.
    Therefore, MagicaCloth does not support blend shapes.

    However, it may coexist with some blendshapes.
    For example, it may be possible to use it in combination with a blend shape that changes the body shape.
    However, as mentioned above, since the functions are competing, it is impossible to predict what the result will be without actually testing it.
    Sometimes they can work well together.
     
  9. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    223
    Can you maybe share some presets? I love this asset but there is so much customization and nothing seems to make my characters hair “loose” and I just want her hair to move like the dancing girl’s purple hair in the second video of your asset page in the unity asset store website.
    My characters hair moves when she jumps and runs but it is still a bit stiff.

    also, is magicaCloth resource heavy? How much of this can I use per scene?
     
  10. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Sorry it is not possible to supply a preset that meets your request.
    The presets are just a guideline for movement.
    Therefore, it is essential for the user to adjust the parameters themselves in order to achieve a satisfactory movement.
    We already have many variations available as default presets.
    It's a good idea to test them one by one and adjust the preset that works closer to your ideal.
    By the way, [DynamicBoneStyle_PonyHair] should be the closest for purple hair movement.
    https://magicasoft.jp/en/magica-cloth-preset-2/

    Regarding the stiff movement problem, I haven't seen the actual movement, so it's difficult to give precise advice, but please try the following.

    (1) Loosen the spring
    By lowering the Restore Power of the Restore Rotation parameter, it will move slowly.
    If you have long hair, it is a good idea to use curves and lower the value further toward the ends.
    https://magicasoft.jp/en/paramater-restore-rotation-2/

    (2) Lower gravity
    Strong gravity can pull particles to the ground and restrict their movement.
    If the gravity is strong, try lowering it.
    In some cases, it is effective to set the gravity to 0.
    https://magicasoft.jp/en/paramater-gravity-2/

    (3) Increase air resistance
    Increasing the Drag parameter increases air resistance.
    As the resistance increases, the particles move more slowly.
    https://magicasoft.jp/en/paramater-drag-2/

    Finally, regarding the performance of MagicaCloth.
    MagicaCloth has MeshCloth and BoneCloth, but MeshCloth is quite heavy.
    So if you are planning to use it on mobile devices, you may experience performance issues.
    The weight of MeshCloth is completely proportional to the number of vertices.
    Therefore, there will be no problem when using it for meshes that do not have many vertices.
    Also performance is completely CPU dependent.
    GPU is irrelevant.
    And the more cores the CPU has, the better the performance.
    Please pay attention to this point.
    Don't forget to measure your performance with a profiler to catch any problems before they happen.
    All loads can be seen in Profiler.
     
  11. spicerack

    spicerack

    Joined:
    Oct 4, 2014
    Posts:
    1
    Is it possible to record / log MagicaCloth bone movements using a script, and import the log data as an animation?

    This will help improve performance and reduce need for experimental unity packages.
     
  12. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Unfortunately, it is not possible with the function of MagicaCloth.
    However, BoneCloth only moves and rotates each Transform.
    Therefore, it is technically possible to record and replay Transform movements.
    You can write scripts and make your own, or there may already be such assets in the Asset Store.
     
  13. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
    Hi. Any progress on this issue? Unity's latest networking library (Unity Transport) depends on Collections 2.x, so Magica Cloth cannot be used with these libraries ...
     
  14. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    2.x of the Collections package was still in the experimental stage and pending support.
    However, if Unity Transport is already using 2.x, I would like to respond as soon as possible.
    I'm currently having a Black Friday sale, so I'll update when the sale is over.
    It will probably be in the middle of next month.
     
    Kichang-Kim likes this.
  15. kiksunitydev

    kiksunitydev

    Joined:
    Mar 18, 2021
    Posts:
    9
    Is there any way to do moving cloth with mouse interaction,

     
  16. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Unfortunately this feature doesn't exist.
     
  17. AetherMFP

    AetherMFP

    Joined:
    Feb 11, 2022
    Posts:
    39
    Any updates to support the new release of Unity 2022.2? with the Hybrid Renderer (MagicaCloth breaks) when importing Hybrid renderer with newer packages.
     
  18. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
  19. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    It's probably a problem with the Collections2.x package available in Unity2022.2.
    This problem has been resolved in ver1.12.11, which was released earlier, so please test again with the latest version.
     
  20. dumpstertree

    dumpstertree

    Joined:
    Mar 29, 2016
    Posts:
    2
    Im trying to build and setup my MagicaCloth components at runtime. Is there currently any way to set Points to be "Move" or "Fixed" though code?
     
  21. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Sorry, currently it is not possible to build data at runtime.
    This is because the entire data building process is written as UnityEditor code.
    This is why it is not available at build time.

    However, we have received this request from many people.
    Therefore, Ver. 2.0, which is currently under development, will officially support runtime builds.
    Ver2.0 will provide the ability to build data in a background thread while the game is running.
    Therefore, it will not interfere with the progress of the game.
    Ver2.0 will be released soon.
     
    hopeful likes this.
  22. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    Hi, a question: besides v2, are there currently any examples of magica cloth v1 performing collision between 2 layer of cloths?

    For example, imagine the dress of Elsa from Frozen, she has an inner dress and another long cape, what's the best way to avoid these 2 cloth overlapping each other during animations?

    Screen Shot 2022-12-29 at 9.37.37.png
     
  23. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Unfortunately, in Ver1 there is no way to resolve such crossings of dresses.
    The only thing is to use BoneCloth instead of MeshCloth.
    And it is to place and move the bones with two capes as one cape.
    This means that the two capes become one.
    There is currently no other workaround.
     
    bitinn likes this.
  24. Hummy91

    Hummy91

    Joined:
    Jun 7, 2017
    Posts:
    67
    Are there any plans for working collision between bone springs and other objects? Using either Unity colliders or magica ones.
     
  25. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Unfortunately, BoneSpring/MeshSpring currently cannot have collision detection.
    I tried implementing this once, but it didn't work very well, so I discarded it.
    (Probably requires special calculations for elasticity)
    However, since similar requests have been received regarding this matter, I will try to experiment again after looking at the time.
    However, I am currently working on MagicaClolth Ver2.
    So even if it is implemented, it may take a while.
     
    Hummy91 likes this.
  26. revolabstaff

    revolabstaff

    Joined:
    Jan 20, 2023
    Posts:
    1
    Hello @hoshos ,
    Is there a way to get the current position of a vertex/particle at runtime?
    We need this to attach an object to the cloth

    Thanks in advanced
     
  27. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    You can get it, but it's difficult.
    With MagicaCloth, the simulation particle positions and the actual displayed mesh vertex positions are different.
    This is because the simulation is run on a virtual mesh with reduced mesh vertices.
    Therefore, the acquisition process is different for both.
    Which do you want?
     
  28. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Announcement

    Hello everyone!
    I am happy to share this news with you today.
    MagicaCloth2 is coming soon.
    It will be reborn as a completely new asset with improvements to Version 1.x.
    By optimizing the system, all components are integrated into one, and that annoying pre-build (Create button) is no longer necessary.
    It does not store sub-assets in prefabs as it does not have construction data.
    New collision features such as edge collision and backstop are also added.

    Unfortunately, it is not compatible with Ver1.x.
    Also, since it is an upgrade asset, even if you have Ver1.x, a small upgrade fee will be charged.
    We have also separated the forums from this.
    Find out more in our new dedicated forum!

    https://forum.unity.com/threads/coming-soon-magicacloth2-hybrid-cloth-simulation.1395865/

    This forum will continue to be used as support for Version1.x.
     
    my_little_kafka and Hummy91 like this.
  29. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Announcement

    Hello everyone!
    MagicaCloth2 has been released!
    We are currently running two discounts

    1. 80% OFF for users who have Ver1
    2. 50% off for new purchases (until 2/25)

    Asset Store Link

    V2 is not compatible with V1.
    That's why we've separated the forums.
    Please use the following page for topics and questions about V2.

    https://forum.unity.com/threads/released-magicacloth2-hybrid-cloth-simulation.1395865/

    V1 is still used by many users, so it will be on the Asset Store for a while.
    However, V1 will not add any functions other than bug fixes in the future.
    Please understand this point.

    This forum will continue to be used for Ver1.x support.
     
  30. AdrielCodeops

    AdrielCodeops

    Joined:
    Jul 25, 2017
    Posts:
    54
    Hi, I am a v1 owner, how can I access the 80% account? Thanks for your amazing work, I'm really looking forward to try the new version :D
     
  31. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Simply access the asset store with an account that already has Ver1.
    You should see an 80% discount.
     
    AdrielCodeops likes this.
  32. ScorpioGamer

    ScorpioGamer

    Joined:
    Oct 14, 2012
    Posts:
    9
    Hi,

    The Unity build(.exe) crashed in my system when i upgraded the Unity Editor from 2021.3.5f1 to 2021.3.18f1 with Magica cloth(original) version, which used to work fine in the 2021.3.5f1.
    I ran the same build in another system and it worked. The build only works if i disable the Magica cloth in my system.

    Solutions tried:
    - Deleting the Magica cloth package and reimporting.
    - Upgrading to Magica cloth 2

    Even after upgrading to Magica cloth 2 with 2021.3.18f1 the build still crashes in my system and runs fine in another system.

    System Specifications:
    Processor AMD FX(tm)-8350 Eight-Core Processor 4.00 GHz
    NVIDIA GeForce GTX 980TI
    Installed RAM 16.0 GB
    System type 64-bit operating system, x64-based processor
    Edition Windows 10 Pro
    OS build 19045.2486
     
  33. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello!
    Thank you for your inquiry.
    Let me sort things out first.

    (1) Problems with MagicaCloth1?
    The explanation also mentions Ver2, but does the crash occur only in Ver1?
    So Ver2 is irrelevant?

    (2) MagicaCloth version
    Could you tell me the version of MagicaClothV1 at the time of the crash?

    (3) Are you using the Master build?
    I currently have an issue where doing a Master build on Windows causes it to crash.
    This is detailed at the bottom of the next page.

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

    Does this issue apply to you?
     
  34. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Magica Cloth 2 and VRoid Studio (VRM) character questions (and successes!).
    • I took a VRoid Studio VRM character (with UniVRM), disabled the VRM Spring Bones and added Magica Cloth 2 with "Bone Cloth" and it just worked! Very nice! (I have not done all the collision stuff yet, I started only with hair and not skirt etc, but so far it has worked really well.)
    • A challenge however (which might not be important). I was trying to use Mesh Cloth mode for the clothes. The problem I hit was the SkinnedMeshRenderer has all of the body layers in it - the body skin, shoes, pants, top clothing, etc. So when I added it, it was very hard to say "just do the outer layer of clothes and not the skin under it". I found it very hard to paint this because the clothes and skin are very close together. (Note: the clothes all have bones for skirts etc, so I will probably just stick with bone cloth.)
    • I assume to get different settings for different parts of the hair etc. I should add multiple components - e.g. one for the fringe and one for long hair at the back of the head. If I understand, the presets are per component, so I should add different bones to different components so I can give them different settings? (This is what VRoid does with VRM Spring Bone too - creates lots of different components controlling different hairs.)
    • Is there any wind support? There is one for VRM Spring bones https://github.com/malaybaku/WindForVRM, just wondering how to do something similar with Magica Cloth 2.
    Thank you!
     
  35. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello!
    This forum is for MagicaClothV1.
    Therefore, we are very sorry, but please post your questions for Ver2 in the following dedicated forum.
    https://forum.unity.com/threads/released-magicacloth2-hybrid-cloth-simulation.1395865/

    You may simply copy the text.
    V2 topics can only be answered in the V2 forum.
    Thank you for your cooperation.
     
    akent99 likes this.
  36. Faisal_Azizi_

    Faisal_Azizi_

    Joined:
    Feb 5, 2021
    Posts:
    25
    Is there a way to add root bones using code to the MagicaBoneCloth? i am struggling to make it work
     
  37. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Unfortunately, Ver1.x does not allow external registration of root bones.
    It is available in Ver2.
     
  38. Faisal_Azizi_

    Faisal_Azizi_

    Joined:
    Feb 5, 2021
    Posts:
    25
    I
    I got V2 and can confirm it works flawlessly. Thank you!
     
    hoshos likes this.
  39. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
  40. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    Thanks for the report!
    The name of the native collection was changed in Collections2, but that seems to be back again in 2.1.0.pre11.
    We will release a corresponding version soon, so please wait a bit until then.
     
    nucleusprime and Kichang-Kim like this.
  41. Bowie-Xu

    Bowie-Xu

    Joined:
    Sep 14, 2011
    Posts:
    28
    Hi, I just bought Magica Cloth 2 and using Unity 2021.3.20f1. When I switch the render pipeline from the build-in render pipeline to URP, all Example scenes turn pink. It seems there are two major shaders 'MC2_Common_Lit_Back' and 'MC2_Common_Lit_Front' can't get converted into URP. What should I do about this situation?

    Thanks in advance.
     
  42. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    MagicaCloth2 samples are available for all Build-in/URP/HDRP.
    The samples are divided into folders for each render pipeline, so please try loading sample scenes from the appropriate pipeline's folder.

    mc2_install-1.jpg

    Also, we apologize for the inconvenience, but please post your questions about MagicaCloth2 in the following public forum.
    Ver1 and Ver2 have separate forums.
    https://forum.unity.com/threads/released-magicacloth2-hybrid-cloth-simulation.1395865/
     
  43. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    223
    what does this error mean:

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <88e4733ac7bc4ae1b496735e6b83bbd3>:0)
    MagicaReductionMesh.MeshData.CalcMeshWorldPositionNormalTangent (System.Boolean isSkinning, UnityEngine.Mesh mesh, System.Collections.Generic.List`1[T] bones, UnityEngine.Matrix4x4[] bindPoseList, UnityEngine.BoneWeight[] boneWeightList, System.Collections.Generic.List`1[UnityEngine.Vector3]& wposList, System.Collections.Generic.List`1[UnityEngine.Vector3]& wnorList, System.Collections.Generic.List`1[UnityEngine.Vector4]& wtanList) (at Assets/MagicaCloth/Scripts/ReductionMesh/Data/MeshData.cs:2664)
    MagicaReductionMesh.MeshData.AddMesh (System.Boolean isSkinning, UnityEngine.Mesh mesh, System.Collections.Generic.List`1[T] bones, UnityEngine.Matrix4x4[] bindPoseList, UnityEngine.BoneWeight[] boneWeightList) (at Assets/MagicaCloth/Scripts/ReductionMesh/Data/MeshData.cs:1098)
    MagicaReductionMesh.ReductionMesh.AddMesh (System.Boolean isSkinning, UnityEngine.Mesh mesh, System.Collections.Generic.List`1[T] bones, UnityEngine.Matrix4x4[] bindPoseList, UnityEngine.BoneWeight[] boneWeightList) (at Assets/MagicaCloth/Scripts/ReductionMesh/Core/ReductionMesh.cs:85)
    MagicaCloth.BuildManager.CreateVirtualDeformer (MagicaCloth.CoreComponent core, UnityEditor.SerializedObject serializedObject, System.String savePrefabPath) (at Assets/MagicaCloth/Scripts/Editor/Build/BuildCloth.cs:1019)
    MagicaCloth.BuildManager.CreateComponent (MagicaCloth.CoreComponent core) (at Assets/MagicaCloth/Scripts/Editor/Build/BuildManager.cs:96)
    MagicaCloth.MagicaVirtualDeformerInspector.OnInspectorGUI () (at Assets/MagicaCloth/Scripts/Editor/Deformer/MagicaVirtualDeformerInspector.cs:46)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <cd89fd1ce037419f95985196f5aeee4d>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  44. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    After investigation, it is highly likely that the corresponding mesh is broken.
    This happens when there are no bones to use for vertex skinning.
    This should not normally occur with a healthy mesh.
    Do you have any concerns?
    Was this mesh output by some special tool?
     
  45. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    223

    it has bones and a skinned mesh renderer. its a synty mesh.
     
  46. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    What is "synty mesh"?
    Could you please elaborate a little more?
     
  47. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    223
    Its honestly not different from any other mesh i used with magica. Synty is the popular asset packages from the asset store.
     
  48. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    I see, I understand the situation.
    Is it possible to borrow the FBX of the character that causes the error?
    You can check the details of the error by inspecting the FBX.
    You don't need materials, textures or animation data as you just look at the mesh.
    If possible, could you send me a "Start a Conversation" from my account?
     
  49. mchung123

    mchung123

    Joined:
    Jul 4, 2017
    Posts:
    38
    Is there a way to grab hair using magica cloth 2 or 1, or any influence any bone cloth components?
     
  50. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    922
    Hello.
    There is no grab function yet.
    However, it is registered in the Ver2 roadmap.
    https://magicasoft.jp/en/mc2_roadmap/

    Grabbing function is scheduled to be implemented in Ver2.
     
    kiksunitydev and mchung123 like this.