Jump to content

How do I delete outer pieces from voronoi fracture?

Recommended Posts

Hi, I want to select the outer pieces and delete them, I tried to use the delete node and set the Group to ‘outside’ but this only deletes the outer faces rather than the whole piece.
To do this, I tried to create a group of outer pieces selecting manually the primitives (faces). If I do it manually it'll work. for that just need to drop a group node and start selecting primitives from outside. In this way, it'll take forever to select outer pieces of a large scale model. I did not find any other sufficient way to do this!
also I found this file from sidefx which works exactly what I want but did not get how it is working!

Problem_Voronoi Frac_pieces.gif

Problem_Voronoi Frac_pieces2.gif

Deleting Outside Pieces.hip

Link to comment
Share on other sites

Ah, yes I could see how that could be difficult to understand.

The foreach loop is running on each named piece, that is the pieces that separate when we use a exploded view SOP. Look in the spreadsheet under the primitive attribute "name". All of those with the same name are processed together at once.

The loop merges each iteration with the gather method. This means that all the outputs are put together at the end instead of just the last one.

Inside that loop is a single switch. That switch asks (with the nprimsgroup function) if there are any primitives in the group called "outside". If there are at least one then that currently processed piece is swapped for the null. That "-1" and the spare Input 0 is really weird to me. I would just use opinputpath(".",0), but I can see how that would be a little less procedural.

The compile block just makes the whole thing run faster and for demonstration purposes so we can ignore it here. But it is necessary if we're actually dealing with a lot of geometry, and shattered objects can get really big.


  • Thanks 1
Link to comment
Share on other sites

Thank you so much! :lol:

All my doubts about that code are now cleared! 


I was trying to delete the outer pieces using pack node and to some extent it worked but some of the pieces on top are NOT getting deleted at all! 

I don't know if I'm doing right or wrong with the pack node or the delete node.

Any suggestion would be really helpful.


Problem_Voronoi Frac_top not getting deleted.gif

Link to comment
Share on other sites

In the 3d viewport, there is a "Select Whole Geometry" "Connected Geometry" option after you press the mouse looking icon to enable the menu.  Then you can just click the pieces you want to delete without the need of packing.

Edited by bubblepins
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...