Material nodes course: Cloth self-collisions not as expected

I am following the material nodes course, in lesson 19, creating a cloth shader test object.

Things work smoothly, I get an animation of a plane that falls and stays on a sphere as a piece of cloth. Until I apply the self collisions to the plane used as “cloth”. At this point, the cloth is suddenly corrugated and the animation shows how it “floats” to one side while falling, as if there was a force field applied somewhere from one side (not that I know).

The result is a rough mess instead of a beautifully hanging cloth (with self-collision issues, but fine). Not only this, it starts to fall to one side of the ball and finally flies upwards (!). Here comes a couple of screenshots to show this.

Without self-collision:

With self-collision:

If anyone can tell where I should look for the issue, it will be great, thank you!

1 Like

Apparently the default distance where the self-collision is applied is too big. If I reduce it, it works (until it is too small and it behaves as if it is not there). Apparently, as long as I keep it smaller than the thickness used in the Solidify modifier, the result looks quite convincing.

I am not sure that this is the expected behavior. Is all this normal?

2 Likes

I don’t know if this is normal out of the box or not, but personally, that sounds reasonable to me. Sometimes modifiers don’t play nice with each other, and you can expect things to go haywire very quickly in any physics sim (not just in Blender) if there is a chance of self-intersection, which I’m sure is what caused the egg-carton-like pattern in your second screenshot (the “floating” is also a classic hallmark). Default settings for self-collision distance probably wouldn’t be able to account for your Solidify modifier on their own because that’s separate, so it makes sense that you would need to change something. Looks to me like you encountered a config problem and then solved it, simple as that =)

2 Likes

There MUST be a gap (distance) between the active and passive object to detect collision!

Remember this.
If a active vertex has the same coordinate as the passive vertex. How does Blender know how to repel the active vertex. Or how to know if the vertex didn’t pass the other one.

For smoothed faces this is even more difficult, or mesh with the solidify object. You could increase the density of the mesh to have more control vertices. to recognize a collision.

  • I would animate without the solidify, then bake the animation, then add the solidify modifier .
    I think for none solid faces (a plane) you need to have both sides of the face visible (normals on both sides),.
1 Like

Yes, I understand. The surprise was that I was using the same sizes and settings as the video suggests and did not expect all this. The aim of that part of the lesson is to make a totally static sample to test fabric textures on it, so there is not much information about the cloth properties themselves (if it worked, it would have been enough :grin:).

Just for information, the issues also happen to the mesh without any other modifiers, but the messy image was not too good to show anything in the screenshots.

It is solved now; now I have an even more weird case, where I replace the sphere with another obstacle and the “cloth” plane still collides with a sphere and hangs in the open space, way over any collision distance. I guess it has to do with how Blender deals with possible collisions from a longer range (and I am sure there are parameters for that too, which I still don’t know), but for the moment I left solving that mystery for another day.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms