If 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.
When 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.
Real time raytracing is vary doable and high quality, it's just we got really good at rasterisation. Consider a 2012 demo http://www.youtube.com/watch?v=h5mRRElXy-w it's cool and all but what seperates it from rasterisation is fairly subtle and the computing costs are rather high.
You can totally do real-time raytracing. I wrote my first raytracer a couple of weeks ago — http://canonical.org/~kragen/sw/aspmisc/my-very-first-raytra... — and it gets about 4fps on simple scenes on my netbook, despite being the product of only a few hours of work. If you use a GPU and/or SSE and/or a faster CPU, you should easily hit full-motion video.
My netbook is probably half the speed of an iPad.
It would be fun to put together a custom OS-less AMI to raytrace partial frames in realtime on EC2. 20 instances spun up in a few hundred milliseconds could do pretty substantial real-time raytracing.
Alternately, do lots of bounces with fewer rays, decrease the total dynamic range, and add a consistent noise/grain filter. Realistic raytraced night-vision :)
The CPU pulls tens of GFLOPs in single precision, too (and > 5 GFLOPs double precision!) It’s at least as powerful as any desktop you are likely to have had a decade ago.
I had the same concern, but after having a mini for a while, I can tell you that I don't notice the lack of retina resolution at all. They hold their value really well too - I highly recommend just getting one now and selling it once retina comes out.
The 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.
Really? 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.
I 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.
Also I think a cube of water at 1:50 that holds its shape until it hits a rabbit does not reflect how a real water would behave. But overall I find this simulation very compelling.
Perhaps 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)?
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.
At this time NS solutions are all approximate, but there's a huge gulf between plausible-looking fluids (as in story), and fluids with pressure, velocity distributions accurate enough for analysis (to design an airplane). And within the latter there are further demarcations depending on the type of fluid analysis, where errors manifest as extremely subtle (pressure looks slightly high, vortices dissipate too quickly or too slowly) and judging the best algorithm for a problem becomes almost an art.
I am SQA Engineer for Autodesk Simulation CFD and our recent 2014 version has free surface modeling: https://www.youtube.com/watch?v=WNKHf937Qt0. It does make pretty pictures but as you mentioned solving navier-stokes equations can get complicated :)
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.
This 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.
I 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.
When 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?
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.
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.
> 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?
The 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.
True, 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.
This 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.
I 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:
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.
There'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.
I'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.
I 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_un....
I 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.
usually 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.
Cool 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.
It'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.
This 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.
Somehow, 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!
Artistic 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!
PhysX 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...
honestly, 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?
I'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.