Jump to content

flip reseeding dont interpolate but set to value


ino

Recommended Posts

is there some way to set certain attributes of reseeded flip particles to a value or to 0

or to know by some attribute which particles are created by reseeding 

i constantly pumping in particles by my self so simply checking the id (its bigger the the originally created amount) wont work

i probably could create some routine to catch the seeded particles by recording the biggest id check how many particles i inject .... on each frame

but i wonder if there is a build in way i did not find till now

 

 

Link to comment
Share on other sites

here is a simple solution without any solver tweaks:
- create a random int attribute per point and convert it to float:

f@r=int(rand(@ptnum)*1000);

eg: r = 153.0
- on the FLIP solver/reseeding/interpolate attributes, add the attribute r
- as a post sim process, you can compare the original attributes and interpolated ones, they will have a decimal value >0
eg: r = 154.462

if(f@r-int(f@r)>0)@Cd={1,0,0};

in practice, this isn't 100% perfect so you can use a vector attribute instead, have a look at the attached HIP
separate_reseeded_bunker_001.hipnc

  • Like 3
Link to comment
Share on other sites

:) i had sort of the same idea 

i have an attribute which indicates a group membership which is currently an int (1 or 0)

i basically just interested that i dont get additional of this kind of particles so i simply switch it to a float and anything isnt exactly 1 is 0 

Link to comment
Share on other sites

That is interesting. So, you could generate whitewater only on reseeded particles, if you separate them before the fluid_compress node. Or surface each set, a little differently.

reseed_surface.jpg

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