Adding area attributes for each piece primitive to new attirbute

   6608   4   1
User Avatar
Member
11 posts
Joined: 12月 2016
Offline
Hello, it's my first post here, I have tried to find an answer to this, but I couldn't (if I'm wrong please paste the link to topic/tutorial/ anything)

But continuing, I'm trying to delete small pieces from boolean fracture. I'm measuring area for each piece prim and I would like to sum all of area in new attribute, then if it is to small it will be deleted. Down below is a picture.
Does anybody know how to sum all area attributes down horizontally. My friend told me that there was a tutorial about that, but I can't find it.

Also plus question, does someone knows if it is possible to do a GROUP for each piece like in Vornoi Fracture Setiing “Create Otput Groups” ?


User Avatar
Member
1743 posts
Joined: 3月 2012
Offline
A popular workflow seems to be to identify pieces with a Connectivity SOP, which creates a primitive attribute assigning numbers to the pieces, and then converting the pieces to polygon soup primitives with a PolySoup SOP. (It's not at all what I expected people would use polygon soups for when they were added, but I'm glad they've come in handy for this.) Then, the Measure SOP can compute the volume of each piece, and anything smaller than a specified volume can be deleted. This is what the attached example does. Hopefully that helps!

Attachments:
BooleanDeleteSmallPieces.hip (77.6 KB)

Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
11 posts
Joined: 12月 2016
Offline
Thank you, this is very helpfull!
User Avatar
Member
4495 posts
Joined: 2月 2012
Offline
I made an HDA for this that deletes prims by area individually, by connectivity or keeping the largest N pieces, with the ability to invert, keep points, etc:

Attachments:
DeletePrimitivesByArea_SOP_Animatrix.otl (20.3 KB)

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
1 posts
Joined: 4月 2017
Offline
Hello,

I have created a tool, that you can use to remove very small pieces, by consolidating them with other pieces. - So no holes get created.

As the algorithm is strongly parallelized, the tool works quickly and reliably even with complex geometry.

Graph Coloring is used to make this possible.

I made a tutorial about this tool. - Alternatively you can also just download the tool from the video description below.

https://www.youtube.com/watch?v=JEOuC3ij9pc [www.youtube.com]
  • Quick Links