Jump to content

Select the outer chunks of voronoi fracture


dunken

Recommended Posts

Hi,

I run a voronoi fracture on a cube mesh and I want to delete the outer chunks and keep the inner ones, I tried to use a blast node and set the Group to "outside" but this only removes the outer faces rather the the the whole chunk,

So is there a way to select the outer chunks of voronoi fracture?

Thank you

Link to comment
Share on other sites

  • 2 years later...
On 13/8/2017 at 5:56 PM, f1480187 said:

remove_outside_pieces.png.2766cf9326f84efab8f4061729ab2f6e.pngremove_outside_pieces_wireframe.png.4b5b59d0815db3e5ae357c177194bf5a.png

You can modify blast-way to something like this.

remove_outside_pieces.hipnc

hei @f1480187, nice solution, can u explain to me how it actually works? i mean, are you so kind to try to explain to me the whole foreach loop and what the switch is checking? i cant understand the role of the null obj

thanks,

Link to comment
Share on other sites

well I see @f1480187 last visited the forum months ago...prolly snowed under with work. so i'll try to put a few words together:

in the loop, for each chunk, let's say the chunk has X prims (or faces), it does an overhead step that is delete the outside prim, if there was any outside faces, the prim count would be X - Y. The blast just stays unconnected to anything which may be confusing at first but it's just an overhead step that should be done for each chunk.

Then the switch would inspect each chunk, get the count of faces: nprims(1), ie. using the second input not first.

Then it compares nprims(1)...say is X to the result of blast but remember from above the new count would be X-Y

So X == X- Y is only possible when Y = 0...ie....there is NO outside faces for that chunk.

the result of the test is either 0 or 1 for true or false, which conveniently tells the switch which input to use, the effect is the loop is taking ONLY internal chunks.

(if Y was non zero, then X cannot be equal to the blast count, so the switch is false, ie. the chunk we are processing contains some outside faces....don't take it, use the null instead)

 

  • Like 1
Link to comment
Share on other sites

there`s another efficient way (from Entagma) 

1. in Voronoi - turn on Exterior Group "Outside"

2. in Foreach ( on Prims) - create Detail attribute i@del = 0;

3. if prim is in Outside group, then set @del =1 to whole Detail 

4. promote @del from Detail to Prim

5. Blast

 

1.jpg

Edited by maiden666
  • 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.

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