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.
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.
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?
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.
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.
"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.
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.
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.
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.
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.