PDA

View Full Version : Can nCloth self-push become self-attract?


Brocknoviatch
08-13-2007, 05:26 PM
I was wondering if anyone knows how to get a ncloth object to be attracted to itself?
I tried changing the self-push attribute to have a new min of -1 instead of 0 with the editAttribute mel command, but it wouldn't let me.

I know merge vertices will do it, but I don't want the verts to actually merge nor do I want the verts to suddenly snap.

Does anyone have any ideas?

Duncan?

Duncan
08-13-2007, 08:21 PM
Use a constraint and set the restLengthScale to zero on the constraint node.

Duncan

Brocknoviatch
08-14-2007, 10:28 AM
Thanks Duncan!

Once the constraint is broken is there a way to get it to reconnect with closet vertex?

Duncan
08-14-2007, 03:52 PM
Yes. If you key the disable of the constraint on/off it will reform links based on the current relative positions. (note that with rest length scale at zero each of the links will attract)

You may wish to try the "Within Max Distance" connection method on the constraint. This can create many to many links instead of just the nearest pairs.

For making two separate nCloths objects stick together a useful technique is to do a slide on surface constraint with restlength scale = 0 and strengthDropoff set such that the constraint only is in effect close to the surface. TangentStrength needs to be zero and localCollide should also be off. Note that this technque cannot be used to stick a cloth to its self, however.

Duncan

CGTalk Moderation
08-14-2007, 03:52 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.