Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
AI powered realtime fluid simulations are here (echoesofsomewhere.com)
115 points by jussipetteri on April 8, 2023 | hide | past | favorite | 47 comments


For the people confused with how AI is used for fluid dynamics, you solve PDEs to know how your fluid behaves, and PINNs ( physics-informed neural network) can be used to solve these PDEs. They have limitations in their uses and have been only recently re-launched, but they have improvements compared to the usual solving approach.


No, PINNs are precisely what you do NOT want to use for this kind of thing, because you are trying to take shortcuts that mimic the physics without actually caring about it being physically accurate (as long as it looks nice).

Reading their approach, they are not actually using machine learning methods for solving fluid dynamics, but are using it for more efficient processing of boundary interactions.


Thats a very interesting take. Setting up boundary conditions is always a pain and often not physically accurate anyway.


Is this using PINNs? https://en.wikipedia.org/wiki/Physics-informed_neural_networ...

It is Unity so I guess one could just decompile the asset.

BTW on this page, it doesn't say AI used for the main NS, but rather just for object interaction: https://zibra.ai/zibra-liquids-pro/#tariffs. E.g. "neural collider"


I read a bit more about the unity plug-in used here and they in fact aren't using PINNs for solving. Here they more or less explain how they do it : https://zibra.ai/blog/what-can-be-done-with-zibra-liquids/


Is this like using a preconditioner in Krylov based methods?


most of the literature on pinns is garbage because it uses comparisons to really bad implementations of the "usual approach"


It is hard to tell what is AI about it? It seems like GPU accelerated fluid simulation that is relatively low resolution.

From the description it appears they use AI (which they say is a neural network representation of signed distance fields) for colliders only?

The performance seems good but given it is low resolution it is hard to tell if it is better than the alternatives.

I wish there was a Siggraph paper on this technique.


It's not clear to me either. But I guess it's something like a denoiser: you simulate it at a very low resolution and use AI to "upscale" it?


That's what it looks like. Still impressive. Even though personally I think we've had realtime fluid sims in games before and they always fail to make a splash by not being tied to gameplay properly. I think CSGO2's way of handling fluids (or at least smoke) is the way forward. Make it more than damn flipbooks, integrate it into gameplay, the rest will take care of itself in time. It just needs a spark. CSGO2 may be that spark.


I think you are right in that it needs to be really tightly coupled to a gameplay mechanic, so much that it won't need to be a real simulation. The gameplay availabile through more realistic physics simulation has been relegated to novel indie games that can afford the gameplay challenges.

I think the main issue is structure and containment. AAA games don't avoid destruction, newtonian physics and fluid dynamics because it's computationally hard but because it probably doesn't benefit the more standard gameplay mechanics enough for all the issues it causes.

Just as an example, Red Faction came out in 2001 with full terrain destruction, but they had to preempt all the shortcuts people would take else you can just tunnel to the end of the level. Every time a GTA comes out the internet rumours say it'll have fully destructable buildings, but that will never happen as you would end up blowing up all the mission locations or breaking NPC pathfinding etc.


I thought the CSGO2 smoke grenades are really compelling, like you did. That said, I think CSGO2 isn't fluid simulation at all. It sort of seems like animated sprits but with the ability to have dynamic holes punched in it or to dissipate. So it is a game entity that reacts to the world, which is nice, but I think there isn't much in the way of real "fluid simulation" in it at game time.


It's more of a cellular automaton than anything else. Which is not a bad way of getting a deterministic fluid simulation, even if it is somewhat nonphysical.


“Differentiable programming” is nice term which covers the broad application of NN/deep learning techniques to special domains


It is supposed to be 15x faster than the alternatives. And based on my testing that figure might not be far off.


I suspect they are running at 1/3 the resolution and upscaling maybe? So the simulation is 27x faster roughly but there is an upscaling cost that brings it down to 15x?


> We use neural network ...


it was unclear to me what is the NN used for in this case?


I'm actually very excited to see AI applied in games in ways other than AI agents.


And "smart" upscaling


A fully AI-generated simulation doesn't seem to be very far off. However, there is the concept of Maya (and with some changes, the simulation hypothesis or the ideas of Donald Hoffman) that may already be true.


Curious if you're referring to Maya the 3d application or something else?


I mean Maya from Indian philosophy, which states that we live in an illusion that makes it difficult for us to recognize the true essence of the world and things.


If I wanted to use AI to produce a scientific thermodynamic simulation (showing how heat/energy flows within a closed system) are there any good options for that? I saw some interesting biology and chemistry tools but not as much related to physics.


Something to note here is that in the first video, all the images/textures you see are generated by Stable Diffusion (or may be midjourney).


Why AI is needed for Fluid dynamics ?


"perfectly correct" fluids are crazy computationally intensive. However if you can fake it with "close enough" fluids, they still look perfect, but take a fraction of the computation.

Don't use them for wave slam on a vessel, but they're brilliant for games.


I was hoping for CFD applications myself when I saw the headline... Is there any progress on that direction or is it even possible?


there’s tons of research in that general direction. not sure if any is practically better yet but it does “work”.


look up Nvidia modulus.


Check out Navier Stokes and Partial Differential Equations.

Reading through some SIGGRAPH papers on fluid dynamics might be interesting.

The TLDR is that fluid dynamics can't be efficiently calculated exactly, and the computational complexity grows exponentially for linear improvements in fidelity.

AI simulations can generate natural seeming fluids in constant amounts of compute, by learning heuristics that look realistic but may not actually exactly match what you'd get from running a PDE solver.


Who said that neural networks can't approximate solutions to these equations with any accuracy / precision we like?


In theory, they can (Universal approximation theorem ). But those spatio-temporal systems are highly complex and consist of a very big number of variables (curse of dimensionality). That's part of why weather forecasting is so hard.

So, to not have to use a gigantic neural network at the problem, you use some clever 'tricks', like dimensionality reduction and decomposing the problem. For example you can separate the spacial domain from the time domain and predict those with dedicated models, before joining the solutions again.


Is the number of variables really big or is it because no one ever tried large models with billions of parameters for this purpose (too expensive) like it was done with GPT?


The number is really big. GPT uses Transformers, which are kind of the successor to RNNs. Both are good at modelling sequences, like sentences or the temporal evolution of a dynamical system.


It look like something GPT wrote.

There are 3 spacial dimensions + one time dimension in Navier-Stokes equations. Not billions.


Lol, i guess we'll hear this allegation more often in the future. I'm talking about 3 variables for the velocity and 1 variable for the pressure at every point in space(typically a cartesian grid in numerical fluid simulation) and every time step of the solution.


There are various ML based techniques to actually approximate Navier Stokes solutions for real engineering applications.


Oh, it's for games, so probably not physically accurate. Smoke and mirrors.


Somewhat related, I enjoyed this video where the producer tries to replicate a simulation where water solves a maze. He finds several things the simulation didn't account for. He doesn't appear to be a scientist, so YMMV, but interesting to see the experiment done in a large scale.

https://www.youtube.com/watch?v=81ebWToAnvA


I created something similar a few years ago.

https://assetstore.unity.com/packages/vfx/particles/fire-exp...

I didn’t use AI though, just overall cleverness.


Where are my open source FEA tools, I want generative/organic design tools for CAD like two months ago


not CAD but we built our own open source FEA tool. see https://tanatloc.com


OpenFOAM is open source CFD software


Great to see some game dev news on the front page!


Website not working


some clever stuff. me likey




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: