Filter Split in Half

Discussions about the use of Realflow
Post Reply
jumax
Posts: 36
Joined: Mon Jul 20, 2009 11:35 am

Filter Split in Half

Post by jumax » Wed Apr 10, 2019 4:44 pm

Hi all

This should be real simple but its doing my head in, I have some particles going down a spline and when they reach a certain point it needs to go down another path. I have setup another spline for this and what I want to do is use a bounded filter to send half the particles to another to domain2 where it has a new dpline to move it along. I have tried setting it to filter by speed or random position but I always get an uneven distribution it dosent have to perfect but would be great to get close.

Cheers

jumax
Posts: 36
Joined: Mon Jul 20, 2009 11:35 am

Re: Filter Split in Half

Post by jumax » Wed Apr 10, 2019 5:24 pm

If we could split by even or odd Ids that would be helpful but I am zero at scripting :|

jumax
Posts: 36
Joined: Mon Jul 20, 2009 11:35 am

Re: Filter Split in Half

Post by jumax » Thu Apr 11, 2019 3:26 pm

after some digging on the forum got this far


(particle.id>20000 & particle.id<30000)

It works but still not elegant would be great to get random values in this range

Forester
Posts: 153
Joined: Mon Mar 15, 2010 4:36 am
Contact:

Re: Filter Split in Half

Post by Forester » Fri Apr 12, 2019 3:27 pm

When I have this kind of problem, I create two filter deamons. One for moving the original particles to the second domain, and one for moving the particles in the second domain back to the first domain. I focus on the "Random" setting in each filter, and adjust the Random values in each filter until I get a good balance of particles between the two domains. Since Realflow is calculating both particle transfers at each step, the net "look" at each step can be that exactly half of the particles are flowing into each domain.

This kind of technique is what you would use when pouring champagne into a glass, for example. You want some of the champagne to turn to foam, but other of the champagne to remain as the liquid. Or you want the foam to quickly turn to champagne again. So, you adjust the two Random setting values until you get just the look you want.

But, this technique will work equally well for your two spline situation.

Is this understandable? If not, I can explain further.
Windows 7 Pro 64 - Realflow 10.1.2.0162 (Nov 2017 patched) Standard Version

jumax
Posts: 36
Joined: Mon Jul 20, 2009 11:35 am

Re: Filter Split in Half

Post by jumax » Mon Apr 15, 2019 9:09 am

Hi

Yes I understand, with the expression that i am using playing the values I get a decent result as well but I am still interested in figuring out the expressions as I think it would be useful in the future. Also when i change the forces I have to redo the values which is not fun.

Forester
Posts: 153
Joined: Mon Mar 15, 2010 4:36 am
Contact:

Re: Filter Split in Half

Post by Forester » Mon Apr 15, 2019 9:08 pm

Good! I'm glad this is working for you.

If you have an expression you find works well for this purpose, please consider posting it here. Kind of a "thank you" for the help people attempt to provide.

The reason I like the double Filter mechanism, is that it is particularly easy to make adjustments to the Randomness value when other settings have to be adjusted. (Per your second comment above.) It's really the ease of operation that I like. But, of course, this is a "kludge." It is not a direct solution to a problem like yours. Direct solutions, such as via an expression always are preferable, so good for you!
Windows 7 Pro 64 - Realflow 10.1.2.0162 (Nov 2017 patched) Standard Version

jumax
Posts: 36
Joined: Mon Jul 20, 2009 11:35 am

Re: Filter Split in Half

Post by jumax » Tue Apr 16, 2019 9:26 am

Hi Its the same one i mentioned above. Just tweaking the Id values to get a decent result for example these values below were giving me a decent result
(particle.id>20000 & particle.id<600000)


someone sent me this expression but its not right maybe someone can tweak that
particle.id %2=0

Forester
Posts: 153
Joined: Mon Mar 15, 2010 4:36 am
Contact:

Re: Filter Split in Half

Post by Forester » Tue Apr 23, 2019 3:01 pm

Thank you! (For the expression post). :|
Windows 7 Pro 64 - Realflow 10.1.2.0162 (Nov 2017 patched) Standard Version

Post Reply

Return to “Realflow”