Search Unity

[RELEASED] MagicaCloth2 - Hybrid Cloth Simulation

Discussion in 'Assets and Asset Store' started by hoshos, Feb 5, 2023.

  1. thmapn

    thmapn

    Joined:
    Jul 8, 2022
    Posts:
    1
    Hi Hoshos, thank you for the plugin; it's really promising. I have a question, I'm making a mobile multiplayer game and thinking about integrating the magica clothes 2 for the character clothes and hair, but since we don't have the LOD for now, do you have any plan for mobile optimization?
     
  2. Ignacii

    Ignacii

    Joined:
    May 23, 2013
    Posts:
    107
    Good evening. Is Magica Cloth 1 going to be deprecated or it will stay and be updated? Because I tried a bit the MC2 and tried to replace MC1 in my project but it didn't work out. I could just have done something wrong, but to me it feels that MC1 was more complicated but had slightly more features because of that. Arigatou gozaimasu!
     
  3. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    Unfortunately there is no support for LODGroups yet.
    However, we understand that this feature is important.
    As such, LOD support has already been added to our roadmap.

    https://magicasoft.jp/en/mc2_roadmap/

    However, we will not know whether it can actually be implemented or not until we experiment, so please understand this point.
     
  4. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    Yes, version 1 is deprecated and will probably be removed from the asset store after a year.
    Therefore, Ver1 will not be updated except for bug fixes in the future.

    In Ver2, the parameters have been greatly reduced and simplified.
    This is in response to many end-user complaints that there are too many parameters and are difficult to configure.
    However, the internal algorithm is almost the same as Ver1.
    Therefore, if you adjust the parameters in Ver2, you should be able to reproduce the same movement as in Ver1.
    (although it's not exactly the same)
     
    Ignacii likes this.
  5. Bwacky

    Bwacky

    Joined:
    Nov 2, 2016
    Posts:
    208
    Hello, has anyone ever tried integrating Magica Cloth 2 with UMA-generated characters (adding MC2 to the hairs) and had successful results?
     
  6. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Update:2.1.3

    v2.1.3 has been released on the Asset Store!
    https://u3d.as/2Zc3

    Fixed some serious bugs.
    We also prepared a document about scaling changes.
    https://magicasoft.jp/en/mc2_runtime_scaling/

    Release Note:
    Fix: Fixed an issue where Transform specified as an invalid attribute in BoneCloth was not completely invalidated and some functions were working.
    Fix: Fixed the problem that the calculation becomes NaN and the display mesh is broken when the normal and tangent of MeshCloth's original render mesh are completely in the same direction or in the opposite direction.
    Fix: Fixed an issue that caused an error when calculating MeshCloth's vertex weights.
    Fix: Fixed an issue where changing the character scale at runtime would break the display mesh.
    https://magicasoft.jp/en/mc2_releasenote/

    How to Update
    Please follow the following steps to update the software as much as possible.
    (1)Backup your project
    (2)Delete the MagicaCloth2 folder from the Unity editor
    (3)Import the latest MagicaCloth2 from PackageManager
     
  7. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Update:2.1.4

    v2.1.4 has been released on the Asset Store!
    https://u3d.as/2Zc3

    This is an emergency response to the fatal problem that some gizmos are not displayed due to the fix made in v2.1.3.
    We apologize for the inconvenience.

    Release Note:
    Fix: Fixed an issue where some gizmos were not displayed when cloth-editing due to the fix made in v2.1.3.
     
  8. Claudia_Schulz

    Claudia_Schulz

    Joined:
    May 12, 2020
    Posts:
    8
    Hello :) We are currently moving from magica 1 to magica 2 and while setting things up, we've probably found a bug. We are following the guide lines for the Dress Up system, where auto build is turned off for all additional clothing components and turned on again after the skinned mesh renderers bone dictionary is updated and so on. Then the "BuildAndRun" method is executed.

    I've noticed that both in the Dress Up demo and in our project, the attributes painted onto BoneCloth components are overwritten before building the cloth. All roots are set to be fixed, all others are set to move. The settings get overwritten without checking, whether valid serialized data exists already (which seems to be done with the auto build, as I've checked the same behavior in the Kagura Demo for example).
    I think I can patch this up in our project for the time being, but it would be great if you could check this out, as well!

    Repro Steps:
    In the Dress Up demo, change the Hair BoneCloth attributes (e.g. to invalid or throw some fixed ones in) - the editor display the changed attributes fine!
    Now run the Dress Up demo and check the hair attribute gizmos again. See that your changes have been overwritten.
    If you do the same thing in the Kagura Demo Scene with any of the bone cloth components there, the settings will be applied as expected.
     
  9. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    Thank you for reporting the problem.
    Your detailed reproduction procedure is very helpful.

    We have investigated and are certain that this is a glitch.
    The cause is that when BoneCloth was built at runtime, the attribute data was unconditionally initialized.
    Therefore, we have corrected this so that if user-defined attribute data already exists in the component, it will be used.
    This fix will go into the next v2.1.5, which will probably be released within 10 days.

    If you would like to test this fixed version immediately, please send me a direct message.
     
    Claudia_Schulz likes this.
  10. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Announcement

    Added usage in visual scripts to the documentation.

    https://magicasoft.jp/en/mc2_visualscript_setup/

    With this preparation, all properties and functions of MagicaCloth2 will be available.
    Please note that we will only officially support the Unity standard VisualScripting (formerly Bolt).
    However, it should probably be possible to use it with PlayMaker and BehaviorDesigner if you apply it!
     
  11. bvonline

    bvonline

    Joined:
    Feb 27, 2021
    Posts:
    85
    What is the advantage compared to Obi Cloth? Because I own that other asset already. Think I might have a reason to buy yours...
     
  12. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    Sorry, I'm not familiar with ObiCloth so I can't compare.
    I think each has its advantages and disadvantages.

    Therefore, I will only mention the merits of MagicaCloth.
    The best selling point of MagicaCloth2 is that the workflow is simple and easy to understand.
    If you refer to the tutorial videos and documentation, you will soon be able to shake various parts of the character.
    Another thing is that you can use both BoneCloth that shakes Transform and MeshCloth that shakes mesh vertices.
    I think other competing assets only support one or the other.
    In addition, we are constantly updating and planning to add various functions in the future.
    In other words, this asset is still evolving.
     
  13. yukocchi

    yukocchi

    Joined:
    Jul 5, 2018
    Posts:
    8
    Hi, will MagicaCloth2 have global colliders just as MagicaCloth1? Thanks!
     
  14. Claudia_Schulz

    Claudia_Schulz

    Joined:
    May 12, 2020
    Posts:
    8
    - Thank you very much! I will wait for the next update, that's fine. Thanks for fixing this so quickly :)
     
    hoshos likes this.
  15. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    No, there is no global collider in Ver2.
    The previous global collider was a very brute force implementation and did not perform well, so it has been discontinued.
    Instead, Ver2 makes it easy to add and remove colliders from scripts.

    https://magicasoft.jp/en/mc2_runtimechanges/

    Take advantage of this feature.
     
    yukocchi likes this.
  16. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Update:2.1.5

    v2.1.5 has been released on the Asset Store!
    https://u3d.as/2Zc3

    Fixed critical bugs related to crashes and memory leaks.

    Release Note:
    Fix: Fixed a memory leak and crash that occurred when all vertices of a render mesh registered due to invalid attributes were eliminated in MeshCloth.
    Fix: Fixed a memory leak and crash that occurred when the number of vertices of the render mesh registered by reduction became 0 in MeshCloth.
    Fix: Fixed a memory leak with disposing of cloth components.
    Fix: Fixed an issue where simulation would malfunction and crash if more than 1024 cloth components were running at the same time. The number of cloth components that can be used at the same time will be 4096, and any more will stop working.
    Fix: In MeshCloth, the reduction distance is calculated from the bounding box of the entire mesh, but the second and subsequent meshes in the list were excluded from the calculation.
    Fix: Fixed an issue where user-defined vertex attribute data was being ignored when generating BoneCloth at runtime.
    Added: Added [Manager Information] to the editor menu. This is for internal information gathering in the event of a problem and does not affect normal usage.
    https://magicasoft.jp/en/mc2_releasenote/

    How to Update
    Please follow the following steps to update the software as much as possible.
    (1)Backup your project
    (2)Delete the MagicaCloth2 folder from the Unity editor
    (3)Import the latest MagicaCloth2 from PackageManager
     
  17. coffeebuyer

    coffeebuyer

    Joined:
    Jan 31, 2023
    Posts:
    9
    I am trying to learn cloth simulation by studying your MagicaCloth2 scripts. How does it update the cloth every frame? After studying the RuntimeBuildDemo related scripts I do not see an Update() method utilized.
     
  18. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    Examine MagicaManager.cs.
    The main loop is all handled by this script.

    However, I am sorry, but we cannot accept questions about the details of the simulation algorithm.
    This forum is for support on how to use MagicaCloth.
    Please understand.
     
    coffeebuyer likes this.
  19. brycematthes

    brycematthes

    Joined:
    Aug 25, 2022
    Posts:
    1
    I am having difficulty getting the exact behavior I'm looking for. I have my cape correctly simulating but it will sometimes phase through the colliders. Is there a way to keep the cloth from getting past the colliders?

    You can see my desired interaction at the beginning. Before any fast moving animations my cape stays on the correct side of the colliders.

    After jumping and moving quickly the cloth is now on the other side of the colliders.



    I have attached 3 screenshots of the component settings. Thank you!
     

    Attached Files:

  20. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    It is necessary to limit the movement of particles when performing such violent actions.
    Try the following two functions.

    (1) Movement Limit
    https://magicasoft.jp/en/mc2_backstop_setup/
    By using this function, it is possible to limit the movement range of particles.
    By restricting movement around the shoulders, the cape in the video can reduce the problem of penetrating the front of the body.
    I think that it is good to use vertex paint and enable only around the shoulder.

    (2) Inertia
    https://magicasoft.jp/en/mc2_baseline/#Inertia
    By adjusting this parameter, you can suppress the movement of particles even if the character moves violently.
    However, if you hold it down too much, the cape will not move very much, so be careful.
     
    brycematthes likes this.
  21. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    With Inertia, the hair can follow character's movements, but if character running in a straight line, the hair feels so stiff without any movement. How can I make it wave like moving in wind while running?
     
  22. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    A function that automatically generates wind from the direction of movement according to the movement of the character is useful for this.
    Please refer to MovingWind in the following documentation.
    https://magicasoft.jp/en/mc2_wind_setup/
     
    Spikebor likes this.
  23. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    Thank you! Is there any API for other systems to sample the wind at position to interact with Magica Cloth's wind?
    I just go through the Wind API and see nothing like that, do you think it's good to consider?
     
  24. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Does this mean that you want to get the wind speed and direction of the specified coordinates regardless of the cloth component?
     
    Spikebor likes this.
  25. wannaplaymore

    wannaplaymore

    Joined:
    Jan 4, 2019
    Posts:
    3
    Hello, I have been using the First Version of Magica Cloth and had made some modifications to suite my needs. I am now moving my project to use ECS. I just noticed today you have a second version which I am checking out now. You mention you are using DOTS. Do you plan to support ECS as well? Your asset doesn't work in a Subscene as it is today. I am considering attempting to convert it so it will work with SkinnedMeshRenders that are in Subscenes. By the way, your asset implementation is the best I have seen. I have taken a deep look into your source code and use of Jobs and the burst compiler. Well done!
     
  26. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    yes, for systems outside of Magica Cloth.
     
  27. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Okay, I understand.
    I can make this feature but I can't implement it right away because I'm working on other important features.
    Please understand.
    Also, for reference, in what situations would you use this function?
     
    Spikebor likes this.
  28. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    Thank you for your evaluation!

    Yes, ECS will support it in the future.
    However, I am not very familiar with ECS, so I have to study from now on.
    Also, I think it will be a while before we support ECS, as there are still many high-priority additions.
    However, since ECS has finally been released from beta and officially released, we recognize that we have to deal with it.
     
    FlightFight and wannaplaymore like this.
  29. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    Thank for the consideration! for example I can sample some points in front or behind a cloth of a sailing ship. And if I got the direction + wind str at that point, I can decide to push the ship's rigidbody by force. By this I can have a wind system not only flow the MagicaCloth of character, but behave the same for the ship's physics.
     
  30. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Thank you for your specific explanation.
    I will record this as a future task.
     
  31. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    Hi~, Can I make the result bending as smooth as in the Blender view?
    In Unity my cape bending result is so spiky. What can cause this?

    upload_2023-6-21_15-42-45.png

    In Blender
    upload_2023-6-21_15-42-27.png
     
  32. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    I just try to make 2 animations to play with Magica Cloth.
    It will transition the states of Cape between Open and Closed.
    You can take a look at this video,
    When animation playing alone, it's smooth.
    But when I toggle Magica Cloth on, it looks like it snap the pose to something like default binding pose at begin of the animation, result in the animation is snappy.
     
  33. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    First, is this BoneCloth or MeshCloth?
    Also try increasing the [Animation Pose Ratio] parameter in the component to 0.5~1.0.
    https://magicasoft.jp/en/mc2_magicacloth_animationposeratio/
    This may improve the problem.
     
    Spikebor likes this.
  34. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    At that point I was using BoneCloth, but now I think I need more power in adjusting the mesh so I switch to using blendshapes to drive this animation, and switch to MeshCloth.
    Then I got stuck with this bug, please check your conversation, I've sent you the cloak FBX
    Thanks for your help!

    upload_2023-6-22_12-58-16.png
     
    hoshos likes this.
  35. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    281
    Hi guys I'm getting the Cloak animation worked with BoneCloth, looking fire hehe
     
    hoshos likes this.
  36. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hello ... any chance you can allow us to filter the painting by materials? Im using VRoid models (vrm) and everything is a single mesh ... this becomes way too long to paint since their robes and stuff overlap on top of their bodies, and the painting tool is grabbing the vertices for the body if theyre close enough to the robe ... etc. A very simple solution would just be to have a toggle to see/interact with vertices by material ... if that cant be done, at least let me toggle show all/show visible, and then paint vertices invisible, so when I actually go to paint the moveable vertices I dont have to try to manuever my camera to make sure I didnt get anything extra by accident.

    I have no issues with what the product does ... awesome stuff so far ... but the time to paint because of this issue is way too long.

    Thanks!
     
  37. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    I understand your point.
    However, this presents a difficult problem.
    MagicaCloth combines multiple registered meshes and executes them as one proxy mesh.
    This proxy mesh also has a reduced vertex count, so it's a completely new mesh.
    The sub-mesh information is lost in the creation process.
    Since vertex painting is done on proxy meshes, it is no longer possible to filter by material.
    This means that filtering cannot be easily supported due to technical issues.

    There are two ways to alleviate this problem that you can try.

    (1) Culling and Through
    By combining these two checks, you can display all vertices or paint without depth.
    https://magicasoft.jp/en/mc2_vertexpaint/#Basic_operation

    (2) paint texture
    By preparing a paint texture, it is possible to specify vertex attributes by texture.
    https://magicasoft.jp/en/mc2_vertexpaint/#Vertex_painting_with_textures
     
  38. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Yep, I saw those. I'll be honest though, on a model which has EVERYTHING as a single mesh (vrm from vroid, looking at you), its still ... really not enjoyable. Everything from the neck down to the toes is a giant web of balls for your painting. Its doable by messing with stuff ... but I still think an ability to hide a bunch of them which I do not want to ever touch would be tremendously helpful. That way I can just focus on the single part I want to focus on.

    There's no possible way to allow the user to toggle vertex visibilty manually? I'd be happy even if I could mass select the top half of these guys, turn them off, mass select the bottom bunch, turn it off, mass select the stuff I think is going to accidently get selected ... turn it off ... and then just paint safely, without seeing balls everywhere, heh.

    Not knocking this, it works great ... Im just trying to improve my work-flow with vroid models ... thanks.

    [Edit -- For anyone reading ... still an awesome product. More an issue from VRoid models than with this ... if its really an issue I can just take them into blender ...]
     
    Last edited: Jun 27, 2023
  39. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    I understand.
    As mentioned above, this problem is difficult to find a good solution due to technical limitations.
    Also, we can't afford to develop complex culling systems like modeling tools like Blender or Maya.
    However, I would like to consider if there are any other alternatives at a later date.
     
    DGordon likes this.
  40. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Update:2.1.6

    v2.1.6 has been released on the Asset Store!
    https://u3d.as/2Zc3

    Fixed some serious bugs.
    A new MagicaSettings component has also been added to allow you to change the accuracy of the simulation.

    mc2_5_settings-1.jpg

    This allows for settings that reduce precision and increase performance.
    See the following document for details.

    https://magicasoft.jp/en/mc2_performance/#Simulation_frequency_and_maximum_number_of_updates


    Release Note:
    Added: Added MagicaSettings component. This component allows you to change system settings without writing code.
    Added: You can now change the simulation frequency and maximum number of frame updates. Lowering this value can reduce the simulation load. However, if you lower the frequency, the accuracy of the simulation will also decrease, so be careful.
    Added: Supported the help button in the inspector. Documents can be opened quickly.
    Improvement: The log of the menu Tools/MagicaCloth2/ManagerInformation is now output as a text file. The file will be saved as MagicaCloth2_SysInfo_x in the project folder. This function is for collecting information when a problem occurs, so it is not usually used.
    Fix: Fixed a rare case where a division by 0 error occurred when calculating normals and tangents of proxy meshes, causing the meshes to disappear.
    Fix: Fixed an error that occurred when the Transform number was 1 in BoneCloth.
    Fix: Fixed an issue where meshes using only blendshapes without skinning would cause an error.

    How to Update

    Please follow the following steps to update the software as much as possible.

    (1)Backup your project
    (2)Delete the MagicaCloth2 folder from the Unity editor
    (3)Import the latest MagicaCloth2 from PackageManager
     
  41. warapuri

    warapuri

    Joined:
    Nov 7, 2016
    Posts:
    10
    Hi Hoshos,
    Thank you for supplying this great tool.
    I am using MagicaCloth2 to use clothing shaking.
    I am using it in a timeline, and the position of the character sometimes move with each cut.
    When this happens, the hem inevitably flutters.
    I tried using ResetCloth, but after resetting, it still shakes until it goes to a steady state.

    Is it possible to make the character move in parallel while the shaking remains stable?
     
  42. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    It takes a little more work, but I think it's possible.
    Use MovementInertia/RotationInertia in the Inertia panel for this.
    By setting these two parameters to 0, no force will be applied to the cloth even if the character moves.
    See the documentation for details.
    https://magicasoft.jp/en/mc2_magicacloth_inertia/

    The specific processing steps are as follows.
    (1) Set MovementInertia/RotationInertia to 0 before teleporting
    (2) Move the character
    (3) Wait for the next frame (MagicaCloth processing must be executed once)
    (4) Restore the values of MovementInertia/RotationInertia.
     
    makoto-ito-nhn likes this.
  43. warapuri

    warapuri

    Joined:
    Nov 7, 2016
    Posts:
    10
    Thank you for your prompt reply.
    I tried to implement it as you mentioned, but I don't know how to do it.
    I tried the following, but the cross still worked.

    (1)

    cloth.SerializeData.inertiaConstraint.movementInertia = 0f;
    cloth.SerializeData.inertiaConstraint.rotationInertia= 0f;
    cloth.ResetCloth(); // This may not be necessary.


    (4)

    cloth.SerializeData.inertiaConstraint.movementInertia = 1f;
    cloth.SerializeData.inertiaConstraint.rotationInertia= 1f;
    cloth.ResetCloth(); // This may not be necessary.

    Can you please tell me how to do it correctly?
     
  44. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Sorry my explanation was insufficient.
    If you change parameters, you need to call SetParameterChange() instead of cloth.ResetCloth().
    See the following document for details.
    https://magicasoft.jp/en/mc2_runtimechanges/
     
    warapuri likes this.
  45. warapuri

    warapuri

    Joined:
    Nov 7, 2016
    Posts:
    10
    Super!
    I was completely able to do what I wanted to do!
    Thank you very much.
     
  46. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    I was relieved that the problem was resolved.
    This feature will be added as a component feature in the near future.
    It's a feature that automatically detects teleports and lets you choose between resetting or maintaining shape.
    Until then, please operate from the script like this time.
     
    warapuri likes this.
  47. Weendie-Games

    Weendie-Games

    Joined:
    Feb 17, 2015
    Posts:
    75
    Hi @hoshos

    Do you have any advice on how to setup a flag preset? I tried to tweak the parameters and change the vertex to move / not move, but i can't get a nice result.

    Captura de tela 2023-07-05 063823.png


    Any advice is welcome, thank you
     
  48. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    [Edit - had a few posts with what took me a whole day of debugging to figure out, but it seems like opening magicacloth component, or at least the painter, after scrubbing through a timeline with an animation on it will break the vertex painting. I assume this is because the pose changed. I think editing the component in PREFAB mode where the pose has not changed may be fine, but ill edit this if not. I'm leaving the rest here just incase someone else happens to need this, since this took me 10+ hours of git reverts, waiting on library reloads, and debugging to figure out.

    If you can fix this, great. If not, this product is still brilliant now that I know how to work around it ... assuming I dont hit another issue :)]

    You can see from the attached screenshots that the hands have become green and the wrists red, while the front of his robe had all the vertices changed to invalid. The wrist/hand used to be white and the front of the robe looked exactly like the back of the robe.

    [Edit 2 - scrubbing the timeline with an animation on the character changes the characters transforms, which is what breaks it. For now I'm just reverting the prefabs whenever I need to test in play mode, but I'll probably just write an editor script to handle this in some way. Timeline does work fine with this besides this issue, so final verdict is this works for recording movies providing you work around this one issue.]
     

    Attached Files:

    Last edited: Jul 6, 2023
  49. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    In the case of flags, etc., try adjusting the following points.

    Turn off AngleRestoration.
    AngleRestoration tries to forcefully restore the shape of the cloth.
    This works well for things like skirts, but can be a problem for flags.

    Decrease the value of TriangleBending.
    TriangleBending also tries to restore the shape of the cloth.
    If this is also a flag, it may be better to lower it.

    For reference, here are the parameter settings assuming the following flags.
    please refer.

    mc2-flag 2023-07-06 104750.jpg

    mc2-2023-07-06-103954.jpg

    However, a certain number of vertices is required to move something like a flag smoothly.
    I think the flag vertex density used is a bit low.
    A low vertex count may result in stiff motion.
     
    Weendie-Games likes this.
  50. hoshos

    hoshos

    Joined:
    Mar 7, 2015
    Posts:
    919
    Hello.
    Thank you for your detailed explanation.
    First of all, this phenomenon is not a bug, but a design.

    Vertex Paint remembers the pose when you edited it.
    This is called the basic pose.
    Vertex paint data is recorded in the coordinate space of this base pose.
    Therefore, if you open the inspector when the pose is different from this basic pose, the vertex paint will look broken.
    But it works fine at runtime.
    The important thing is that when you do vertex painting, you must always edit with the same pose.

    Also, at runtime, it is necessary to initialize MagicaCloth with the basic pose for which vertex painting was performed.
    This should be the base pose at the moment the character is instantiated.
    Normally, there is no problem if you create a prefab with the basic pose.
    Initialization of MagicaCloth is done at the moment the prefab is materialized.

    In summary, MagicaCloth settings must be set in a fixed pose (A or T pose is the mainstream).
    And it should be stored as a prefab as it is in its basic pose.
    Also, at runtime, the moment of appearance must be in the basic pose.
     
    DGordon likes this.