Jump to content

Delete particles in non dense areas


Recommended Posts

Hi everyone,

I am using popadvectbyvolumes to generate millions of particles on my smoke shockwave.

As you can see there are a few particles in the center, not much, but it doesn't look that nice because they're overall position is a bit too far away from all the main particles.

Overall these particles look like artifacts and I would like to remove them.

Is there a clever, automatic way, how I can only remove these few particles that don't have many other particles around them, so that are not contributing to the dense look? Maybe there's a render setting trick? I realized that decreasing pscale and increasing overall amount of particles somehow gets me where I want, but it's extremly slow and unefficent. Hopefully there's a better way. Thank you in advance!

Shockwave.Redshift_ROP1_00035.jpg

Link to comment
Share on other sites

You may be able to drop down an AttributeWrangle after your popnet.

Use the neighbors function to return the neighboring point count for each point (this could become expensive in processing time for large counts)
https://www.sidefx.com/docs/houdini/vex/functions/nearpoints.html

Something like this would remove points with less than ten neighbors.

int pts[] =  nearpoints(0, @ptnum, 1000); 
float threshold = 10;   //ch("threshold");
if (len(pts)<threshold){removepoint(0,@ptnum,0);}

Another approach might be to drop in a bounding object and group those stray points in the center. Then you could delete by group.

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