nCloth constraint not sticking?


#1

Hi,

I am working on a bat wing, and have run into a problem… i have my joint setup for the wing… now i am creating transform constraints for the corresponding (rigid) vertices of the cloth object, which represents the flappy parts of the wing. the problem is, the points do not stick to the joint, but always trail behind…

what can i do to solve that???

thanks


#2

hmmmm, so if i drop my play by framerate to .248 it works… lets see how that will do when rendering


#3

You could instead simply increase the constraint strength and (optionally) nucleus substeps. The transform constraint is by default like a slighly stretchy spring, not totally fixed.

Also note that transform constraints currently have a bug where the position is not interpolated during substeps. Normally this is not too noticable but can create a jerky motion at times. One could instead constrain to a mesh or mesh components(which does interpolate during substeps). Also with that kind of constraint one can make the constraintMethod “weld”, which attempts to lock the point with no stretching.

Duncan

#4

hmmm,

my constraint is set to weld, I increased the strength to 1000 raised the nucleus substeps, butr its still doint the same thing :frowning:


#5

Strange. Are you parenting the tranform constraint to your joint transform?

Duncan


#6

Yes, I am parenting. And the locator representing my constraint is at the position where it should be, but the cloth mesh isn’t…


#7

It would be good if you could post a simple workflow or setup that shows the problem. (also submitting a bug file to Autodesk would be helpful)

Duncan


#8

Thanks man,

HERE is a link to the simplyfied scene…

thanks for taking the time


#9

I see the problem( not a bug ). Your joints have moved by frame 1, which is also the startframe for the simulation. The constraint sets up its relationships relative to the positions at the start frame. Thus it preserves the relationship of the offset at frame 1 for the rest of the animation.

To fix, simply make the simulation startframe zero( under nucleus time attributes).

Duncan


#10

thanks man, that worked like a charm…


#11

Just a couple of other observations… You are using rigidity which could lead to artifacts in a deforming shape like a wing. Bend resistance is generally better, although I think you may have resorted to rigidity because you have a range of edge lengths with some skinny quads on the trailing edge of the wing. Keep in mind that the dynamics is computed per link, so having uniform edge lengths is desirable. Ideally for simulation purposes your quads would all be squares of the same size, (although this would be topologically impossible).

Some other things to try… lower mass on the wings to have more drag effect (with enough drag you will likely not need much damp). The restLengthScale could be less that 1 if you want the start position of the wings to be somewhat stretched and under tension. They would then also fold or wrinkle less if the wings were closed. The substeps does not interpolate transform constraint positions, and I think this is causing a snapping in the animation. Making the substeps 1 in this case can help. Alternately you could drive a simple “bone” mesh with the skeleton(using a simple bind) and then constrain to this mesh. One thus also only requires a single constraint. If you had done a poly combine on the input mesh for the cloth you could also use just a single cloth node to handle both wings( although then you would definitely not want to use the rigidty attribute) .

 Duncan

#12

thanks again, i really appreciate all of your input!


#13

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.