Jump to content

Flip pouring into closed container?


WhyGee

Recommended Posts

Hi

Im trying to achieve an effect where a fluid stream could enter a completely closed container and only collide on its internal walls.

I guess if there is a way to control collision detection on a per particle level that could do it but i havent managed to find a way to do that.

Does anyone have an idea how this could be done?

 

Thank you!

Link to comment
Share on other sites

Hi Atom, thanks for the reply. 

I've tried this, but since my emitter is outside of the SDF, it prevents it from emitting any fluids. Any idea why this is happening? 

I'll try to create a small example file soon. 

 

Thanks again

Yaniv

Link to comment
Share on other sites

I think you would need to fake this with two fluid systems.

1.) Your fluid approaches the container from the outside and encounters a sink mesh that is deformed to the outside shape of your collision object.

2.) You have an interior fluid emitter on the opposite side of the sink. You time the Activation of the internal emitter to match when the initial outside collision with the sink occurs.

This could be cool because you could have some of the external FLIP sim splash out and around the collision object while the internal emitter activates and you see some fluid go inside the object.

Edited by Atom
Link to comment
Share on other sites

Thanks Atom, that would be a last resort solution. I'm still looking for a solution that would allow a continuous stream, splitting it up might be a little time consuming for the time I have on this little project. Worst case I'll jump into Realflow as much I'd like to avoid it :)

 

Thanks again!

Yaniv

Link to comment
Share on other sites

It's really not that complicated, here is my suggested setup in your scene. The Activation for the internal stream is controlled on the SourceVolume node in the form of an expression $F > 12. So you can set what frame you want the internal stream to start on.

fluid_internal.gifINTERNAL

fluid_external.gifEXTERNAL

fluid_combined.gifCOMBINED

ap_FLIP_through_collider.hiplc

fluid_no_sink.gifNO SINK

Edited by Atom
Link to comment
Share on other sites

Perhaps I wasn't clear on the intention but that's not the effect I'm after. Hopefully the attached masterpiece drawing will explain better. I don't want the fluid to flow around the collider, it should pass through as if it doesn't exist, and only collide from within. Maybe you know of a way to turn flip collisions on or off with a group or based on a per particle attribute? That would pretty much solve the problem I'm having. 

Btw maybe a different kind of topic, but even though flip can collide with surface rather than volume colliders, it doesn't seem to "fill up" the container if it's set to surface. Is that a known limitation?

Thanks alot for your help, much appreciated!

Yaniv

effect1.jpg

Link to comment
Share on other sites

The main reason the fluid is flowing along the interior walls is because I put little effort into shaping the internal emitter. I simply clipped the original sphere and used that as the emission surface. You could make it a small circle and it should fall through as intended in your drawing.

It is not a known limitation, it is simply the default setting. To fill up a container you want to add a Divergence field.

 

 

Edited by Atom
Link to comment
Share on other sites

Its all about playing with collision weights!

1 hour ago, WhyGee said:

Perhaps I wasn't clear on the intention but that's not the effect I'm after. Hopefully the attached masterpiece drawing will explain better. I don't want the fluid to flow around the collider, it should pass through as if it doesn't exist, and only collide from within. Maybe you know of a way to turn flip collisions on or off with a group or based on a per particle attribute? That would pretty much solve the problem I'm having. 

Btw maybe a different kind of topic, but even though flip can collide with surface rather than volume colliders, it doesn't seem to "fill up" the container if it's set to surface. Is that a known limitation?

Thanks alot for your help, much appreciated!

Yaniv

effect1.jpg

This is totally possible! I did a modification to the Flip solver to do exactly this a year ago. I'll try try to search the file and send you an example. But basically you should do manipulate the collision weight per particle to control the collision behavior. So with just a simple rule like sampling the collision SDF you can test if you want to turn on or off your collision weight to let the particles collide or not with the objects boundary.

Cheers!

Alejandro

Edited by Pazuzu
  • Like 1
Link to comment
Share on other sites

Nice tutorial Atom thanks alot!

Alejandro that sounds like its tge control i was looking gor. Ill give it a shot in the morning. If u find the setup file that would be amazing.

Appreciate all your help guys.

Cheers

Link to comment
Share on other sites

Here's something that is a bit of a hack:
flip_closed_container.gif

It is probably along the lines of what Atom was suggesting where you'll need to use two fluid systems :D
I'm transitioning using particle age.

flip_closed_container.zip - H16.0.557 Indie

I tried earlier to mess around the volumes (collision, collisionweight, and collisionindex) to no avail. Then I saw Alejandro's suggestion! I would love to try that out!

Link to comment
Share on other sites

Here is the scene file that shows how to manipulate collision weights for an explicit control (rules) of how your particles collide.

Enjoy!

Alejandro

 

Edited by Pazuzu
file updated
  • Like 1
Link to comment
Share on other sites

A-W-E-S-O-M-E!!! I'm digging through it now.

Hey Atom, it seems to be missing a custom node to generate velocities.
I replaced it with a simple wrangle and a direction vector.. now it seems to be working as intended.
I can see the liquid being emitted from the outside, then it passes through the collision, yet it remains inside the sphere.

collisionWeights_v002.PNG

Realy cool setup Alejandro! Thank you for sharing! This opens up quite a lot of workflow options for flip that I wasn't aware of ^_^

 

Edited by galagast
spelling/grammar fixes (too excited to type!)
  • Like 1
Link to comment
Share on other sites

1 hour ago, galagast said:

A-W-E-S-O-M-E!!! I'm digging through it now.

Hey Atom, it seems to be missing a custom node to generate velocities.
I replaced it with a simple wrangle and a direction vector.. now it seems to be working as intended.
I can see the liquid being emitted from the outside, then it passes through the collision, yet it remains inside the sphere.

collisionWeights_v002.PNG

Realy cool setup Alejandro! Thank you for sharing! This opens up quite a lot of workflow options for flip that I wasn't aware of ^_^

 

You're Welcome!! :)

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