Jump to content

connect adjuct pieces doesnt work in foreach

Recommended Posts

I'm not understanding why you need to glue pieces inside foreach. Pieces are already clustered by voronoifractutre sop.


You can't connect pieces which have same name attribute. When you loop through by cluster attribute, all primitive inside have same name that's why it doesn't work.

If you really need to connect it then add a point in the centre of piece inside foreach before connectadjacentpieces sop using add sop. Use centroid expression function for that.



By the way, can you explain it, why you need so?

Link to comment
Share on other sites

FYI if you turn on cluster in voronoifracture sop then all the pieces having same cluster value become single solid piece. No need to glue unless you want pieces to glue with neighbour chunks.

Hi Pradeep,

Well. I didnt need single pieced clusters as one object... therefore i cant use te bullet sop. 

In the the voronoi sop inside the node its deleting the attribute __piece which i now bypassed by renaming.

So i did made a glue constraint based on the attribute in the foreach which glued al my pieces that where showing the same clusters as in the voronoi fracture node.

Link to comment
Share on other sites

Sure. Just create several glue clusters and set some string attribute on them to indicate their cluster value. Then use this vex on attribute wrangle set to operate on prims (its also better to use facet sop before that):

int vt0 = vertexindex(0,@primnum,0);
int vt1 = vertexindex(0,@primnum,1);

int pt0 = vertexpoint(0,vt0);
int pt1 = vertexpoint(0,vt1);

string name0 = point(0,"clustername",pt0);
string name1 = point(0,"clustername",pt1);

Edited by rayman
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...