Jump to content

inject single particle to flip on event


ino

Recommended Posts

is there some way to add a defined number of particles to a flip fluid?

a have a pop which generates some particles if this particles meet some criteria i want to add them to a flip 

a popsource will add them over and over again i need them just one time.

lets say i have 100 pop particles with a random attribute Q (1..100) if the frame number is the same as Q i want them to be added to the flip

 

Link to comment
Share on other sites

Hi,

I took a shot at this, threw up a scene to show you what I found to work.

What I have done is,

1. Put the particles I want in flip into a group "particles"

2. Delete the particles the next solve step.

 

3. Import the pop particles in a sopnet delete everything but the "particles"

4. Use that sopnet for importing to flip.

 

Hope that helps

pop_to_flip.gif.8a8c517678bcf75780ba3f8f2476dd00.gif

pop_to_flip.hiplc

  • Like 1
Link to comment
Share on other sites

thank you exactly what i was looking for!

where i am stuck now is i cant do it exactly like you and would need to put the points from an existing group to a new one to be deleted

i have put this for testing in the popgroup vex 

setpointgroup(0, "XY", @ptnum, 1);
setpointattrib(0, "X", @ptnum, inpointgroup(0, "XY", @ptnum));

in the geosheet X is 0 on all points how can that be when i just put them in 1 line prior!

that they are in group XY is shown correctly in the geosheet

 

 

Link to comment
Share on other sites

I'm not 100% sure but I don't think you can create groups like that in the POP group node, should work in popwrangle with the input 0 set to myself.

This works in the setup I created, just added another POP group node with this inside.

5d2e6bef0d068_Screenshotfrom2019-07-1702-28-48.png.a452cdd429ed1f7556187d55336ebff9.png

Edited by AslakKS
Link to comment
Share on other sites

thank you!

the group creation works just fine like this in a popgroup but it was just ment as a test 

what i was missing is how to check if the particle is or isnt in the group

was trying to use  inpointgroup(0, "groupname", @ptnum) which by the documentation should work but does not or i missing something

@group_groupname does the trick

@group_groupname <> inpointgroup(0, "groupname", @ptnum) should by equivalent but one works the other not 

just starting so missing a lot of things

 

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