Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
issue with collision
#1
I created skinned cloth and tried to collide it with an obi collider.

I used the man_trenchcoat example model and everything worked fine (recreate using just the model, made new blueprint).
But when I used other models the collision won't work at all. I tried on a few different models, some worked and some did not.
Is there a special requirement on the input model for the collision to work?

I even created a single plane with two bones (top won't have physics, skin radius and backface all 0. bottom part will have physics)
I can see some physics effect of stretching with Obi cloth on, but it won't react to my collider. In the same scene, the collision works well with the model I created using Obi example files.
Reply
#2
Hi there,

Make sure you set up collision filters correctly:
http://obi.virtualmethodstudio.com/manua...sions.html

And also make sure your cloth mesh has enough vertex coverage! only mesh vertices collide, so if your mesh has large flat faces and few vertices it will have many holes. You can add a ObiParticleRenderer component to see particles at runtime:

http://obi.virtualmethodstudio.com/manua...ering.html
Reply
#3
(10-01-2022, 10:44 AM)josemendez Wrote: Hi there,

Make sure you set up collision filters correctly:
http://obi.virtualmethodstudio.com/manua...sions.html

And also make sure your cloth mesh has enough vertex coverage! only mesh vertices collide, so if your mesh has large flat faces and few vertices it will have many holes. You can add a ObiParticleRenderer component to see particles at runtime:

http://obi.virtualmethodstudio.com/manua...ering.html
Thanks for the reply! I set all category to 0. There also should be enough vertices for collision. I tried many things and looks like something was not set correctly on specific models. I am still puzzled what that is. Could you check my example scene? I can't get the ball to collide with the plane mesh. I tried to mimic the mesh to the trench coat in some way.
Thanks!
https://drive.google.com/file/d/1z5nB9lW...sp=sharing
Reply
#4
(11-01-2022, 08:35 AM)nikov Wrote: Thanks for the reply! I set all category to 0. There also should be enough vertices for collision. I tried many things and looks like something was not set correctly on specific models. I am still puzzled what that is. Could you check my example scene? I can't get the ball to collide with the plane mesh. I tried to mimic the mesh to the trench coat in some way.
Thanks!
https://drive.google.com/file/d/1z5nB9lW...sp=sharing

Hi!

There's tons of issues in your scene, these are the most important ones:

1) - Main issue is that your cloth transform is scaled x100. This means the actual cloth mesh is tiny, and is getting stretched at runtime to be rendered 100 times larger. So when you simulate it, all cloth edges get stretched to 100 times their rest length and particles get locked in place because of the huge stretching forces, with minimal reaction to any other forces (such as collisions).

Make sure you apply any transformations before exporting your cloth. This is done differently depending on the 3D editing program you use and your fbx exporter. See this video:
https://www.youtube.com/watch?v=5j7k_tJUSJc

2) - The floor is a collider, set inside a solver that's applied to two different updaters. Not sure if this is intentional, but A) won't have any effect, you don't need colliders to be inside a solver hierarchy B) updating a solver more than once yields undefined results.

3) - The skin radius of your cloth blueprint is set to zero for all particles. This means particles are not allowed to move from their animated position. This is another reason why collisions (or any kind of simulation, for that matter) won't work: particles are fully driven by animation. You should set the skin radius to a larger value, in order to allow cloth to move at all.
Reply
#5
(11-01-2022, 09:40 AM)josemendez Wrote: Hi!

There's tons of issues in your scene, these are the most important ones:

1) - Main issue is that your cloth transform is scaled x100. This means the actual cloth mesh is tiny, and is getting stretched at runtime to be rendered 100 times larger. So when you simulate it, all cloth edges get stretched to 100 times their rest length and particles get locked in place because of the huge stretching forces, with minimal reaction to any other forces (such as collisions).

Make sure you apply any transformations before exporting your cloth. This is done differently depending on the 3D editing program you use and your fbx exporter. See this video:
https://www.youtube.com/watch?v=5j7k_tJUSJc

2) - The floor is a collider, set inside a solver that's applied to two different updaters. Not sure if this is intentional, but A) won't have any effect, you don't need colliders to be inside a solver hierarchy B) updating a solver more than once yields undefined results.

3) - The skin radius of your cloth blueprint is set to zero for all particles. This means particles are not allowed to move from their animated position. This is another reason why collisions (or any kind of simulation, for that matter) won't work: particles are fully driven by animation. You should set the skin radius to a larger value, in order to allow cloth to move at all.

Thanks! I found the problem is the scale.
2) was just a legacy setting I forgot to remove. 3) I set part of the mesh to only follow skin animation.

It took a while for me to correctly export FBX from blender. Some settings were changed in newer versions.The FBS unit setting worked for me, otherwise the armature is always scaled 100 when in unity.
Blender to Unity with Correct Scale and Rotation - YouTube
Reply