Hi everyone!
Magica Cloth is a fast cloth simulation that runs on Job System + Burst Compiler.
Ideal for shaking hair, skirts, breasts and more!
Supports both Transform and mesh vertices.
Now on sale at the asset store!
Features:
Fast cloth simulation with Unity Job System + Burst compiler
No native plugin
Works on all platforms except WebGL
Implement BoneCloth driven by Bone (Transform) and MeshCloth driven by mesh
Magica Cloth promotion video 2 has been added.
The hair is BoneCloth, the shaking of the chest and breast is MeshSpring, and the cloth behind is MeshCloth.
The model used Amarok3D’s “Scythe girl”.
Hi, Freznosis.
It is not exclusive to skin mesh.
Available for Transform (bone), MeshRenderer, SkinnedMeshRenderer.
However, since it is designed with priority on the use of characters, it may be slightly unsuitable for the use of flags such as normal game worlds.
Basically for characters.
(1)WebGL
Magica Cloth runs on Unity’s latest technologies, the Job System and Burst Compiler.
Unfortunately this feature doesn’t seem to work currently with WebGL.
It is discussed in the following forum: https://discussions.unity.com/t/696219
If Unity provides Burst compiler support for WebGL, Magica Cloth will work naturally.
(2)Sphere Collider
Yes, collision judgment by Sphere Collider, Capsule Collider, and Plane Collider is possible.
However, the collider used in Magica Cloth is not compatible with the Unity collider.
It is a separate implementation from Unity’s physics engine.
How well does this work with a character that is in motion? By that I means actually physically moving in the world. The videos all show a character animating, but not moving. I have a character that goes at a normal speed as well as high speed. Will the simulation hold up under high speed situations? Also, what about wind?
Hi, b1gry4n
Yes, characters can move around the world freely.
There are no restrictions on movement.
The video is simply stationary for shooting.
There are also options to control the movement of the body.
[World Influence] parameter. https://magicasoft.jp/en/paramater-world-influence-2
By setting this parameter, you can specify how much the speed of the body is added to the particles.
As a result, when the main body moves at high speed, the phenomenon that particles are disturbed can be suppressed.
You can also set up teleportation.
When the main body moves / rotates more than a certain amount in one frame, the movement of particles can be reset.
This is useful for in-game teleport processing.
“Wind” is not implemented in v1.0.0.
However, it will be implemented in the near future, as it will be added to the items as a roadmap for the future.
Currently, Unity2019.3 has confirmed that an error occurs when writing a prefab.
We apologize for the inconvenience and are currently responding.
---- error message ----
Assertion failed on expression: 'gForceReimports->empty()'
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
v1.0.1 has been released on the Asset Store.
Fixed an issue where creating a prefab in Unity2019.3.0 caused errors and data corruption.
If you use Unity2019.3.0, please be sure to update.
On either version of Unity (2019.3.0f6 or 2019.2.19f1), when creating a new project, adding the latest Burst and Jobs packages, setting the compilation options to .NET 4.x, IL2CPP, allow unsafe code, and importing Magica Cloth 1.0.1…
When I run the UnityChanClothSample scene, the following error is emitted to the console, apparently every frame:
Assertion failed on expression: 'offset + size <= bufLen'
I’m not seeing what’s causing this error. Disabling the “Magica Mesh Cloth”, “Magica Mesh Spring BL” and “Magica Mesh Spring BR” objects on UnityChan stop the errors, but I’ve been unable to narrow it down further.
Hi, broberson.
We apologize for any inconvenience.
I saw this error for the first time.
There seems to be no problem with the setup.
Could you tell me in which environment, windows / mac?
Also, would you please give me the full text of the error message (all of the logs)?
Thank you.
Thanks broberson for the detailed image.
There is no problem with the setup at all.
There is a warning about importing FBX, but this is a problem on the Unity-Chan model side, so don’t worry.
This is information on the net. Can you test by setting [Metal Editor Support] of Edit-> Player Settings …-> Player to On or Off?
There was a statement that a similar error was recovered.
Another one.
Would you please manually [Create] all the MagicaCloth components attached to the [unitychan] prefab as shown in the image?
The execution order is [RenderDeformer]-> [VirtualDeformer]-> [MeshCloth]-> [MeshSpring]-> [BoneSpring].
There is a possibility to improve by recreating the data.
Thank you.
This makes the errors go away. With Metal Editor Support ON, there are no errors reported with any other sample scenes.
This had no effect on the errors.
At this point, it seems like Unity’s Metal API support in the editor is just being too picky. Probably best to just wrap the two calls to mesh.MarkDynamic() in RenderMeshDeformer.cs with a preprocessor directive:
mesh.MarkDynamic();
#endif```
MarkDynamic is supposed to make manipulating the mesh more performant, but I'm getting faster frame renders in the editor without it. I don't think that, on Metal, MarkDynamic does anything besides throwing an assertion error. This doesn't generate any errors in the logs written by a development build of the game, so it really does seem like an editor-only issue.
Maybe that helps?
Thank you for the report!
The cause is unknown, but [Metal Editor Support] is a flag related only to the editor, so it probably has no effect on the build.
Can you use it in this state for a while?
Document it as a known bug.
I ordered a MacBook today because I didn’t have a Mac. I think it will arrive in a few days.
If you find out the cause, I will report it on this forum, so please give me some time.
I edited my previous response with a possible fix for you.
Basically, mesh.MarkDynamic() makes the Unity Editor’s Metal implementation angry with certain meshes. There doesn’t appear to be anything that can be done with UnityChan that would work around the problem. Spheres and Quads and Cubes seem to be fine. Skipping the call to MarkDynamic() when running in the MacOS Editor is probably a safe default.
mesh.MarkDynamic();
#endif```
This is very helpful!
I would like to test this code and release v1.0.2 as soon as I receive my MacBook.
Thank you very much for fixing the bug.
I just bought the asset and am testing it out. Works fine for me with "statric " cloth. However, I also have some bone driven cloth (where bones move parts of the vertices in SkinnedMeshRenderer). Seems as soon as I enable MeshCloth, the connection between bones and the SkinnedMesh is gone, the cloth is not moving in sync with the bones anymore. Is this expected behavior, or do I need to do something special to make it work ?
Best,
Hi, Qleenie.
I’m translating, so you may be a little confused, but please forgive me.
Unfortunately, it is currently not possible to mix MeshCloth and BoneCloth on the same vertex.
When using MeshCloth, the vertices will be [Moved] [Fixed] [Invalid] as panes.
At this time, the [Moved] and [Fixed] vertices are occupied by MeshCloth and are not affected by other cross components.
However, the vertices of [Invalid] are excluded from the influence of MeshCloth, so they can be transformed from other BoneCloth.
In the image example, the gray [Invalid] particles will work with BoneCloth.