Jump to content

Recommended Posts


For a tool I've been working on, I need to have a way of finding adjacent faces between the inside of fractured pieces. I want to store this as a primitive attribute, that gives the number of the adjacent primitive.

The way I have done it is by calculating the centroid of each primitive (using getbbox_center) and then iterating through the primitives in a for-each loop, finding the other primitive with the same centroid. (it turned out that the centroids were different by a tiny amount, so I introduced an accuracy value that you can set, and it finds the adjacent primitive within that distance). It then stores this as a primitive attribute.

All seems to be working fine on simple fractures, but as soon as you sent the number of fractures higher than 22, it seems to bug out and all the adjacent faces are incorrect. I have visualized this in the HIP file by having a subnet that draws lines between adjacent faces.

Attached is my HIP file. If anyone has any idea what could be causing this issue, I would be very grateful!

I have also noticed that it seems to be a bit slow to calculate the adjacent faces, so if anyone knows a more efficient way of doing this, I'd also be pleased to hear it.





Edited by Stephen Moroz
Link to comment
Share on other sites

4 hours ago, MENOZ said:

not exactly what you need, but this might give you some ideas ..

Ahh very interesting! I had no idea that you could enable those attributes in the voronoi fracture node. I'll take a look into this, although ideally I would like this to work with boolean shattered geometry as well, which wouldn't have them attributes. Thanks for the link though, it's useful to know! :)

Link to comment
Share on other sites

On 12/24/2017 at 12:16 PM, MENOZ said:

I tried with the idea of using centroids as you suggested and it seems it works.

I've stored the number of the coplanar face on each primitive.


Perfect! Conceptually this is the same as what I did, but you've done it in a much simpler way. Exactly what I needed, thanks!

On 12/24/2017 at 2:34 PM, Shinjipierre said:

You can create a primitive attribute on the cutters and the new pieces will inherit that id


That's a really good idea, I hadn't thought of that. This will certainly come in useful, thanks!

Link to comment
Share on other sites

  • 2 weeks later...

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...