Is a Realistic Water Bubble Simulation Possible?

Is a Realistic Water Bubble Simulation Possible?


Dear Fellow Scholars, this is Two Minute Papers
with Károly Zsolnai-Fehér. If we study the laws of fluid motion from
physics, and write a computer program that contains these laws, we can create beautiful
fluid simulations like the one you see here. The amount of detail we can simulate with
these programs is increasing every year, not only due to the fact that hardware improves
over time, but also, the pace of progress in computer graphics research is truly remarkable. However, when talking about fluid simulations,
we often see a paper produce a piece of geometry that evolves over time, and of course, the
more detailed this geometry is, the better. However, look at this. It is detailed, but something is really missing
here. Do you see it? Well, let’s look at the revised version
of this simulation to find out what it is. Yes, foam, spray and bubble particles are
now present, and the quality of the simulation just got elevated to the next level. Also, if you look at the source text, you
see that this is a paper from 2012, and it describes how to add these effects to a fluid
simulation. So, why are we talking about a paper that’s
about 8 years old? Not only that, but this work was not published
at one of the most prestigious journals. Not even close. So, why? Well, you’ll find out in a moment, but I
have to tell you that I just got to know about this paper a few days ago, and it is so good
it has singlehandedly changed the way I think about research. Note that a variant of this paper has been
implemented in a Blender plugin called FLIP Fluids. Blender is a free and open-source modeler
program, which is a complete powerhouse, I love it. And this plugin embeds this work into a modern
framework, and boy, does it come to life in there. I have rerun one of their simulations and
rendered a high-resolution animation with light transport. The fluid simulation took about 8 hours, and
as always, I went a little overboard with the light transport, that took about 40 hours. Have a look. It is unreal how good it looks. My goodness. It is one of the miracles of the world that
we can take a piece of silicon in our machines, and through the power of science, explain
fluid dynamics to it so well that such a simulation can come out of it. I have been working on these for many years
now, and I am still shocked by the level of progress in computer graphics research. So, let’s talk about three important aspects
of this work. First, it proposes one unified technique to
add foam, spray and bubbles in one go to the fluid simulation. One technique to model all three. In the paper, they are collectively called
diffuse particles, and if these particles are deeply underwater, they will be classified
as bubbles. If they are on the surface of the water, they
will be foam particles, and if they are further above the surface, we will call them spray
particles. With one method, we get all three of those. Lovely. Two, when I had shown you this footage with
and without the diffuse particles, normally I would need to resimulate the whole fluid
domain to add these advanced effects, but this is not the case at all. These particles can be added as a post-processing
step, which means that I was able to just run the simulation once, and then decide whether
to use them or not. Just one click, and here it is, with the particles
removed. Absolutely amazing. And three, perhaps the most important part,
the technique is so simple I could hardly believe the paper when I saw it. You see, normally, to be able to simulate
the formation of bubbles or foam, we would need to compute the Weber numbers, which requires
expensive surface tension computations and more. Instead, the paper forfeits that and goes
with the notion that bubbles and foam appear at regions where air gets trapped within the
fluid. On the back of this knowledge, they note that
wave crests are an example of that, and propose a method to find these wave crests by looking
for regions where the curvature of the fluid geometry is high and locally convex. Both of these can be found through very simple
expressions. Finally, air is also trapped when fluid particles
move rapidly towards each other, which is also super simple to compute and evaluate. The whole thing can be implemented in a day
and it leads to absolutely killer fluid animations. You see, I have a great deal of admiration
for a 20-page long technique that models something very difficult perfectly, but I have at least
as much admiration for an almost trivially simple method that gets us to 80% of the perfect
solution. This paper is the latter. I love it. This really changed my thinking not only about
fluid simulation papers, but this paper is so good, it challenged how I think about research
in general. It is an honor to be able to talk about beautiful
works like this to you, so thank you so much for coming and listening to these videos. Note that the paper does more than what we’ve
talked about here – it also proposes a method to compute the lifetime of these particles,
tells us how they get advected by water and more. Make sure to check out the paper in the description
for more on that. If you are interested, go and try Blender,
that tool is completely free for everyone to use, I have been using it for around a
decade now and it truly is incredible that something like this exists as a community
effort. The FLIP Fluids plugin is a paid addition. If one pays for it, it can be used immediately,
or, if you spend a little time, you can compile it yourself, and this way, you can get it
for free. Respect for the plugin authors for making
such a gentle business model. If you don’t want to do any of those, even
Blender has a usable built-in fluid simulator. You can do incredible things with it, but
it can’t produce diffuse particles. I am still stunned by how simple and powerful
this technique is. You can really find gems anywhere, not just
around the most prestigious research venues. I hope you got inspired by this, and if you
wish to understand how these fluids work some more, or write your own simulator, I put a
link to my Master’s thesis where I try to explain the whole thing as intuitively as
possible, and it also comes with the full source code free of charge for a simulator
that runs on your graphics card. If you feel so voracious that even that’s
not enough, I’ll also highly recommend Doyub Kim’s book on Fluid Engine Development. That one also comes with free source code. This episode has been supported by Weights
& Biases. Here you see their beautiful final report
on a point cloud classification project of theirs and see how using different learning
rates and other parameters influences the final results. Weights & Biases provides tools to track your
experiments in your deep learning projects. It can save you a ton of time and money in
these projects and is being used by OpenAI, Toyota Research, Stanford and Berkeley. Make sure to visit them through wandb.com/papers
or just click the link in the video description and you can get a free demo today. Our thanks to Weights & Biases for helping
us make better videos for you. Thanks for watching and for your generous
support, and I’ll see you next time!

100 thoughts on “Is a Realistic Water Bubble Simulation Possible?”

  1. for me the only purpose of this channel is to hype and make me dream about all the possibilities that these researches can bring. I LOVE IT!

  2. +Two Minute Papers – are in general these kind of implementations easy to use with something like Blender? (assuming they publish code) or should I be (re)implementing the algorithm based on the paper(s) if I want to achieve that? what do you usually work with to be able to put these kinds of 3D algorithms to practice and render out production-ready results? or rather, what is usually the flow to put something like this to use?

  3. Flip solver was on houdini more 7 years ago, and foam spray and bubbles are a common technique since a a few years too, nothing new here, actually is probably the very same technique, at least look like it

  4. you should do tidal wave videos.
    i thought that was minecraft.

    also how to make so that the water soaks in, instead of being on hydrophobic surfaces.

  5. So better water, better fire, better collision, better blood splashing when I'm killing, better cloth movement, better tree movement with wind, better raining, better collision damage…
    NOW MAKE A BETTER GTA PLEASE

  6. Last year we got realtime raytracing, maybe in the next 10 years we will get real time smoke and fluid sims in video games

  7. just without watching the video:
    why shouldn't it be possible to simulate? i mean this is also happening in real life and everything from that is calculatable.
    everything is possible to simulate what's happening in real life, it just takes a lot of work and dedication to make it.

  8. FLIP fluids is unstable compared to APIC and i wish APIC was in blender instead of FLIP as complex meshes with FLIP will more than likely cause a crash

  9. Amazing rendering! I wonder how hard it would be to determine under what conditions the underwater and foam bubbles merge with each other to be come "larger" diffuse particles and include that as well.

  10. The biggest issue I'm seeing with all these examples is inertia.

    The water looks like water, but it doesn't behave like a fluid, it seems to obtain immense amount so inertia out of nowhere. The collapsing water in the voxel valley is a good example of this.

  11. Hey I recently discovered this channel through the open ai vs pro players at dota video. I was curious if you were planning on expanding to more games such as League of Legends and/or a fighting game like Super Smash Brothers? I would love to see that content if so

  12. I don't really know that much about the softwares but how powerfull are computers that compiles and render thoses animations ?

  13. Dude, we did bubbles and foam calculations all the way back to Digital Domain's simulation for Pirates Of The Carribean and also on Titanic… It is just standard practice in film effects, which is why the paper wasn't that big a deal. It has been known by everyone doing that work in the industry…

  14. Your enthusiasm depresses me. That's probably not something you hear much, but let me explain: This stuff is amazing and consumes thousands of man-hours from humans working hard at it and…. it's completely useless. It's really no more than entertainment. Unless it somehow helps us understand blood and lymph flow inside our bodies, it's not going to help keep us free of the diseases of ageing and ageing itself, and that's where I wish smart people were engaging their problem-solving skills. We live at a time when it's finally possible to crack the complex and multi-factorial biology of ageing, so that you and I and our loved ones might have a chance to survive, instead of just going to the grave to rot like every other human before us, and all it will take is enough money and and people working on it – yet here were are screwing around with all manner of other things that are nowhere near as important as cancer and heart disease and all the fragile aspects of our biology.

    Once I understood that my programming/IT job was mostly problem-solving, but that the problems were just useless and would always be there while I grew old and died and new techs were born and trained, I realised I'd much rather solve meaningful problems in the realm of biology, so did a degree in molecular biology and biomedical science. Unfortunately there are no research labs where I live for me to use this and my memory of my studies is slowly fading, but there are so many opportunities for people in the US and Europe.

    I wish I was hearing breathless adoration for a paper that has beautifully solved an aspect of ageing – our hair no longer falling out, our skin collagen/elasticity no longer degrading, a specific cancer no longer posing a deadly threat, rather than, "Yay, now we can make pretty pictures of realistic water on a computer". Ok, that's basically movie-making, so why not just make a movie in reality? What else can you do with this other than make pretty cut-scenes in video games and nice CGI in movies? How is that advancing humanity? How does is stop global warming or solve the issues of food production and transportation and energy production and the things that allow you to sit in front of a computer not experiencing the world until you lose bodily function, spend some shitty time in a hospital and then die? Should we be putting all our big brains to use figuring out how to survive?

    At least machine learning and data science can be applied to biology and may help us in the field, but I find people putting so much effort into what are essentially pointless things quite sad, and the better they do at it, the more it seems their skill and patience could have been really usefully applied in an area that could change the whole paradigm of what it's like to be human – imagine how much you could learn and experience and work on if we had virtually limitless lives, only dying from really bad accidents? Even just doubling our life-spans would make life radically different. The opportunity cost for everything would be lower. Instead of having one career, you could have several. Instead of taking half your life to learn the most important lessons and then being too old to really make good use of that knowledge, you could mature and then flourish.

  15. Again that idea goes so much further back then 8 years. It goes back 20+ years…

    https://www.awn.com/vfxworld/water-water-everywhere

    It is amazing how people have no idea what the history of film fx has been, and put out stuff that is old news,a nd suddenly pretend they just invented it…

  16. Great and superb fluid and bubble-foam-spray simulation. As usual I am mostly looking forward to the simulation simplification so as to be able to run it in real time for games. I wonder if 3d fractal textures would be the answer to that, the fractal seed could be created by objects like simplified waves/ripples collision, underwater ground and waters edge ground and objects in the water and it could simulate particle dynamics in a simplified form by having simplified fractal animated water models. Of course if the maths could be simplified enough the water could still be done with particles I guess, but for the whole of the ocean surrounding the player it would be difficult in real time for games. Anyway, another great video, thanks.

  17. Nice vid! Now please please please go and look at the SideFX Houdini implementation of the flip fluids. If you are amazed by blender I would be really stoked to hear what you think about Houdini. it's pretty much become a standard in VFX and for all the good reasons. It has a free version too that can do anything.

  18. Woah. The 2012 paper is actually by my current teacher, Prof. Mathias Teschner for "Simulation in Computer Graphics" at the University of Freiburg. Moreover, the other author is Prof. Markus Ihmsen who is also the Founder of Fifty2 Technology(the place I'll be working in as a Work Student in the next month). I am so happy to see their names here! Hope I get to learn alot. And as always, amazing video, Prof. Károly Zsolnai-Fehér. 🙂

  19. How do these kind of simulations/solutions compare to engineering CFD such as OpenFOAM? Is the precission and output even similar?

  20. I just love those rather quick summaries that are made for everyone. Yours are in fact so well done that I am slowly starting to feel like I am addicted to them.

    Thank you ~

  21. I love Blender to death and will always support it.
    But there's one problem with these fluid renders…
    WE STILL DON'T HAVE CAUSTICS!
    Apparently the form of rendering Blender uses makes it very difficult to do caustics efficiently (there are some ways to fake caustics but it can be intense)… here's hoping that's something that can be developed soon.

  22. Reminds me about how register allocation is technically an NP-Hard problem, but the dead simple Linear Scan algorithm can approximate it in almost linear time.

    In computer science, math frequently tells us that perfection is physically impossible, yet surprisingly often "close enough to perfect" is trivially easy, with a little trickery.

  23. Getting excited for the time when (not if) simulating and rendering these kinds of environments is feasible at runtime. Certainly not tomorrow, but certainly not never!

  24. If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck. Even if it's not 100% accurate, what works, just works.

  25. Notice how peers failed the paper, yet the results of the paper are ground breaking. THAT is why, while peer-reviewing is a tool, it is not the tool to get good science. and results.

  26. As I am still confused about the FLIP Fluids and Mantaflow… They look very similar, and they both use the FLIP method. Can anybody tell me the difference?

  27. im so sad that we arent at a point that it can be rendered in a way that allows it to be in video games. imagine this level of dynamic detail in a scene where you gotta run and escape a flood while enemies are washed away and every now and then a building collapses or a wall smashes down or a door breaks open from the water

  28. Can you take a look at this paper about the new Taichi Programming Language made for physical simulations? I will be excited to see your video about this paper!
    http://taichi.graphics/wp-content/uploads/2019/09/taichi_lang.pdf
    They are also trying to make a Blender addon based on it.

  29. The graphical fidelity is improving to the point where it's difficult to figure out if what you are looking is real or not but there's one area I'd say we're still woefully behind. Character animations. Even when I watch a Marvel movie with millions of dollars of CGI budget, usually the first thing I notice is the uncanny valley caused by the character animations. I really hope someone will be able to figure out a believable and procedural way to animate humanoids.

  30. Jody Mitoma's Videos

    You make the most remarkable videos ever. It's no wonder you're in my top 10 subscriptions list on my channel! 😍 Thank you for everything you're doing. Please never stop. Also, I look forward to the insane graphics of video games in about ~10 years time, with the advancement in speed of everyday computers, processors, ram, etc. 😁👍 Mind blowing stuff!

  31. What are your thoughts on the app "Fluid Simulation" on the smartphone? The amount of advanced effects running on such a small processor, and as a live wallpaper boggles the mind

  32. Have you seen what the software Houdini makes possible? It's absolutely amazing, and is I believe also an implementation of this work in its flip solvers. The amazing part of the whitewater system in Houdini is that it's very easy to get complete access to its inner workings and change those, since everything is node and attribute based. It gets very easy to not only change the behavior of the liquid and of the foam in arbitrary ways, but to also output any possible information, like velocities of each particles, vorticity etc, to visualize them, or track the data in other ways. Besides the fact that Houdini apprentice is free and unrestricted in almost all ways except rendering, there are good resources here on YouTube, for example the whitewater masterclass by Omar Zarifi.

  33. Honestly dont care duh

    I saw this when some crazy shit was going on in my life and I forgot all about it. This is truly amazing and it's only going to get better in time. Cant wait till these graphics get put in video games

  34. I think they kinda have to fix scale you know when there are large bodies of water like a big wave crashing there is foam but when it’s like a bucket not so much

  35. Константин Эйман

    Now pretend such quality of graphics is running in real time at your computer. But today it will be like 0.000001 fps 🙁

  36. only thing I see that could be done better is getting the deep bubbles to always rise up at a speed relative to the bubbles size and depth. This would get bubbles moving to the surface to pop more realistically in the cube.

    It looked to me that the bubbles sat for to long on the bottom , but this is insane awesome simulation!

Leave a Reply

Your email address will not be published. Required fields are marked *