Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi cloth on character not detecting collisions with obi collider objects
#1
Hi,

I have a character with a skirt that I have added the obi cloth component to. I want this skirt to interact with the environment, so when the character crouches, instead of passing through the floor, the skirt spreads. I have added an obi collider to the floor and ensured the obi solver has the correct collision layers, however the cloth still passes through the floor.

If I use the cloth separately without attaching it to the character and drop it from a height, then it detects collisions with the floor and does not pass through.

I even had a look at the Demo character trenchcoat scene that is included and noticed that even though there is an obi collider on the floor in that scene, when the character crouches his trenchcoat moves through the floor. 

Is there something I'm doing incorrectly?

I've attached a picture of the trenchcoat scene . The cube in the scene has an obi collider on it but as you can see the cloth is not being affected by it at all

[Image: XoYKoJK.png]
Reply
#2
(10-02-2018, 05:38 AM)a12345 Wrote: Hi,

I have a character with a skirt that I have added the obi cloth component to. I want this skirt to interact with the environment, so when the character crouches, instead of passing through the floor, the skirt spreads. I have added an obi collider to the floor and ensured the obi solver has the correct collision layers, however the cloth still passes through the floor.

If I use the cloth separately without attaching it to the character and drop it from a height, then it detects collisions with the floor and does not pass through.

I even had a look at the Demo character trenchcoat scene that is included and noticed that even though there is an obi collider on the floor in that scene, when the character crouches his trenchcoat moves through the floor. 

Is there something I'm doing incorrectly?

I've attached a picture of the trenchcoat scene . The cube in the scene has an obi collider on it but as you can see the cloth is not being affected by it at all

[Image: XoYKoJK.png]

Hi there!

Make sure that the collider is in one of the layers checked for collisions by the ObiSolver, and that it is in a different collision phase than the cloth's particles. Most probably your collider is set up in a different layer. See:

http://obi.virtualmethodstudio.com/tutor...sions.html
Reply
#3
(10-02-2018, 07:36 PM)josemendez Wrote: Hi there!

Make sure that the collider is in one of the layers checked for collisions by the ObiSolver, and that it is in a different collision phase than the cloth's particles. Most probably your collider is set up in a different layer. See:

http://obi.virtualmethodstudio.com/tutor...sions.html

Thanks for your response. I've checked the layers in my own scene and they are set correctly. The white surface in the image below has an obi collider on the default layer. The skirt with the debug particles has a solver that detects collisions on the default layer. The phases are different as well.

When I start my scene, the character is in this kneeling position and the dress is already below the surface of the floor collider. Do you think this is the issue?

At first I thought this might be the issue, but then my character gets up and kneels back down and the dress again penetrates the surface. I know the colliders are working as adjusting the thickness distorts the particles, but that still doesn't prevent the particles that were initially below the surface from falling back through when the character kneels again.


[Image: WnloXiC.png]

Cloth reacting to change in thickness of collider:

[Image: x9cVMNM.png]
Reply
#4
(10-02-2018, 09:54 PM)a12345 Wrote: Thanks for your response. I've checked the layers in my own scene and they are set correctly. The white surface in the image below has an obi collider on the default layer. The skirt with the debug particles has a solver that detects collisions on the default layer. The phases are different as well.

When I start my scene, the character is in this kneeling position and the dress is already below the surface of the floor collider. Do you think this is the issue?

At first I thought this might be the issue, but then my character gets up and kneels back down and the dress again penetrates the surface. I know the colliders are working as adjusting the thickness distorts the particles, but that still doesn't prevent the particles that were initially below the surface from falling back through when the character kneels again.


[Image: WnloXiC.png]

Cloth reacting to change in thickness of collider:

[Image: x9cVMNM.png]

There's a couple issues here:

If your skin constraints are telling the cloth to not penetrate the skinned pose, and the collision constraints are telling the cloth to not penetrate the floor, then it is impossible to meet both constraints at once. You have no control over this, as neither result (over the floor/under the floor) is globally correct. This is why once the character gets up and back down, particles sink into the collider once more: the skin constraints tell them to, as otherwise they would penetrate the character's knees.

Your floor seems to be very thin, and since particles start on the "wrong" side of the floor, they will stay there during the simulation. They have no way of knowing which side of the collider you regard as the "good" side, so they will just try to stay in the side they start out. Once you increase the thickness of the collider, particles on the top side will just raise higher, and particles on the bottom side will sink further as you can see in your own image.

I'd simply make the floor way thicker, so that particles start out inside the floor and get projected up.
Reply
#5
(10-02-2018, 10:53 PM)josemendez Wrote: There's a couple issues here:

If your skin constraints are telling the cloth to not penetrate the skinned pose, and the collision constraints are telling the cloth to not penetrate the floor, then it is impossible to meet both constraints at once. You have no control over this, as neither result (over the floor/under the floor) is globally correct. This is why once the character gets up and back down, particles sink into the collider once more: the skin constraints tell them to, as otherwise they would penetrate the character's knees.

Your floor seems to be very thin, and since particles start on the "wrong" side of the floor, they will stay there during the simulation. They have no way of knowing which side of the collider you regard as the "good" side, so they will just try to stay in the side they start out. Once you increase the thickness of the collider, particles on the top side will just raise higher, and particles on the bottom side will sink further as you can see in your own image.

I'd simply make the floor way thicker, so that particles start out inside the floor and get projected up.

Thanks again for your quick response. Increasing the thickness did help a little. I've attached a gif to show you how it continues to penetrate the surface albeit less than before. I think as you stated it is an issue with the skin and collision constraints conflicting. However I changed the skin radius to 0 which means it should be able to go right up against the mesh, right? It seems to begin penetrating long before it hits the skin constraints.

[Image: iszA6nk.gif]
Reply
#6
(10-02-2018, 11:18 PM)a12345 Wrote: Thanks again for your quick response. Increasing the thickness did help a little. I've attached a gif to show you how it continues to penetrate the surface albeit less than before. I think as you stated it is an issue with the skin and collision constraints conflicting. However I changed the skin radius to 0 which means it should be able to go right up against the mesh, right? It seems to begin penetrating long before it hits the skin constraints.

[Image: iszA6nk.gif]

Hi!

Skin radius determines the maximum distance of the simulated vertex from the skinned vertex away from the skinned position in the normal direction. So if your skirt vertex in its skinned pose is say, 10 cm away from the leg, that's as far as it can go back against the leg even if the radius is large. The pose you model your skirt in is the reference shape: the cloth can move "outside" of this pose, but never inside.

If you want to allow the skirt vertices to get closer to the leg without re-modelling it, use the skin backstop property. This allows you to offset the skinned shape in the normal direction.

This being said, imho this setup you're trying to get working will be quite problematic (that's why you generally do not see character clothing interacting with the environment in games). Do it at your own risk!
Reply
#7
(10-02-2018, 11:34 PM)josemendez Wrote: Hi!

Skin radius determines the maximum distance of the simulated vertex from the skinned vertex away from the skinned position in the normal direction. So if your skirt vertex in its skinned pose is say, 10 cm away from the leg, that's as far as it can go back against the leg even if the radius is large. The pose you model your skirt in is the reference shape: the cloth can move "outside" of this pose, but never inside.

If you want to allow the skirt vertices to get closer to the leg without re-modelling it, use the skin backstop property. This allows you to offset the skinned shape in the normal direction.

This being said, imho this setup you're trying to get working will be quite problematic (that's why you generally do not see character clothing interacting with the environment in games). Do it at your own risk!

Thanks a lot for your help! Have a much better understanding of how to deal with it now.
Reply