short on time again, so I´d appreciate a push in the right direction:
I need to make an animation with an open container filled with liquid. the container is also animated with some morph shapes, moving the liquid inside.
The animation of the container will be looped, so it would be super awsome if I could also somehow loop the animation of the liquid.
For initially filling up the object I found this answer from Svetlin Nikolov:
Yup, depending on how your scene is setup, you can either fill your simulator to some level using the Liquids->Initial Fill Up option (it’s 50% by default), or if you need to fill something with a more complex shape, you can use the PHXLiquid in Brush mode, and animate the discharge to 100% for a single frame and then back to 0 - this way you will imprint the geometry shape into the simulator in the form of liquid, you only have to exclude the emitter geometry from interacting with the simulator - with the official version 2.1.1 this happens from the Interaction rollout, or with a recent nightly build you can do it form the phoenix right-click menu of the geometry.
As far as I understood this means: I would create my grid, put the container object inside, make a duplicate of it (probably a little smaller?) and set that as emitter (previously excluding it from interaction) and then animate the discharge like described.
Is it a problem in this case, that the container is open?
I guess the the emitter object needs to be closed, or not?
there is a loop option in the input panel, you can try it.
i think it’s not a problem that the container is open, but i expect problems related to the walls. when you animate geometry, the walls must be thick enough and the spf must be high, to prevent liquid passing through the walls.
what actually you are trying to do?
I have to do some medical animation about reflux, acid from the stomach spilling into the esophagus.
I´m already having trouble with the initial fillup: if I exclude the emitter object in the interaction panel, it is no longer emitting…
A quick and dirty workaround for me is to just animate the size of the emitter object via Xform and “shrink” it out of the way, parallel to the discharge.
I also noticed liquid going through the container mesh, but that problem was easily solved by checking “clear inside” in it´s phoenix properties.
no, you have to use the right click menu, not to exclude. after introducing the phoenix per object properties, we abandoned the exclude concept. just make the object non solid to use it as brush
Unfortunately the animated containe is indeed making problems. If I check “clear inside” I seem to be losing liquid over time, and if I uncheck it, I´m getting mesh penetrations.
I´ll play around with shell size of the container and SPF Values, right now I´m at 8 and still having mesh penetrations.
if i can´t get it to work with the animated container I might just simulate the reflux by using a second emitter, instead of the medically correct “squeezing” of the stomach to make the liquid spill into the esophagus…
there is probably also something wrong with my container geometry…I thought I´d put a turbosmooth on top of my container geometry, thinking a denser geometry would make for a better collision object, but then liquid penetration got even worse.
something is wrong, i did a quick test, if the transform is animated it works even with spf=2, the penetration occurs only when the movement in single step is bigger or comparable to the moving wall thickness. but with animated geometry it does not work. i suppose the animated geometry support is broken, perhaps in the official build it works, not tested for now.
Ok, that is good news, sort of…I kind of prefer software not working as it should be, to me not knowing how to handle it right…
Let me know as soon as you fix the problem, because as of now I haven´t found a good way of faking the look I´m after.
I´ve tried using a second emitter inside the liquid, that emits at a certain frequency to simulate the sporadic spilling into the esophagus, but now of course the liquid is rising over time.
I tried making a small hole in my container to counter the increase in liquid, but the liquid for some reason stays in the container, probably because I checked the solid option in the phoenix properties , but maybe it´s also because of the same bug…
i didn’t expect that the problems will disappear totally, just hope that now the animation affects the liquid. tell more about the problems to see what can we do
I´m in the process of rechecking my geometry, I think there might be some more problems with unweld vertices and also the shell modifier I put on top to make the walls thicker for sim.
At a grid resolution of around 1m cells and with SPF of 14 I´m getting a good starting point with the liquid not penetrating the mesh (with lower SPF values I am getting leaks).
As soon as the mesh is morphing, the liquid just seemed to evaporate through the walls though…
I now made a dummy for the morphing geometry, did some welding and relaxing and then skinwrapped that dummy mesh back to the original one.
The sim now seems way more stable (before the liquid started evaporating after only 2-5 frames after the morphing started), but after a couple of frames I am getting leaks again.
I´m not sure where else to go from here: try to increase the SPF even further?
Increase grid resolution?
Change transfer mehod/quality?
Can I maybe send you the scene so you can see if you can find the solution for my problem?
Because I´m a little pressed for time now and I´ll have to start looking into an alternative on how to fake it somehow…
Alright, sent it to support.
I´m currently working on an alternative way, making a simple animated mesh with noise and wave as base liquid and only simulating the splashes with phoenix, so I can just composite it in post, but if you find a solution first, let me know!
i’m investigating the scene right now, seems like the vertices animation has a small sudden movement at frame 103 that produces big local velocity. however i still can’t exclude incorrect phoenix behavior, i continue to investigate it.
beside this, some advices
- do not simulate in very small scales, better to be looking good than to be physically correct. the small scales require extremely high spf that pushes you to decrease the resolution and other bad decisions. i changed the scene scale to be 10 times bigger and now it simulates with 4 spf that should be enough
- if you have conservation issues switch to ft + smooth to exclude the advection as reason.
- you can use the velocity preview to see problematic areas, this may give you ideas how to change the geometry.
Thanks or investigating!
I am already working on the workaround and so far it seems I can use it, so no hurry needed anymore.
Of course I´d still like to know how to do it next time.
Also good to know about the scale, I usually use bigger scales for medical stuff, since I often have to get very close to objects, for some reason this time I used real scale…
I didn´t know the connection between spf and scale, that is very interesting to know!
I also never used the velocity preview, another great thing to discover…