0
$\begingroup$

I've been working on a project where I try to release some water (shown in blue) inclosed in some object (shown in purple) by opening a gate (pink-ish). The water first fills up the purple container object, then the gate opens by some kind of animation, and finally the water is supposed to flow out. However, under most settings, the water is stuck inside the object and appears to be blocked by some invisible wall (see the screenshot, the water is supposed to fall down). I got the water to move out of the object under a specific set of settings, but those were quite problematic (i.e. not the right gate opening timing, a very low fluid resolution). The relevant properties of the scene objects are:

  • The purple container object is set to fluid obstacle, volume initialization type shell, slip type is set to free slip (made the whole thing work once) and it has some thickness.
  • The gate shares the properties of the container object (although changing the volume initialization type to volume made it work once), but it's thickness is made through a modifier. The gate is animated by a simple deform>bend modifier, which uses shape keys somewhere internally I think (at least I saw an error message stating this).
  • I don't think the domain settings are that interesting, but lowering the resolution sometimes made the whole thing work.

Does anybody have any idea what I should be paying attention to? I'm confident the problem is due to the animation of the gate (which starts in a closed position, and then opens), as removing the animation and making it's initial state open lets the water flow through.

Update: The fluid does seem to follow the animation when using shape keys, which might be helpful to someone (I cannot achieve the animation I like with shape keys I think however, as applying my bend modifier as a shape key results in an unwanted animation).

Update 2: I've included my testing file in this question, it already contains the modifier based opening/bending animation of the gate.

Water stuck inside container object

$\endgroup$
  • $\begingroup$ Even with your gate open the container fills? I expect the mesh is enclosing the water and the opening is ignored. Try adding some thickness to the purple container so that the fluid flows around it. $\endgroup$ – sambler Sep 22 '17 at 6:05
  • $\begingroup$ Yes, even with my gate open the container fills (or did you mean to remove the animation and just have an open gate and see if the problem persist?). I do no think the opening is ignored per se, as it's only ignored sometimes (i.e. it works as an opening probably depending on mostly the fluid settings). As said, the purple container already has some thickness, but I could at more I guess. I'm not really sure what you mean by fluid "flowing around it" though. The container is filled properly, and surely you don't mean fluid flowing on it's outsides? $\endgroup$ – rien333 Sep 22 '17 at 7:31
  • $\begingroup$ With solid walls it should be easier to determine the outside that it can flow around, instead of being an enclosed container. Try without the gate being there to see if that is stopping it, maybe the gate animation isn't registering. Also try higher resolutions, more detail may allow it to fit through the hole. Do you get the same result in preview and final resolution? $\endgroup$ – sambler Sep 22 '17 at 9:00
  • $\begingroup$ Higher resolutions make the problem worse, as it ended up working when I decreased the resolution to about 30 at one point, and then it stopped working when I increased it to 60+ (as stated in the question). I have not observed any differences when changing between preview and final resolution. I will try your other suggestions in a bit. $\endgroup$ – rien333 Sep 22 '17 at 11:25
  • $\begingroup$ The hole is super large btw, so that's also not it. (remember, i had it working sort of okay at one point, but I forgot most of the settings and some of those were super problematic anyway) $\endgroup$ – rien333 Sep 22 '17 at 11:26
2
+50
$\begingroup$

The problem is that the Fluid Sim on the obstacle is being applied before the bending of the door has been applied. This means that the fluid sim is taking into account only the 'original' shape of the object - not the one after the modifier has been applied - see the modifier stack showing the FluidSim above the SimpleDeform in the modifier stack in the following image :

modifier stack

For the fluid sim to take account of the 'new' shape of the obstacle, it must take place after the deform - so it must be below the deform in the stack. Simply click the arrows to move the Fluid Sim below the Simple Deform to allow the fluid to flow through the open gate.

$\endgroup$
  • $\begingroup$ Ha yeah your right, in my answer i was thinking he somehow had a malicious object, thus i added a fresh plane to perform the same order of modifiers. $\endgroup$ – user3800527 Oct 11 '17 at 6:44
  • $\begingroup$ hmm, I already have had a suspicion this was the culprit, but I remember that when I tried it out on my actual project file the result still didn't come out as expected . I'll recheck now, thanks for the input and if it works I'll accept your answer!. $\endgroup$ – rien333 Oct 11 '17 at 17:39
2
$\begingroup$

I found a way how you can solve this in a "relative" quickly way.

Add a plane to your scene, subdivide length in 2 then subdivide it 10 times or so. Then Shrink wrap this plane, on your animated object.

Remove the fluidsim obstacle from your animated mesh.

For the Shrink wrapped plane, Add fluidsim (trough add modifiers!!!) Then you get a non specific fuidsim control below it, it has a small properties icon, click it, set it to Fluid obstacle and animated mesh.

Below i add this working solution, note that I tuned the plane a bit. Because shrink wrap had to fit in both open and close position. Therefore i bended it, also I added another plane width fluid collision against leaking at the bottom.

Here is my final solution for this problem... btw it was a nice puzzle !!!

The only thing left todo is give those planes invisible materials, so you wont see them in final render.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.