[RELEASED] MagicaCloth2 - Hybrid Cloth Simulation

Some conclussions:

  • this problem is project agnostic. I have the same values IN EDITOR regardless if it is URP or HDRP, if it is new empty project or my main project with hundreds of assets, regardless if it is Unity 2022 lts or Unity 6 lts.
  • In build Magica Manager takes around 1.3ms in ChanKagura URP demo scene in compare of in editor 6ms. If I multiply the ChanKagura character 6 times I have got 50-60ms in edirot, but only about 2.6-3ms in build.

Do you have any idea what is causing this massive performance drop in editor? Obviously, this is not the case in build. However with such huge drains I can not work with magica in editor playtests.

Thank you for the detailed report.
Just to be sure, I measured the performance again here.
Unity2022HDRP and 6000HDRP environments.
Place six sample UnityChanKAGURAs in the scene.

The environment is as follows:

  • Windows
  • CPU: AMD Ryzen 7 3700X 8-Core Processor 3.59 GHz
  • GPU: GeForce RTX 4080 (*MagicaCloth does not use the GPU)

Measurements are for the editor environment and the IL2CPP build environment.

The overall simulation time is as follows:
Unity2022 Editor: 3.29ms
Unity6000 Editor: 4.14ms
Unity2022 Build: 2.45ms
Unity6000 Build: 2.43ms

The following information can be obtained from this data:

(1) In the Editor environment, it is 150%~ or more slower than the build environment.
(2) In the Editor environment of Unity6000, it is even slower than Unity2022.
(3) In the build environment, performance is the same for Unity2022 and 6000.

(1) is as expected.
In the Editor environment, various monitoring processes are included, so it is inevitably slower than the build environment.
However, the range is about 150%~250%.

As for (2), I learned about it for the first time during this test.
It seems that the performance of the Editor environment of Unity6000 tends to be poorer than previous Unity versions.
However, the cause of this is still unknown.

As for (3), we found that the performance after building does not change even with Unity6000.
When building, be sure to build with IL2CPP.
This will greatly improve C# performance.

1 Like

It is expected that the Editor environment will become heavy, but if it takes 50-60ms with six KAGURAs, there may be some unexpected problem.
It is said that it takes 2.6-3ms in the build environment, so the load is nearly 20 times higher.
What’s even more strange is that there was no problem before.
Unfortunately, we still don’t know the cause of this problem.

First, try turning off all safety checks related to Burst.
This will reduce the load in the Editor environment.
This method is described in the following document.
https://magicasoft.jp/en/mc2_performance/#Notes_on_Editor_Execution

Also, please double-check that there are no problems with the Burst settings.
https://magicasoft.jp/en/mc2_performance/#Notes_on_build

Finally, could you please save and provide us with the profiler information for the editor environment that takes 50-60ms?
You can save the profiler information from the disk icon in the upper right of the profiler window.

1 Like

Thank you very much for detailed tests on your side (the post above) and also for these additional tips.
I have double checked everything in the Burst setting, it is as on your documentation site. I have also turned off the safety checks which with no difference.

I have saved the profiler log. To my surprise it has 172MB even when the editor was in playmode only for maybe 4 seconds. So I have uploaded it here in my g-drive: MagicaEditorProfilerLog.data - Google Drive

Tomorrow I will try to delete everything Unity related from my PC and install only one version of editor from fresh. Maybe, there is something messed up in some root folders. I dont really know. Because it seems that the build performance is quite similar on my side as is in your tests. So there must be something really weird going on in the editor.

Thank you for the profiler data.
We have analyzed it here.
It appears that all Burst jobs are slowing down, rather than just a specific job.
There were some jobs where even simple processing was taking an unexpectedly long time.
Unfortunately, we still don’t know the cause.

I would like you to try testing it with debug mode turned off.
To turn off debug mode, please refer to the following document and disable the items in the image.


Can Magica Cloth2 implement interactive features, like clicking and draging cloth with the mouse?

Hello.
No, we don’t have that functionality yet.
However, it is on our roadmap and we are considering adding it in the future.

Hey friends! First wanted to say how much I love Magica Cloth 2. It’s seriously so great!
But!
I am having a similar performance issue during editor play mode.
I had to revert a project today because of a (non-magica) bug.
After reverting, I am getting WAY worse fps with an identical scene. (from 300~400 down to 30). I double checked with another earlier backup and it is getting great performance again (~360fps).
Thanks!

EDIT

Dudes. (BACKUP PROJECT FIRST). I cut: Artifacts, BurstCache and BuildPlayerData from the Library folder in the Unity project. Then I reloaded and after Unity rebuild those folders, it seems fixed.

1 Like

DreamGirlGames
Thanks for reporting this.
This is great progress!

SwenSVK
Can you test this?

Is there any way we can flip the force direction applied to the cloth?

IE: I have a character riding a jetski. Currently when turning left/right, the hair sways toward the direction being rotated, not away. This is unrealistic, i’d like to flip this value.

[pic shows turning right. red arrow is desired hair direction]

Hello

We are interested in using Magica Cloth to our project, before that we need to confirm about the licensing terms for our teams and our clients due to we have to transfer the Unity project data to our client as well.
Do you have any Multi Entity license or some kind like floating license?
However I also send the inquiry to the support mail address, please kindly reply back.

I’m looking forward to your reply

Hello.
MagicaCloth uses a simplified simulation of actual physical laws.
Therefore, movement follows actual physical laws: gravity, inertia, centrifugal force, etc.
Unfortunately, there is no function to reverse the current movement.

I would like to see how this hair actually moves, though.
Can you provide a video that shows this hair movement?
Sorry, screenshots do not allow for a clear analysis.

Hello.
MagicaCloth2 is an extended seat license.
An extended seat license requires the purchase of a seat for each user who needs to use or modify the asset.
This license can be found in the AssetStore at the following link

If you open the QA in this section, you will see the following.


The definition of who can use this asset is not clarified by Unity.
However, when it comes to MagicaCloth, the number is the number of people who will be using the MagicaCloth assets to set things up.
In other words, testers, UI artists, sound composers, etc. do not need to be included.

1 Like

Thank you so much!

here is a video in-game:

i’ve been trying to tune the hair settings to still work well at high speeds (up to 60 mph). Id like the hair to be as free flowing as possible, currently it is too flat but raising motion values cause jitter at high speeds… If you have any recommendations plz lmk!

Hi, this is my first time to download and install magica cloth.
i tried both magical cloth and magical cloth 2, but it seem always have a problem on the file

Thank you for the video.
It certainly seems like the hair swaying is small compared to the boat’s speed.

First, please tell us the version of MagicaCloth you’re using.
If it’s older than v2.12.0, please update to the latest version.
Various bugs have been fixed.
Be sure to back up your project before updating.

Then please provide us with a screenshot of the inertia panel settings.
An image like this.
I’d like to check the inertia settings.

Hello.
It seems you contacted me via DM, so I have replied to you via DM.
Please check.

Thanks! i was using v2.10, just updated. here are my inertia settings:

Thank you for your answer.
And thank you for the screenshot.
I’ll list a few points that I noticed.

First, about the inertia settings.
WorldInertiaSmoothing is too high.
If you set it too high, the inertia will be smoothed and it will not react well to sudden changes in direction.
For games like this, it’s better to lower it a bit. About 0.2~0.4.
If the hair movement is too violent, try limiting it with WorldInertia/WorldMovementSpeedLimit/WorldRotationSpeedLimit.
For more information, see the inertia documentation.
https://magicasoft.jp/en/mc2_magicacloth_inertia/

Next, about TetherCompression.
TetherCompression sets the rate at which the hair can shrink.
0.9 will cause the hair to shrink too much and become messy.
Try setting this value to about 0.1~0.3.
https://magicasoft.jp/en/mc2_magicacloth_shaperestoration/

Finally, if the hair movement is too violent, try increasing Damping.
Damping is air resistance, and increasing it will make the hair move a little more slowly.