Trying to apply Cloth physics and it just explodes
18 replies, posted
Now I've been trying to get into game making and I came across a problem, I've made the model all by myself and rigged as well (amateur since I'm not a pro but it's enough to make it work in Blender). I've even separated the model into two parts so I can apply only to the cloth physics part but even then...
https://i.imgur.com/Hk0eENF.gif
https://i.imgur.com/xQQwWbz.png
Here's the layout for it.
This happens and I got no idea why. I've been searching and checking for possible solutions but I can't seem to find a way to solve this (or even achieve the effect I want). Anyone who seems to have an idea or a solution, please respond! I'm quite eager to work and I'd love to get past this issue so I can get to animating!
What version of Unity is this? They added some changes to the workflow of cloth physics somewhat recently.
Unity 2017.3.1f1.
Lets see, in the physics settings of your project, try making sure the cloth "inter-collision" box is unchecked. It's the last setting in physics.
Yeah, it's unchecked.
Did you edit the cloth constraints at all? In most practices, the "connected" vertices should be set to a max distance of zero (red) and the rest of the verts can be left as unconstrained (black).
looks like this when you edit:
https://docs.unity3d.com/uploads/Main/Inspector-Cloth2.png
I've done this and yet the problem persists, if I constrain all of the vertexes to 0, it won't happen but just slightly having a segment set to 0.1, bam, happens like crazy. Could this be the model's fault and not Unity's?
I'm just trying to narrow down all the possibilities of what is happening here. Cloth can definitely be finicky. Yeah, try isolating the cloth model as it's own object and running cloth simulation on it. Make sure your model has the scale set to 1,1,1. Also, what does your hierarchy view look like?
https://i.imgur.com/RK48jEt.png
Yeah, object is isolated. Cube.001 is the part I split in the model so I could isolate it just for the cloth physics part. Scale on it is also 1,1,1 too.
Ok, it is the self collision settings on the cloth component. You need to click the right side cloth vert editor button:
https://docs.unity3d.com/uploads/Main/Inspector-Cloth-Collision-Button.png
Select all the verts on the cloth mesh (may need to turn on manipulate backfaces) and Un-Check "Self-Collision" on the verts.
https://docs.unity3d.com/uploads/Main/SelfCollisionAndIntercollisionCheckbox.png
Alternatively, if you want self collision on, while you have all of the verts selected and Self-Collision checked on for the verts there are two options for Self Collision that appear in the cloth component, at the top of the cloth parameters:
https://docs.unity3d.com/uploads/Main/SelfCollisionParameters.png
Set those to something smaller, so that the glitching stops happening.
Tried both options, still happens.
https://i.imgur.com/1pqI5Cb.png
It's a bit more contained though! But yeah, I got them all select and checked off SelfCollision.
I think you have to reduce the self collision distance. Even if the self collision box is unchecked.
Can't seem to reduce them past 0.1 or 0.2! Even at the lowest values the weirdness still happens.
Check the scale on the parent object, it has an effect on child objects that use cloth physics. Also, you may want to check your scale on the import settings for the whole model.
Well, the scales all fine in Unity (1,1,1) but I'll check the import settings. Do you have any suggestions for recommended porting settings for a rigged model?
Not really, as long as you're exporting enough data for unity to interpret the rig and skinned meshes you should be fine. I prefer fbx format but at the end of the line it all gets processed by unity anyway.
I really don't know what else to suggest at this point, if you want I could look at your model on my machine and see if the problem persists. You can export an asset package with the model, I think that would be easiest.
I think I know what the issue is, probably my poorly done rig without a proper root bone (and some misparented bones). If you'd like, take a look yourself! I'm gonna try and redo the rig to see if I can get this armature to work properly with a root bone.
Oh yeah, always apply/freeze your transforms before exporting. Glad it's working now!
Okay, sorry for this hefty bump but I've run into the same issue when trying to import an animation. I've animated the character in Blender with different actions and it seems applying cloth physics to it makes it yet again explode, like the earlier. Thing is, I'm not sure if it's because my root bone is moved when animating and causes the same issue (with transforms) or I'm just doing something wrong again. Should I just not have the root bone move in the animations?
Pinging @ThePanther , sorry. You helped me out two months ago with this and I feel like you could answer my question. I'll pay in coins!
Sorry, you need to Log In to post a reply to this thread.