Search Unity

Cloak bending too much with animations

Discussion in 'Animation' started by fendercodes, Aug 22, 2019.

  1. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    192
    Hoping someone can help me understand why my model that has a cloak looks fine in T-Pose but during a walking animation it seems to bend the mesh in a weird way.

    I tried using a Cloth component and setting max distance to 0 on all of the mesh but it still bends the same. I want it to drop down to the ground more naturally.

    The model:
    tpose.png

    Mid walking animation:
    Screenshot (1).png
     
  2. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    722
    If your entire cloth uses max distance 0 then theoretically there will be no cloth movement at all. All that would be left at that point is whatever vertex weights that are pulling it from the skeletal rig. You have to make the parts of the mesh you want to flow freely at a distance greater than 0 for cloth work. Of course then you might get weirdness from the Physics, and you might have to use colliders to push the cloth while your character walks.

    However, I've noticed you're using Unity 2019.2.1f1, which contains multiple critical issues for cloth, and I'm not sure if you've encountered any. Check out this thread for details, I put a lot of links in my posts to other people with similar issues. It appears like cloth gravity is wrecked, and there's a seperate issue which can cause distortion on the static mesh before playmode is activated. If any of those problems scared you into using distance 0 then you'd just have to wait for them to patch the bugs, as it's possible what you experienced was not the expected behavior for cloth.
     
  3. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    192
    @SomeGuy22 Thanks for the reply. Setting to something above 0 does seem to start making things move. But I am getting really bad performance - went from 150fps to 2fps - when adding the Cloth component to my characters cloak. Could that be related to the issues with 2019.2.1f1?
     
  4. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    722
    Take a look at the profiler and see which function is causing the slowdown. I don't know how detailed it gets for cloth behavior but at least you can verify it's the actual component causing it.

    How many vertices/polygons does your cloak have? The more unconstrained verts you have, the slower your game would run, but jumping down to 2FPS doesn't sound right. Check your solver frequency and make sure it's reasonable. The higher that number, the more calculations happen per second. Also check if you haven't touched any of the other settings like inter-collision/virtual weights. Also having more than 1 cloth component could be an issue, so check how many you have.

    EDIT: Even on 2019.2.0f1 I was getting good performance with Cloth despite all the distortion bugs, so I doubt 2019.2.1 would be much different.