7 ms·
Introduction to Position Based Fluids
- _crumbs 13y agoThe clip showing the water interacting with breaking glass blew my mind. It may well be a while before we see anything close to that level of realism being incorporated into games though.
- Cthulhu_ 13y agoTrue, but technologies like this usually make their way into pre-rendering first, i.e. pre-rendered cutscenes in games, CGI scenes in movies, or fullly animated movies. Although the latter category hasn't seen much in the way of realism, mostly due to uncanny valleyness.
- MrScruff 13y agoThis isn't prerendered - it's real time. Prerendered water (as seen in movies) looks far more realistic than this. Check out the Naiad link someone posted above. This is great for real time though. It's using a form of SPH which is far easier to adapt for GPUs, and can crunch through those particle-particle interactions. High end offline water sims would use a different algorithm (usually FLIP), maybe run for several days to sim a few seconds and occupy 10's of Gb of memory. If anyone's interested, download a copy of Houdini Apprentice for free and have a play.
- rangibaby 13y agoThis is pretty much state-of-the-art game water (as of 2013): http://youtu.be/65slGvDLmIE http://youtu.be/65slGvDLmIE
- kevingadd 13y agoI disagree. Games like Uncharted 3 have had much more sophisticated water simulations where water is an active part of the environment. Another example would be Hydrophobia. Crysis 3 is pretty much just slapping a heightmap onto a water surface, but it's no surprise that they take the easy route there since water is not an integral part of the experience in anyway. Crysis 3 is about shootin' men and robots that look like men, not about interacting with physically simulated water. Here are slides from a presentation about Uncharted 3's water: http://twvideo01.ubm-us.net/o1/vault/gdc2012/slides/1_Visual%20Arts%20Track/Cook_Eben_Creating_Flood_Effects.pdf http://twvideo01.ubm-us.net/o1/vault/gdc2012/slides/1_Visual... I believe they've talked elsewhere about the complexity of the water sims they did for areas that involved boats and an ocean you could swim through, but I don't have a link handy.
- sp332 13y agoThere's a differenece between physical simulation and visualization. The Crysis water looks awesome, even though its behavior is radically simplified. As those slides you linked show, the water in Uncharted is simulated much more thoroughly, but the visualization is pretty hacky.
- Y0L0 13y agoParticle generators like this have been used in Hollywood for quite awhile, I bet you would have never have guessed it was CGI though.
- atdrummond 13y agoThe difference being that this demonstration is real-time.
- Y0L0 13y agoThank you for clearing that up, now this is actually impressive, although I would imagine it would require a ton of GPU & CPU power.
- zimpenfish 13y ago".074 Bitcoins worth"
- kevingadd 13y agoPhysX is aimed at running on current generation 'consumer grade' gaming hardware, so think a GPU you can get for $200 (if not less). It works out of the box on all of NVIDIA's modern graphics cards. Of course, you do have the problem of what to do when the water sim uses up all the available GPU compute power and bandwidth - not much left to render, in that case...
- incision 13y agoPerhaps it is the most realistic, but I've yet to see a fluid demo, this one included that didn't look like overly "energetic" shampoo.
- Scriptor 13y agoIt's definitely realistic, but sometimes it seems just a little off. There are times when it seems to "clump" up like a solid would when you have water particles thrown in the air. I'm not sure if that's my own bias or the uncanny valley effect at play here.
- rmrfrmrf 13y agoI noticed that too; seems like it might be a matter of making the particles smaller.
- th0ma5 13y agoWhen I look at this water, it feels as though the volume of water is the size of like an acre. Is this to exaggerate the effect or is this a limitation of our current modeling capability?
- carlob 13y agoYeah, what you're referring to is the fact that surface tension is not scale invariant. In other words: dew can only be made of smallish droplets, not large ones. I think the reason you see that is that they don't really simulate surface tension, but use a rather crude trick [0]. My uneducated guess is that in oder to achieve water that looks ok at small scales they would have to increase the size of the particles to the point it doesn't look smooth anymore. [0] equation (14) of http://mmacklin.com/pbf_sig_preprint.pdf http://mmacklin.com/pbf_sig_preprint.pdf
- wfunction 13y ago> Yeah, what you're referring to is the fact that surface tension is not scale invariant. In other words: dew can only be made of smallish droplets, not large ones. You completely blew my mind there! I'd never noticed that before. Does the size of a dew drop relate to the size of the particles? i.e. can we estimate the size of water molecules just by looking at the maximum dew drop size?
- simonsquiff 13y agoIf you have an iPad I highly recommend getting LiquidSketch. It's a great puzzler about getting pools of liquid into the right place, and the liquid effect is stunning. It moves exactly as expected, has surface tension, splits and recombines etc - but the really stunning element is colour mixing. When two groups of different colours combine the mixing of them is just utter convincing, and beautiful. Amazing how this was all done on a lowly iPad.
- MikeCapone 13y agohttp://www.liquidsketch.com/ http://www.liquidsketch.com/ There's a demo here: http://www.youtube.com/watch?v=dpNjEEtodtg http://www.youtube.com/watch?v=dpNjEEtodtg
- vilya 13y agoWhen you say "on a lowly iPad", bear in mind that the latest (4th-gen) iPad has a dual core 1.4 GHz chip plus a GPU capable of 14.4 GFLOPs. It's actually a pretty powerful machine.
- miahi 13y agoYou still cannot compare it with the GPU from the OP rendering, that does 3000 GFLOPS (GTX 680).
- jerf 13y agoI can however compare it to the famous Cray 2 supercomputer, capable of 1.9GFLOPS. Remember when we were promised we'd someday have supercomputers in our pockets? We do. Well, ok, fairly big pockets in the case of the iPad, but still, you get my point.
- vanderZwan 13y agoWe also were promised real-time raytracing if we ever got to that point. What's the hold-up?
- coherentpony 13y agoJaw-dropping? Maybe. Realistic? Nope. I work in a group with scientists whose sole job is to solve the Navier-Stokes equations. Now that's realistic.
- pvnick 13y agoYou must just be a hoot at parties
- coherentpony 13y agoOh, you haven't the slightest. :)
- aolol 13y agoPerhaps you could elaborate on this. I do agree that the title and video give slightly more credit than is due based on the current state of fluid dynamics knowledge. However do you mean your group is searching for closed-form solutions to NS or are you generating approximate numerical solutions (CFD)?
- coherentpony 13y agoApproximate solutions are found computationally. Non-trivial closed-form solutions are hopeless. Existence of solutions is a little less hopeless. Existence of solutions over small time horizons has been proven. This is all in three space dimensions. There is a theorem stating that if global-time solutions exist and are unique, then computationally computed approximate solutions are 'good'. Moreover, they get better as you refine the computational domain.
- noname123 13y agoIs finite element method good enough? Can you provide a concrete example where approximation is not good enough.
- 13y ago
- Vivtek 13y agoThe only uncanny valley effect here is that the water doesn't wet anything - everything is perfect Teflon. So it's hard to judge whether the movement of the water is perfectly realistic, because I keep looking at the transitions. If I don't look at surfaces, it seems very convincing.
- mtgx 13y agoThe color is also not right. But the animation seems almost flawless otherwise.
- pionar 13y agoReally? The color's not right? Not all liquids are the same color. Hell, not all water is the same color. But the GP is right when the water doesn't wet anything, it's kinda eerie. EDIT: Having said that, water simulation is HARD.
- Cushman 13y agoI think the point is that water is only technically blue; in small quantities like those simulated, its appearance is mostly the effect of refraction and scattering and all that fun stuff, which is a whole new can of worms. So they add some blue (or green) partly to make it more obvious what's going on, but partly to cover up for the optics not being quite right. You can see it especially in the last demo in the video. When the water spreads across the floor, it looks a little like a puddle of blue dye is diffusing into the water, and it's hard to tell how it would look if the water were more realistically transparent.
- Vivtek 13y agoOh, you people with fully functional color vision are always complaining about this kind of thing. I'll just stand over here with Van Gogh.
- hmottestad 13y agoEvery once in a while you can see a "pice of water" that should be smaller but is limited by the size of the underlying spheres.
- aethertap 13y agoThis should lead to much more interesting interactions with water in games, because now it has actual physical properties instead of just being something pretty to look at. Watching the water flow out of the aquarium makes me think that water is about to become a real active part of the game environment. Very cool.
- FuzzyDunlop 13y agoI remember Super Mario Sunshine was much lauded in the games press because of what it did with water and the effects. I absolutely loved the game but you don't really hear much about it any more.
- kvprashant 13y agoSomehow, I felt wow. I am able to appreciate this because of the number of applications it holds - Tsunami simulation, Bridge and dam construction. And real-time? Full points!
- jjoonathan 13y agoArtistic water simulation and scientific/engineering fluid simulation tend to be mutually exclusive in that they optimize for different objectives. Typically, a solution in one domain is ill-suited for the other. For instance, the "Stable Fluids" trick leads to desirable artistic properties (fluid behavior more closely matches stage direction = active energy input) at the expense of systematic inaccuracy (total energy is biased downward) that would be undesirable in an engineering context. If this technique worked equally well in both domains it would go from "impressive" to "miracle". In the meantime, we can certainly applaud it for the things it does do well!
- SiVal 13y agoDoes anyone here know what technology stack this is implemented in/with/on?
- angersock 13y agoC/C++/nVidia (formerly Ageia, formerly Novodex) PhysX.
- pcl 13y agoCool stuff, but the viscosity seemed a bit off (especially noticeable when the glass walls were shot out towards the end), and waves seemed to hold their shape for a bit too long. I wonder how hard that'll be to tweak.
- timdorr 13y agoI think the nVidia real-time ray tracing demo is more impressive: http://www.youtube.com/watch?v=w9SH8xlgzoI&feature=player_embedded http://www.youtube.com/watch?v=w9SH8xlgzoI&feature=playe... Primarily because of the distortion of the visuals through the water. This simulation fakes it somewhat, which you can see with the distortion being somewhat blocky.
- spoiledOldGuy 13y agoThat is so god-like! I give up I do not want to program anymore.
- xiaoronglv 13y agovery cool
- Keyframe 13y agoImpressive for real-time, but nowhere near realism one can get with Naiad or Realflow and a proper renderer. For example: https://vimeo.com/37536300 https://vimeo.com/37536300
- missing_cipher 13y agoI prefer their ocean simulator: http://www.youtube.com/watch?feature=player_detailpage&v=A84v7lbdcYg#t=565s http://www.youtube.com/watch?feature=player_detailpage&v...
- daemonfire300 13y agoIn jaw-dropping not-full HD.
- nobodysfool 13y agoI've never seen water simulations that can pass the U test. Basically, take a pipe, bend it into a U shape, pour the water in one side, and see if the water levels even out. If it does, then it's a very accurate simulation of water.
- andypants 13y agoWhat happens instead in the simulations that fail?
- samatman 13y agothey seesaw for far longer than is reasonable.
- nobodysfool 13y agousually the water fills up the bottom part of the U until it reaches the width of the pipe, the only one side fills up (the supply side). So if I fill up the left side of the U pipe, the water forms an L shape. On some simulations, the other side rises, but doesn't really even out.
- magoghm 13y agoI agree, the U test is very hard. I spent many days trying to make a working 2D approximation with cellular automata, but I couldn't find any way to make the pressure propagation fast enough. The water would eventually level out on both sides of the U, but it took a very long time to do it.
- panic 13y agoI think that's backwards -- if it's a very accurate simulation of water, it will pass the U test, but you can add hacks to make a simple, inaccurate system pass it, too. See, for example, Dwarf Fortress's pressure system: http://dwarffortresswiki.org/index.php/DF2012:Flow#Fluids_under_pressure.2C_aka_Teleportation http://dwarffortresswiki.org/index.php/DF2012:Flow#Fluids_un....
- tome 13y agoThis reminds me of a much older open source game where two players controlled liquids and the aim was to engulf the other liquid. I can't remember the name of the game, though.
- rip747 13y agohonestly, after watching the demonstration video, there is nothing in the video that i haven't seen in numerous hollywood films or games before. am i missing something? would someone care to explain what i should be looking for?
- gknoy 13y agoI've never seen water simulation with this degree of complexity in games. I've seen it in prerendered video sequences, but when you sit and look at a lake or river in an Elder Scrolls game (or similar), it is usually much more simplified -- or has a flow which is modeled to look pretty. The difference here is that it's showing interaction between the water particles and things that they impact on: characters, boundaries, piers, and behave in a more realistic way than games have previously had.
- alexvr 13y agoYeah, that does it. We live in a computer simulation.