Ignas Pocius Posted April 25, 2022 Share Posted April 25, 2022 Hello, I am trying to make a shelled object with a thickness (so negative space outside and inside, but the thin shell is positive space for collisions) collide with a FLIP fluid sim. Essentially imagine an egg with some fluid inside. The fluid would stay inside until cracked. After that point the water spills out and the collisions of the shell are all accurate before and after the crack. The problem im facing is that VDB creates only either a fully encased volume where anything thats inside the egg is negative and outside is positive or vice versa. I cant seem to make it recognize that the shell is the only thing it should be making a VDB volume out of and treating everything else as the outside. I can turn on the invert sign on the collision for FLIP and it kinda works but then once the egg cracks it just all goes haywire. So Im not sure how to approach this. I have also tried to create two VDBs with slight offset and combine them with the multiply function. Which in volume slice shows as a narrow band but the FLIP particles dont seem to like it at all. I have attached a simple file to show what's happening. Water_test.hiplc Quote Link to comment Share on other sites More sharing options...
Atom Posted April 25, 2022 Share Posted April 25, 2022 (edited) One of the toughest things to collide with is a thin spherical surface. You have to use a lot of resolution to prevent holes. You can decouple particle separation from collision resolution. Even with very low values, you can see there are artifacts and holes that FLIP particles will leak through. What you can do is make your collision surface thicker. This will allow your simulation to run at a lower resolution, and patch gaps. Also, to avoid checking that Invert Sign checkbox, make a hole in the top of your collider, then flip is essentially resting inside a cup, not an egg. You don't have to render this modified geometry, but you can use it for collision. Here's one with less reseeding and particle separation enabled with stick on collision turned on. ap_Water_test.hiplc Edited April 25, 2022 by Atom Quote Link to comment Share on other sites More sharing options...
Ignas Pocius Posted April 25, 2022 Author Share Posted April 25, 2022 Ah I see! thank you very much! Sadly making the collision thicker is not really an option as I have around 100 of them all stacked together so the collision would intrude on others (its actually a medical animation for cells, not really eggs. The test scene was just an example). I will try with making holes for the collisions! I was just hoping there would be an easy way to tell VDB that there is a thin shell, without having to create holes haha. Thanks so much again for such a speedy reply! This will surely help Quote Link to comment Share on other sites More sharing options...
Ignas Pocius Posted April 26, 2022 Author Share Posted April 26, 2022 11 hours ago, Atom said: One of the toughest things to collide with is a thin spherical surface. You have to use a lot of resolution to prevent holes. You can decouple particle separation from collision resolution. Even with very low values, you can see there are artifacts and holes that FLIP particles will leak through. What you can do is make your collision surface thicker. This will allow your simulation to run at a lower resolution, and patch gaps. Also, to avoid checking that Invert Sign checkbox, make a hole in the top of your collider, then flip is essentially resting inside a cup, not an egg. You don't have to render this modified geometry, but you can use it for collision. Here's one with less reseeding and particle separation enabled with stick on collision turned on. ap_Water_test.hiplc Ah it seems like it wont work after all. I have made the hole at the top like you suggested and VDB now creates a shell for the liquid to collide which is great. However I have this issue where the liquid doesnt seem to settle inside the shell before the shell gets broken. It just wants to infinitely compress into itself until it either clips through the collision geo or there is just a singular point of flip particles all stacked on top of each other. I have tried to increase the collision separation as much as I could (both for the FLIP and the VDB) but it doesnt work. I tried turning on the separation in flip so they dont compress into each other but it doesnt work either. Any ideas as to why its compressing like this? My collision volume is now 17 million voxels for this single sphere. I have tried setting the substeps to minimum 5 and its still the same. ap_Water_test_02.hiplc Quote Link to comment Share on other sites More sharing options...
Atom Posted April 26, 2022 Share Posted April 26, 2022 (edited) To prevent the compressing of the fluid, leave the grid scale set to 1.0. To prevent the fluid bounciness, leave viscosity enabled and adjust the value on the Physical tab of the FLIP Object. Closer to 0 is nearly no viscosity while values in the thousands can turn it to dough. In this setup, I have discarded the vellumpost process thickener in favor of using a polyextrude on the pieces before they are simulated. This allows for an inner extrusion so you can stack your final spheres next to one another and still create a thicker collision surface. I have set up a group on the red piece to allow separate forces to affect only that piece of the fracture for art directed motions. Remember, if you change the timing on the forces inside the vellum sim, you'll have to adjust the timing on the popwrangle, which activates vellum self collision, to match the new start keyframe on the popwind. It's hard coded at frame #24. if(@Frame>24){ f@disableself = 0; // Enable collision. } ap_Water_test_03.hiplc Edited April 26, 2022 by Atom Quote Link to comment Share on other sites More sharing options...
Ignas Pocius Posted April 26, 2022 Author Share Posted April 26, 2022 52 minutes ago, Atom said: To prevent the compressing of the fluid, leave the grid scale set to 1.0. Thanks a lot for your fast replies! I dont mind the fluid bounce, but I'll keep the viscosity on. The extrusion trick is definitely very helpful! I am not too familiar with Vex and why we need to disable self collision for those pieces but I'll take your word for it! Okay so I dont know if its my houdini or something is wrong. I took your scene and disabled the vellum forces so it just stays in place as a sphere. I left everything else untouched and let the water just drop and settle. It immediately compresses into the sides of the wall. It sticks to the wall, giving the impression that there is fluid there, but its all compressed into itself making the middle hollow. Here I have meshed the fluid to better show what's happening. Can you see how it all just quickly sinks into the walls, making this thin sheath of water at the walls? This is the problem I am having right now. The collision works great and everything is responsive, but the fluid just compresses into itself as soon as it has to settle down within that collision. ap_Water_test_04.hiplc Quote Link to comment Share on other sites More sharing options...
Atom Posted April 27, 2022 Share Posted April 27, 2022 (edited) There is a running joke in the community that all simulations should be the size of the pig head. If you size up your sphere a bit and thicken the walls, the fluid holds its volume. ap_water_test_05.hiplc Edited April 27, 2022 by Atom 1 Quote Link to comment Share on other sites More sharing options...
Ignas Pocius Posted April 27, 2022 Author Share Posted April 27, 2022 4 minutes ago, Atom said: There is a running joke in the community that all simulations should be the size of the pig head. If you size up your sphere a bit and thicken the walls, the fluid holds its volume. Oh my god thank you! I cant believe its so simple! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.