Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stronger cloth
#1
Hi,

Which parameter to make the cloth stronger so that colliders will not go through the cloth easily? The cloth will only move with the collider unless the collider moves very slowly.

Thank you.
Reply
#2
(03-10-2017, 11:17 AM)stevenwan Wrote: Hi,

Which parameter to make the cloth stronger so that colliders will not go through the cloth easily? The cloth will only move with the collider unless the collider moves very slowly.

Thank you.

If your colliders are fully animated, there's no way to prevent them going trough the cloth at very high speeds. Animating objects using their transform is equivalent to "teleporting" them from one frame to the next. So from the cloth's perspective, one frame the leg is inside of the cloth, the next frame it has teleported outside. It's impossible to react to that.

The correct approach for character clothing in current-gen games is to use skin constraints. These blend the animated version of your cloth with a simulated one, and ensure that the simulation does not deviate too far from the animation, eliminating the need for collision detection completely for cloth that is always relatively close to the body (shirts, pants, etc).

In cases like yours (a trenchcoat, from what I can see in the pics), where the cloth needs to deviate quite a lot from the animation you need to ensure a combination of things:

- Perform the simulation always in local space (as opposed to world space). To use local space, place the ObiSolver component at the top of your character transform hierarchy, and check "simulate in local space" in its inspector.

- Tweak the "world velocity scale" in your ObiCloth, to control how much of your character's world speed is applied to the cloth. This can help reduce the apparent "speed" of the colliders for your cloth. (This only works when simulating in local space, see above).

- If your character has a rigidbody, ensure that the corresponding ObiRigidbody has "kinematic for particles" enabled. This will prevent the particles from exerting any force on your character.

You can also help collision detection by increasing the radius of your particles using the particle editor.

See:
http://obi.virtualmethodstudio.com/tutor...thing.html
http://obi.virtualmethodstudio.com/tutor...cloth.html
Reply
#3
(03-10-2017, 11:25 AM)josemendez Wrote: If your colliders are fully animated, there's no way to prevent them going trough the cloth at very high speeds. Animating objects using their transform is equivalent to "teleporting" them from one frame to the next. So from the cloth's perspective, one frame the leg is inside of the cloth, the next frame it has teleported outside. It's impossible to react to that.

The correct approach for character clothing in current-gen games is to use skin constraints. These blend the animated version of your cloth with a simulated one, and ensure that the simulation does not deviate too far from the animation, eliminating the need for collision detection completely for cloth that is always relatively close to the body (shirts, pants, etc).

In cases like yours (a trenchcoat, from what I can see in the pics), where the cloth needs to deviate quite a lot from the animation you need to ensure a combination of things:

- Perform the simulation always in local space (as opposed to world space). To use local space, place the ObiSolver component at the top of your character transform hierarchy, and check "simulate in local space" in its inspector.

- Tweak the "world velocity scale" in your ObiCloth, to control how much of your character's world speed is applied to the cloth. This can help reduce the apparent "speed" of the colliders for your cloth. (This only works when simulating in local space, see above).

- If your character has a rigidbody, ensure that the corresponding ObiRigidbody has "kinematic for particles" enabled. This will prevent the particles from exerting any force on your character.

You can also help collision detection by increasing the radius of your particles using the particle editor.

See:
http://obi.virtualmethodstudio.com/tutor...thing.html
http://obi.virtualmethodstudio.com/tutor...cloth.html

Thank you for the reply.

I end up using skin constraints. I didn't use it at the beginning since the trenchcoat demo does not use skin constraints and the cloth flow more neutrally (of course the drawback is what I was facing)

Other than that, I found that the document for skin constraints is a bit not clear for the words "radius", "skin radius", "backstop radius" (we have all these three in the particle editor) when it said "radius"
http://obi.virtualmethodstudio.com/tutor...aints.html
Reply