Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Unity Cloth problem on skinned mesh character.

Discussion in 'Physics' started by Giacomo_Marini, Jun 27, 2023.

  1. Giacomo_Marini

    Giacomo_Marini

    Joined:
    Nov 11, 2019
    Posts:
    5


    Hello good people. I'm having some troubles with the Unity cloth system. Basically I put the cloth component to the character's jacket, when I set the max influence to 0(red) on every control point, it seems to follow the skinning very well as espected. But when I put some green control points (it means they are dynamic), the animation of the jacket where the influence is still 0 (red) becomes strange, while it should be as it was preaviously.It seems that the jacket animation is not in line with the body's one and strange tilts happen. Can someone help me?
    I'm using Physiscs from Unity (neither plug-ins or custom scripts or custom shaders) , Unity2021.3.21f1 HDRP. It happened with Unity builtin too.
     
  2. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    461
    Hmm what's strange about it? The freed vertices hang freely so they just move inside your character since nobody's stopping it.
     
  3. Giacomo_Marini

    Giacomo_Marini

    Joined:
    Nov 11, 2019
    Posts:
    5
    Hi JaackOS, I mean the part of the cloth that should still follow the sknning influece (because there the max influence of the cloth is still 0). If you take a look at the wrists, the shoulders and the chest, you can see that strange jiggles and strange compenetrations between the jacket and the body happenThis shouldn't happen due the fact there the cloth influence is still 0. Don't care about the compenetration of the bottom part of the jacket with the skirt, I put influence 1 in there just to trigger the issue that happens on the wrists, the shoulders and the chest.
     
  4. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    461
    I think what youre seeing there is "poking through" cos the cloth will partly and momentarily hang inside the mesh of the character.

    I'm not pro on this but I believe there are many methods and also assets to achieve better results. Such as this tread suggests rigging the cloth itself.

    https://forum.unity.com/threads/tutorial-how-to-make-clothes-animate-along-with-character.475253/
     
  5. Giacomo_Marini

    Giacomo_Marini

    Joined:
    Nov 11, 2019
    Posts:
    5
    The "poking throught" doesn't happen while I don't attach a cloth component to the jacket. The jacket is a part of the same FBX of the body. They have the same rig and the skinning works perfectly (no "poking through" at all). When I attach a cloth component to the jacket this happens:
    -if I set 0 the "max influence" of the constraint on every constraint (it means the whole jacket moves in accord of it's skinning), no "poking through" happens.
    -if I set "max influence" to 1 on at least 1 constraint, the "poking through" starts to be visibile on the part of the jacket where the constraints have 0 "max influence" (the vertices in there should be driven by only the skinning of the rig).
     
  6. Giacomo_Marini

    Giacomo_Marini

    Joined:
    Nov 11, 2019
    Posts:
    5
    Up!
    Anyone can help me?
     
  7. KingCeryn

    KingCeryn

    Joined:
    Feb 8, 2018
    Posts:
    158
    Having this same issue, only thing I can think of is the Cloth component just always calculates each particle, regardless of "influence." Which is a bummer. Cloth was abandoned by Unity way back in like 2018, so IDK if we'll ever get any fixes.
     
  8. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    2,063
    I'd try setting your Animator's update mode to "animate physics". After all, cloth physics are physics, so if your animation and your cloth simulation update at different frequencies you're bound to have problems like this.

    The render pipeline you use won't affect physics of any kind in any way. RPs are only in charge of rendering.