Cakemix

Hi,

I'm trying to create a spiderweb that is made of multiple curves that has random thicknesses and specific areas. I generated particles in the specific areas where I wanted the thickness to be and I'm planning to use attribute transfer to transfer weights from the particles to the curve vertices. How can I use Attribute Transfer node on a selection of a few dozen curves that need to be separate curves and cannot be joined together into a single curve?

Thanks
Jesse Thorp

noizfactory
I doubt its possible to use one attributeTransfer node for all the curves since they are independent shape nodes and attributeTransfer only has a single inputGeomtery connection. You will need to create a node per curve but you can use the same boundingObject node. However, you could also combine the point positions from the curve into a single large array and then use pointCloudToCurve and one attributeTransfer. I have attached an example file for this. And here is a MEL snippet that can ease the node creation and connection for multiple curves.

 
string $curves[] = `listRelatives -s`;
string $cmbArr = `createNode "combineArrays"`;
string $pc2Crv = `createNode "pointCloudToCurve"`;
int $i;
for($i=0;$i<size($curves);$i++)
{
string $ptAttr2Arr = `createNode "pointAttributeToArray"`;
setAttr ($ptAttr2Arr + ".pointPosition") 1;
connectAttr ($curves[$i] + ".worldSpace[0]") ($ptAttr2Arr + ".inGeometry");
connectAttr -f ($ptAttr2Arr + ".outPositionPP") ($cmbArr + ".inArrays[" + $i + "]");
}
connectAttr -f ($cmbArr + ".outArray") ($pc2Crv + ".inArray");
 
Reply 0 0
Cakemix
Thank you! Great example. 

One question. Is there any way to combine the curves back with a pointCloudTo MultiCurve?
Reply 0 0
noizfactory
pointCloudToMultiCurve would actually do the reverse of what you want. If you need to combine the curves into one then in my example above, you can pipe pointCloudToCurve.outCurve back into a curveShape.create attribute. However, this will still not give you the curve you want since it will create connections between all the points in the point cloud.
Reply 0 0
Reply