FLIP sim challenge on 56 bottles

   2251   5   4
User Avatar
Member
36 posts
Joined: May 2015
Offline
Hi everybody,

I am trying to get a “simple” idea to work but I am not managing so far.
What I am trying to do is:

1- A bullet simulation of a bunch of bottles in a box, sliding on the surface (the easy part, done).
2- Grab that cached animation of 56 bottles and use it for a relatively low-res FLIP sim.

The main problem is, obviously, get the fluid contained inside the bottle following the cached animation.
I have added already tried all the things that I know of: increasing the vdb collision thickness (both sourcing a vdb from SOPs, and using houdini's own volume collision representation), decreasing the vel-grid size, up-ressing the sim, using more substeps (both adaptively and “brute force”, swapping collision method to “Fast-moving Colliders”, changing the every detection method, changing the scene scale, changing the solver scale and so on. Seems like no matter what I do the fluid keeps leaking outside the bottles, even if the collision guide of my FLIP Object shows correct representation of the mesh. My animation is not even that fast, so I am really scratching my head here. Hopefully someone can get it to work somehow.
Also, if I were to increase the thickness of the collision volumes they would, obviously, cross and intersect with each other at some point, creating holes where they intersect which we obviously don't want.
So my final question here is: is there any way to sim this all in one go? Because the only other option seems to be simulating 1 bottle at the time *56…which is a route I would rather not take…

I am posting the simplified version hip, thank y'all

Attachments:
bottle56_v001.hip (2.0 MB)

User Avatar
Member
252 posts
Joined:
Offline
Hi, I've attached a workflow that might work for you.
Some of the basic changes I did:
  • Used a closed mesh using the inside of the bottle for collisions
  • Used an object level bottle geometry as a collider.
  • Used wedging to simulate each bottle.

Currently the attached scene is set up to only simulate 10 bottles, up to 30 frames.
But you can change that easily inside the rop network.

H16.0.745 Indie

Attachments:
flip_in_bottles.gif (457.6 KB)
bottle56_v001_jlim.zip (212.4 KB)

User Avatar
Member
252 posts
Joined:
Offline
In addition, if you're interested, you could probably go the CHOPs route:
https://vimeo.com/18542939 [vimeo.com]
Andrew Lowell did quite an impressive job on cheap contained fluids there

And, Macha says he has a hip file here:
https://vimeo.com/22115828 [vimeo.com]
User Avatar
Member
36 posts
Joined: May 2015
Offline
Hey galagast, thank you so much for the help!

Right after I wrote this post I went out and suddenly it stroke me on the bus the idea of using the wrangle rop. I felt so silly for not having thought of that before!
As soon as I came back home I saw your reply and started digging inside the scene, such a nice little setup there! Thank you very much for sharing that. I did not get a couple things that I'd like to ask you:

1- why does the “get_points” wrangle works only if you plug the animated bottles in the second input? I mean, I see that the code looks up at the second input obviously, but when I tried using the 1st input and changing the vex snippet accordingly it did not work.

2- on the file sop that reads all the caches in loop, you had detail(-1,“iteration”,0). It worked fine in your scene, but it kept giving me errors on my end. I replaced it with the relative path of the metadata node and it worked. I didn't understand why

3- the measured volume was giving me negative values D: I had to do a *(-1) after to have it positive, but still gave me a very low value compared to the volume I was expecting to have (imagine it gave me a 3 when it should have been a 7 for example)

Apart from that, everything works perfectly and the scene/sim is very very light and RAM friendly, so thank you again!
User Avatar
Member
252 posts
Joined:
Offline
Awesome! Always a pleasure to help

To answer your questions:
  1. get_points:
    That is so that I could use the addpoint vex function to create points from a blank slate. Not connecting anything to the first input gives me a blank geometry so to speak.
    If I connect and use the first input, it will add the points to the incoming input geometry, which is not what I wanted.
  2. detail(-1,“iteration”,0):
    Yes, recently whenever I set up for-loops, I started switching to using the Cog Wheel > Add Spare Input menu option for node referencing. This is because if I would later want to use Compiled Blocks, my loop would be ready for it. Check out the Compiled Blocks workflow, it explains the use of “-1” to reference nodes.
  3. negative measured values:
    I also initially had negative values from that. What you need to check are your normals. You might need to reverse it as I did.

Right after I wrote this post I went out and suddenly it stroke me on the bus the idea of using the wrangle rop
Did you mean the Wedge ROP?

Cheers!
User Avatar
Member
36 posts
Joined: May 2015
Offline
yeeep, wedge rop eheh, typo!

Well, thanks for all the explanation!
  • Quick Links