Maurizio1974
Hi Guys

I am trying to drive the 'inputMeshAttract' vertex map of a nCloth with an attribute transfer, but when I try to connect the 'outWeightPP' to the 'inputAttractPerVertex' I get this error

connectAttr -f attributeTransfer1.outWeightPP nClothShape1.inputAttractPerVertex;
// Warning: line 0: Connection from attributeTransfer1.outWeightPP ---> nClothShape1.inputAttractPerVertex was not allowed.  You can only connect to a per-particle attribute from another per-particle attribute on the same shape or from an arrayMapper or particleAgeMapper node.  This may cause subsequent connections to fail during duplication with the "-ic" flag. //
// Error: line 0: Connection not made: 'attributeTransfer1.outWeightPP' -> 'nClothShape1.inputAttractPerVertex'.  Destination node will not allow the connection. //
// Error: line 0: The attribute 'attributeTransfer1.outWeightPP' cannot be connected to 'nClothShape1.inputAttractPerVertex'. //


any ideas ?

Thank you in advance
Reply 0 0
pshipkov
The ncloth node is derived from the particle class. Much like the particle node it does not allow input connections to its array attributes. Pretty bad. I remember talking to somebody at autodesk and developers agreed that this may be resolved at some point later. I personally think the chance for that is very small.
There are some ways around that. Search around and online for the answer. The exact methodoly escapes me right now. Not i front of maya.
Reply 0 0
djx
You can do it as suggested in the error message. That is, use an arrayMapper. So instead of trying to connect your attribute transfer directly to the inputAttract, connect it to the arrayMapper. You'll also need a ramp connected (this is where the values actually come from). And you'll need to normalize the input to the arrayMapper so that you dont cause the ramp mapping to wrap.

Having said that, I did notice some performance problems doing this. I had better results using a matching mesh constraint. When you use one of them, a component node is created and you can map the per-vertex values there.

I posted an example here http://soup-dev.websitetoolbox.com/post/pointNodecomputeVelocityarrayDataContainerarrayMapper-example-6021298 (dont be misled by the name, it uses the technique I described above)

David
Reply 0 0
Maurizio1974
Thank you for the reply I will try to see what I come up with

Ciao
Reply 0 0
Reply