Add pieces into intersecting pieces

   1026   1   0
User Avatar
Member
6 posts
Joined: Feb. 2020
Offline
Hey! I would like to add additional geo with an name attribute to already existing pieces saved in the "name" attribute. only when the additional geometry is intersecting it should get the same name. if its intersecting with multiple pieces, then it should not be added.



Gray geo is new, it should be added to the intersecting colored pieces.

I tried a couple of things already, for example with an RBD cluster node. but the problem is, this is checking the distance between the centerpoints which is not the result I am looking for.
would be awesome if somebody knows the answer. thank you in advance!


Attached you can find a file to test with:
Edited by MaGiiCall - Dec. 15, 2021 08:58:40

Attachments:
pieces.png (625.9 KB)
add_pieces_into_intersecting_pieces.hip (644.6 KB)
pieces2.png (582.7 KB)

User Avatar
Member
6 posts
Joined: Feb. 2020
Offline
In the end I figured it out. Just to come back here, maybe someone will need it in the future.
The approuch I used is pretty simple. I basically only use an attribute transfer to transfer the name/cluster attribute. To make it a bit more accurate I add more divisions to the geometry.


My goal was to use it after the rbdmaterialfracture to add some small pieces to the existing clusters to reduce the amount of simulated pieces.

Attached you can find a small example scene with the .hda I am using now.

Attachments:
cluster_to_closest.gif (636.6 KB)
add_to_closest_cluster.hip (1.9 MB)

  • Quick Links