Make 2 cloth systems collide instead of intersecting each other.

I’ve got 3 meshes, 1 a rigged biped with collide enabled and on the same layer 2 meshes with cloth enabled. The issue is both the cloth systems are not colliding with each other even though they collide with the biped perfectly they pass through each other.

Any help would be much appreciated.
Alv.

For 2.4x:

How to approach this question depends a lot on how the biped mesh and the cloth meshes are set up relative to one another. It’s also helpful to know if the type of cloth (the settings) for the two Cloth objects is the same.

I’m not sure if it can be done this way, but you might first try setting Collision for each of the Cloth objects in the same manner you do for the biped mesh.

If that doesn’t work, and the Cloth objects share common settings, think about making it all one mesh and using Cloth Self-Collision. It’s not 100% perfect but it can be useful in some situations.

Third idea is to make specially-shaped collision objects that only approximate actual collision between the two cloth objects, but which also will prevent intersections. The collision objects can be non-rendering.

I tried setting collision for each object but got a dependency cycle error and the cloth simulation went haywire. I considered joining the 2 cloth meshes but they need to be pinned to the armature at different points, one at the shoulder and the other at the waist didn’t go that route.

Your third idea never occurred to me, some kind of invisible belt around the problem area. Thanks for taking the time to reply, perhaps I’ll wake up in the morning with a solution now you’ve given me something to think about.

What I have done in the past in this case is bake the cloth simulation for one cloth mesh and then make it a collision object for the other. You could also export it as an mdd file and the import that as a vertex animation to RVKs. Both scripts are found in the file menu. I think that is the way I did it in Blender. This is a carry over from a technique I developed in LightWave.

Essentially the idea is you break your simulation up into layers. Just like you would for composting. Only for physics. This way you can control each aspect of the simulation separately and not rely on the computer to calculate a large complex set up all at once. Asking for disaster in some cases and long hours or frustration at best.

@ Alv – your pinning vertex group can be weighted to provide separate pinning points if needed.

@ Richard Culver – good approach! The cloth sim->RVK method can be time consuming but it is effective, I’ve been using it a lot with good results. I agree that a large and complex system would be challenging to sim at one go, but a lot depends on how complex the cloth objects are and how much interaction there might be between the two different portions.

Chipmasque/Richard

Thank you both for helping out. I’ve got some options now, I’m currently testing out the RVK method.

I’m a bit unsure how to pin if I join the cloth to one mesh though if I go that route instead of RVK. Say I have a rigged human with cloak mesh pinned to her shoulders with cloth modifier and a skirt pinned to her hips as separate mesh and cloth modifier. How could I join them as one mesh and still pin them to different bones?

You can do it the same way as any mesh gets ‘pinned’ to different bones; using an armature modifier with vertex weights for each bone. The pinning group for the cloth modifier should be the union of all the groups driven by individual bones, i.e., it contains all the vertices that are controlled directly by the armature rather than allowed to evolve via the cloth simulation.

Best wishes,
Matthew

That is correct. And in fact, bone weights or not, simply, the pined group follows the bones. So as one object, you’d have two areas defined in one pinned group. Each area would follow the influence the bone has on the vertexes by way of weights or envelopes etc. So the bones on the neck would influence the cloak pinned group and the bones in the hip those vertexes and so on.

Layered clothing is the reason I was using the RVK method. You can do quite a bit this way. Simpler setups might not require it as mentioned. But experiment with it and see what works best.

The word “pinned” tends to imply an active attachment, but in fact the pinning group is more of a passive/reductive modulator, in that it reduces the influence of the Cloth modifier based on the pinning group vertex weights. Unpinned vertices are free to act completely as cloth. Pinning weights increasing upward gradually reduce the cloth effect for that portion of the mesh, until at 1.0, that part of the mesh doesn’t act like cloth at all and is fully free to be modulated by other influences, such as other bones, or a parenting relationship, or no other influence at all if that’s what works for the situation.

Good point. I have not had much success with weighing in LightWave using cloth. Might be different in Blender. But I usually just leave it at Default. I’ll have to play with that more.

But in any case. To be clear. To make a character work with cloth that has pinned points you have to add the Armature modifier to the Cloth object also. Use the same rig as the character for it and that is how you can get the points to follow the character. Otherwise they will just stay put. It also at the same time can solve the other issue you are facing. But either way, you’ll be setting it up like that.

This is true if you want the pinned portions of the cloth mesh to move under weighted armature influence the way the body does, but you can also just make the cloth mesh a child of the armature or one of its bones in some circumstances. The costume pants my Kata character wears is parented only by the Pelvis bone and has no vertex groups for other bones. No Armature modifier, either. The belt and upper portion of the pants (roughly bikini-shaped) basically acts like a rigid object, with the pants leg pin-weighted progressively less down its length. I had tried giving other bones some influence, especially in the buttox area, but was getting inconsistent results so I scrapped that. Since I’m converting the cloth to RVKs for collision cleanup, it’s no problem doing some adjustments to the upper portion as well when needed.

Yeah you’re right. I have never tried that. Suppose it works obviously. I have also used vertex parent which can work in come cases also come to think of it.

Thanks for the info on those sets ups. That gives me some ideas.

I think I’ve misunderstood cloth pinning. I thought that you could pin your cloth to an armature but only got to pick one vertex group from the armature hence one bone.

Are you saying that the cloth object can have multiple vertex groups assigned to the same named bones of an armature and that the pinning vertex group is nothing to do with the bones. The pinning vertex group is just there to mark which part of the cloth is influenced by the armature and which is and which isn’t.

So the pinning vertex group doesn’t even have to exist in the armature it’s just there to do a union with the others?

Vertex weighting is used by a number of operations other than Armature control. Only those vertex groups (VGs) associated with bones (via their names) will be influenced by the Armature. You can have any number of other VGs for other purposes – soft body and cloth simulation, multi-material segregation, even just plain convenience – I often make VGs of portions of complex meshes that are then easily selected for hiding or other operations.

Pinning need not be to a bone, that’s just a common option. You can use any object as a Cloth object’s parent, and it will follow it around like any other child object. The pinning group will determine what part of the Cloth object “sticks” to the parent object because it doesn’t act like cloth (hence the label “pinning”) but otherwise is not used in the parent/child relationship. Pretty sure Constraints will provide similar control options.

A Cloth object can have VGs that are under Armature control as long as the pinning VG (which need not be named for a bone or be otherwise associated with the Armature) is weighted to allow other influences, i.e. with weights greater than zero (no pinning = Cloth dominates the mesh action).

Order of the Modifiers stack is also important! AFAIK Cloth should always be at the top since it needs to be evaluated before Armature, Subsurf or other modifiers if it’s to work most efficiently, but there may be cases where it would be better following another modifier.

Well I’ve got this solved and I’ve learned a lot in the process. Thanks to everyone who commented, it’s been a huge help and not only solved this problem but given me more options to make my animations even better.