Games have included basic object physics for years, but real-time fluid simulations have remained elusive. Sure, we've seen some tech demos of tentative approaches, but simulated liquids have always looked more like jello or tapioca pudding than actual water—close, but no cigar.
Well, hold on to your hats, because Nvidia staffers have come up with a new technique to simulate fluids using PhysX, and the results are pretty true-to-life. See for yourself:
The demo is the result of research by Miles Macklin and Matthias Müller, who have published a paper (PDF) detailing their work. The paper will be presented at SIGGRAPH 2013 in a couple of months. Here's the abstract:
In ﬂuid simulation, enforcing incompressibility is crucial for realism; it is also computationally expensive. Recent work has improved efﬁciency, but still requires time-steps that are impractical real-time applications. In this work we present an iterative density solver integrated into the Position Based Dynamics framework (PBD). By formulating and solving a set of positional constraints that enforce constant density, our method allows similar incompressibility and convergence to modern smoothed particle hydrodynamic (SPH) solvers, but inherits the stability of the geometric, position based dynamics method, allowing large time steps suitable for real-time applications. We incorporate an artificial pressure term that improves particle distribution, creates surface tension, and lowers the neighborhood requirements of traditional SPH. Finally, we address the issue of energy loss by applying vorticity confinement as a velocity post process.
Yep. Uh-huh. Totally understood every word of that.
The lighthouse simulation is shown running at 15 FPS on a GeForce GTX 680, which isn't outlandishly fast by today's standards. (It's over a year old.) Of course, aside from the water, the 3D scene being rendered isn't that complex. It may take substantially more horsepower to implement the same simulation in a modern game.
Speaking of which, I hope game developers will be able to use the algorithms described in the paper to do similar work using a cross-vendor API—say, DirectCompute. There's nothing wrong with PhysX, but limiting this kind of technology to a single GPU vendor may reduce the likelihood of a major game using it in a meaningful way.
|1. BIF - $340||2. chasp_0 - $251||3. mbutrovich - $250|
|4. Ryu Connor - $250||5. YetAnotherGeek2 - $200||6. aeassa - $175|
|7. End User - $150||8. Captain Ned - $100||9. Anonymous Gerbil - $100|
|10. Bill Door - $100|
|Intel 600P Series SSDs bring NVMe into the M.2 mainstream||20|
|PCIe 4.0 won't actually deliver 300 watts from the slot||24|
|iOS 9.3.5 fixes serious zero-day vulnerabilities||7|
|Canon EOS 5D Mark IV offers more pixels and better autofocus||46|
|Adata Ultimate SU800 SSDs use floating-gate 3D NAND||6|
|Thermaltake's Core G3 ATX chassis is slim and trim||12|
|Alienware desktops with Polaris cards get caught on camera||17|
|AMD and Nvidia court gamers with new pack-in bundles||41|
|First Deus Ex: Mankind Divided patch focuses on crash fixes||33|
|The Scott Wasson effect at work.||+27|