Jump to content

Kill isolated particles


Navneet Arora

Recommended Posts

  • 7 months later...

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
Link to comment
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.

 

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