Jump to content
Sign in to follow this  
Gianni333

Fluid not colliding with collider

Recommended Posts

Hi guys,

I'm trying to make 2 objects that are filled with liquid collide, so that they break apart and release the fluid on collision. 

I have the breaking and collision set up and working, but I can't get the fluid to stay inside the objects until they break apart.

 

I made the objects hollow with thickness by duplicating them, scaling the duplicates down a bit and then combining them with a boolean. 

I filled the inside with a point cloud that I converted to a flip fluid. The collision geometry seems fine, no holes etc.

 

Since the objects are moving pretty fast, the fluid is halfway outside the objects after one frame. The rest also doesn't stay inside, but

is splashing in all directions.

 

How can I make the fluid stay inside the hollow objects?

 

Any help is much appreciated.

graph_collider.JPG

collision VDB.JPG

hollow object.JPG

graph_FluidDopNetwork.JPG

graph_objectHollowAndThickness.JPG

frame 1.JPG

frame 2.JPG

fluid.JPG

Share this post


Link to post
Share on other sites

Thin walled objects and flip are not friends XD

Unless you intend to render these objects as transparent and hope to see the fluid inside, the easiest way is to just start your sim on the frame just before the two objects collide and make sure the fluid has initial velocity in the direction of travel.

Otherwise, a couple of things you can do is rather than use the same collision volume for every frame, make a much much thicker version of the containers that is used on every frame just before the collision, then using a switch, transition to the fractured volume. This means pointing your rbd object collision volume proxy to the vdb and using "volume sample" as the method.

Alternatively, and this ones for like, if you have to see the fluid moving inside and you're shaking it.
First first run sim A. This is your object and the fluid held static at zero with an animated force that represents the inverse velocity of your objects motion. You run this simulation at 0,0,0 and the forces slosh the fluid around inside the container up until the contact frame.

Next add to that simulation the animation of your closed object. This becomes the rest position. inside sim B you would have a pop vop that, up until the frame of collision, is overriding point position with rest and velocity with of course the velocity of the previous sim. Then, on the collision frame, a switch flips over to using standard P and V allowing it to simulate normally.  

Share this post


Link to post
Share on other sites

I'll mention a couple of things. One your merge, collision should be on the left, not the right. Also make sure to visualize your collision surface using the guides of the FLIP Object, not the Static Object. Your particle separation actually controls the resolution of the collision surface, by default. You can "decouple" that default state and set the collision resolution independent of the particle separation.

Also make sure you have inverted the surface of the Static Object.

Share this post


Link to post
Share on other sites
Posted (edited)
On 11.3.2020 at 12:25 AM, Feather said:

Thin walled objects and flip are not friends XD

Unless you intend to render these objects as transparent and hope to see the fluid inside, the easiest way is to just start your sim on the frame just before the two objects collide and make sure the fluid has initial velocity in the direction of travel.

Otherwise, a couple of things you can do is rather than use the same collision volume for every frame, make a much much thicker version of the containers that is used on every frame just before the collision, then using a switch, transition to the fractured volume. This means pointing your rbd object collision volume proxy to the vdb and using "volume sample" as the method.

Alternatively, and this ones for like, if you have to see the fluid moving inside and you're shaking it.
First first run sim A. This is your object and the fluid held static at zero with an animated force that represents the inverse velocity of your objects motion. You run this simulation at 0,0,0 and the forces slosh the fluid around inside the container up until the contact frame.

Next add to that simulation the animation of your closed object. This becomes the rest position. inside sim B you would have a pop vop that, up until the frame of collision, is overriding point position with rest and velocity with of course the velocity of the previous sim. Then, on the collision frame, a switch flips over to using standard P and V allowing it to simulate normally.  

Thank you so much for the suggestions, so many possible solutions, much appreciated! :)

 

I tried simulating the fluid just before the collision and it seems two work very nicely :) 

I have 1 problem though: In order to create the fluid I merged the 2 objects, scaled them down a bit and created points from volume.

My main issue is now that I have only 1 fluid object, so I can only give it just 1 initial velocity. That means 1 of the 2 fluids always goes in the wrong direction because the 2 objects are flying towards each other.

Edited by Gianni333
My follow up question has changed

Share this post


Link to post
Share on other sites
On 11.3.2020 at 12:55 AM, Atom said:

I'll mention a couple of things. One your merge, collision should be on the left, not the right. Also make sure to visualize your collision surface using the guides of the FLIP Object, not the Static Object. Your particle separation actually controls the resolution of the collision surface, by default. You can "decouple" that default state and set the collision resolution independent of the particle separation.

Also make sure you have inverted the surface of the Static Object.

Thanks a lot for pointing this out. I wasn't aware that right or left mattered in the merge and also that the guides from the fluid are not the same as the collision guides. Many lessons learned today :)

By inverting the surface of the Static Object do you mean checking "Invert Sign" under the RBD Solver/Volume tab?

Share this post


Link to post
Share on other sites

Update: I solved the issue with the initial velocity by creating one fluid object per filling and merge the 2 fluid objects before connecting them to the fluid solver. 

 

The issue is now that the fluid from the 2 fluid objects seem not to interact with each other. It's not too obvious, but I'm wondering why that happens?

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×