Fluid simulation?

hi, i’m trying to make a fluid simulation, i need to fill a glass with water, but don’t know how to start.

i tried google, but all i had found was the new water system, but don’t know how to customize it to make a fluid fill a glass or any other recipient.

any help will be very useful.

thanks in advance.

HI Enzoravo

Did you perhaps find a solution that works for this? I need to do a Beer pour into a glass for a cinematic. (preferably with foam head as well). Either that or have the glass fill from the bottom up. I’m amazed that I can’t find any tutorials or info about this. I thought it would be a popular subject matter.

Thanks in advance. :slight_smile:

i didn’t find any tutorial about this topic, i’m still looking

Hi Enzo, I am dealing a similar task and I haven’t been able to find anything yet. did you manage to do it?

The abstract is you make tons of small spherical particles, force them to have enough surface friction that they aggregate, and you use them to simulate the physics - then instead of displaying round sphere you replace that with something that resembles a fluid.

Stuff that does it well is Nvidia Flex and or the later iteration of their game framework.

Sruff that does it badly? Evrything else.

Possible eception here may be Fluid Ninja.

Instead of simulating this stuff in engine, use ANY dcc, import an alembic cache and be done with it…
If you have 10 or so randomized variations where picking the same one right after is not possible no one will ever be able to tell its fake without running billions of tests.

I have created my own 3d fluid simulator with underflow. It is a webpage and is made entirely using HTML, CSS, and JavaScript. We can add walls and water (fluid) using both draw as well as fill tool. We can start the simulation when we want by pressing the start button. We can also pause the simulation by pressing stop, add more water (fluid), and then continue the simulation with both the old water and the new added water by pressing the start button once again. This web-based fluid simulator is called Omkar Water Splash Fluid Simulator (OWSFS). It is a completely 3d fluid simulation. So, it allows underflow as well. Here is the code. You can copy paste the code in Notepad, save it as an HTML file, and run it as a webpage. No external libraries are required. It is very computationally heavy and slow though. It runs at 0.5 FPS on average. One frame moves forward every two seconds on average. But if you have a few minutes to spare, then you can simulate a cool scenario in it.

OWSFS .span1 { position: absolute; top: 5px; left: 420px; } .span2 { position: absolute; top: 100px; left: 290px; } .span3 { position: absolute; top: 100px; left: 40px; } .span4 { position: absolute; top: 100px; left: 1230px; } .span5 { position: absolute; top: 110px; left: 120px; } .span6 { position: absolute; top: 110px; left: 1310px; } .span7 { position: absolute; top: 170px; left: 80px; z-index: 3; } .span8 { position: absolute; top: 170px; left: 1270px; z-index: 3; } .span9 { position: absolute; top: 450px; left: 120px; z-index: 3; } .span10 { position: absolute; top: 650px; left: 1320px; z-index: 3; } .span11 { position: absolute; top: 0px; left: 350px; z-index: 3; } .span12 { position: absolute; top: 70px; left: 1270px; } .span13 { position: absolute; top: 70px; left: 1350px; } h1 { color: #0077FF; } h3 { color: #0077FF; } td { background-color: #000000; border: 5px #0077FF solid; width: 900px; height: 620px; } p { font-size: 10px; color: #FFFFFF; } input { font-size: 10px; }

Omkar Water Splash Fluid Simulator (OWSFS):

Draw:

Fill:

x draw:



y draw:



z draw:



opacity:

x fill start (xf1):



y fill start (yf1):



z fill start (zf1):



x fill end (xf2):



y fill end (yf2):



z fill end (zf2):



opacity: