Cluster Weight Map Question


#1

Hi everyone,

Is there a way to use a 2d texture node like a noise or fractal as the weight attribute map for a cluster or any deformer for that matter? The default options only seems to allow outside files. This is not an issue, but I feel like I should be able to use a 2d texture here. I have tried connecting the outAlpha and outColor of a 2d noise texture node to a couple places in the cluster node itself, mainly, the weightList which seems to have the largest visible effect on the mesh, but still not what I am looking for I think.

The reason I am trying to do this is because I am trying to produce procedural animation effects within the cluster, and other deformer regions on a mesh. My thought process is I can use the texture node connected to a noise or fractal to create animation, but when you try and add a weight attribute map to a deformer(ie. cluster) I can not find that connection anywhere in maya, therefore I can not animate through the standard map. Anyway thanks for the help.

Rick


#2

Hi Rick,
I haven’t tried this out yet but you may want to put your texture on a nurbs surface with uvs then you could use the colorAtPoint command to get the alpha from the nurbs at any uv and maybe get it to whatever you want the texture to drive via an expression or something else.

Suppose the alpha at a uv of interest is 0.5 and the cluster (cluster1) is effecting just one vertex. Then i think some mel code to get the cluster to change weight on this single vertex is something like

percent -v 0.5 cluster1.weightList[0].weights[0];

If the cluster is effecting lots of vertices, an idea (that may not work), is to find the nearestPointOnMesh from a given uv to the mesh with deformer.

So if uv of interest is u=0.5, v= 0.5 and texture node is texture1
Then to get the alpha at this uv
$alpha = colorAtPoint -u 0.5 -v 0.5 texture1;

And to set the cluster weight for the vertex nearest to uv (0.5,0.5) may be something like
percent -v $alpha cluster1.weightList[0].weights[$nearestVertexIndex];

I may have made some mistakes in this.

Hope this helps,
Regards,
Nate

ps: Maulik Katria has a nice explanation on the clusters weightList (leftbulb dot blogspot dot com)


#3

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.