View Full Version : Constrain nCloth by texture

01-24-2011, 01:58 PM
Is there anyway I can constrain the nCloth as if i where using a transformconstrain. but apply it with a texture (white = fully constrained; black = no constrain) ??

I've tried to apply a nconstraint->transform and painted a black n white texturemap with "Paint properties by texture map-> Strength" with no luck... the white parts are still being unconstrained.

What am i doing wrong?

thanks /F

01-24-2011, 03:11 PM
works fine here...

to test, make a ncloth plane, then add a transform constraint.
then open hypershader and select the nComponent1 node and change strength map type to Per-Vert....
then select the plane and the dynamic constraint, go to paint vertex properties for strength, flood, paint, etc...

should work fine... for verts, or a texture, even can use ramps...

i think the problem that most people have is they dont get that you need to select both the plane and constraint and you will see your painting on the plane, not really the verts of the constraint... lol that would be tough ;)

01-24-2011, 03:55 PM
Thanks Howard.
slightly diffent tequnique than what i used before. However it doesnt work for me.
after i have created a constrain the plane doesn't move (good, it shouldnt). but at the moment i change from texture to Per-Vertex the constrain is loosing its power.

When i select the plane and then the dynamicConstraint1 and then Paint properties by vertex map->Strength i can see that its all flooded in white (ie. it should work) it doesnt matter if i re-flood with 1.0 white or even 10 white. the constrain is gaining no power at all.

Am i missing a step?


01-24-2011, 05:36 PM
tough to tell, post a scene... what version of Maya?

01-24-2011, 06:39 PM
Right now im just testing it on a simple 10x10 plane.

01-24-2011, 08:15 PM
hmmm seems to be a bug (lol or I just cant remember reading about it, although I bet if you did a search here for ncloth constraints this may have been mentioned)

you need to select the verts of the plane before making the constraint...sorry ;)

01-24-2011, 08:35 PM
Thanks Howard for taking your time helping me. It finally works!

this specific "problem" is somewhat unclear in the manual, becuse when you're up to a point that you want to use eg. a texture map to drive the effect; or Paint the effect; of course you are going to try it on the whole mesh. ah well.. thanks!

01-24-2011, 08:50 PM
no worries :)

seems you need to change the Element and Component if you just select the whole object, as it doesnt know you want to use points.... so I guess not a bug, just not well documented? who knows, I never read those things ;)

any time a constraint wont work, go into the ncomponent node and try changing from per-vert to none or texture and back, after youve done any changes to Element or Component type...

CGTalk Moderation
01-24-2011, 08:50 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.