Jump to content
Navneet Arora

Kill isolated particles

Recommended Posts

Hey guys,

Any way of killing isolated particles? Like we do in realflow . I am trying to do a point cloud lookup but not able to figure out how it would work. Any help would be appreciated

Share this post


Link to post
Share on other sites

without grouping

int handle = pcopen(0, "P", @P, radius, 5);
if (pcnumfound(handle) == 1)
  removepoint(0, @ptnum);
  • Like 2

Share this post


Link to post
Share on other sites

You can use a POP Proximity and POP Kill node to handle this. Less headache than using a wrangle and accomplishes the same thing.  

Share this post


Link to post
Share on other sites

I could really use a hand implementing this in a VOP or pointWrangle node.  I tried putting the VEX (?) code above in a pointWrangle, but got an error saying that pcopen was unrecognized.  Anyone?

Share this post


Link to post
Share on other sites

The reason why it's not working is because you need to declare a variable called radius (or have a number instead of the word "radius"). You just need to add one line before that:

float radius = 0.1;
int handle = pcopen(0, "P", @P, radius, 5);
if (pcnumfound(handle) == 1)
  removepoint(0, @ptnum);

 

You could also set it to float radius = ch("radius"); to create a parameter and be able to control it through a slider. I attached an example using Origin's code in case you want to see how to apply it.

kill_isolated_particles.hipnc

  • Like 1

Share this post


Link to post
Share on other sites

HI - thanks.  I figured that out about the radius.  Now I'm just trying to make it work in a simple scene.  Your file works perfectly.  I was trying to set the same thing up in a flip autodop network, but no luck.  I tried changing the last line inside the if statement to "dead = 1":

 

float radius = .004;
int handle = pcopen(0, "P", @P, radius, 5);
if (pcnumfound(handle) <= 4)
  dead = 1;

 

 

...but no luck.  I tried it after the source volume for the emitter, and in the particle velocity input of the flip solver.  Any ideas on doing it in a flip sim?

 

I tried turning on the droplet tab and killing droplets, but it isn't behaving as expected.  I've got some very lonely particles that refuse to die, but the droplet function did thin out a lot of areas that didn't need it, imho.

 

Share this post


Link to post
Share on other sites

I got it working before the meshing, after the "import particle".  I'd like to get it working in the sim, but at least something good is happening. :) 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×