Slashdot Mirror


Making Animated Fluids Look More Realistic

brunascle writes "Technology Review has an article about recent advances in animated fluid dynamics made by Mathieu Desbrun, a computer science professor at Caltech. 'He and his team are developing an entirely new approach to fluid motion, based on new mathematics called discrete differential geometry, that use equations designed specifically to be solved by computers rather than people.' Desbrun explains that the currently in-use equations for animating fluid dynamics were not developed with computers in mind, and were simply reworkings of older equations. He claims that his new equations use about the same amount of computer resources, but with much better results. The article includes a 5 minute (flash) video demonstrating various results using his equations, ending with 2 fascinating and vivid displays: the first of a snowglobe, and the second of a cloud of smoke filling a volume in the shape of a bunny."

14 of 124 comments (clear)

  1. Not just "a bunny" by exp(pi*sqrt(163)) · · Score: 4, Informative

    That's the Stanford Bunny.

    --
    Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
  2. Fluids in games by PIPBoy3000 · · Score: 4, Insightful

    For us gamers, the cool application is clearly fluids in games. Currently water is a flat plane with a bump map, or possibly an animated plane that is extremely simple. Modern game engines are trying to have some simple fluid dynamics, but it's extremely CPU intensive.

    The article talks about breaking problems into smaller pieces, which means that it should work well with multi-core processors. Probably you'll first see "cosmetic" fluid dynamics, which don't affect gameplay, but still look pretty cool. Imagine characters splashing in water, setting off waves, creatures vaporizing into a puddle, and so on. Should be cool.

    1. Re:Fluids in games by Soko · · Score: 4, Funny

      Probably you'll first see "cosmetic" fluid dynamics, which don't affect gameplay, but still look pretty cool

      Oh. I'd say that more realistically rendered fluid dynamics applied to, um, certain feminine features of a certain games heroine, would greatly enhance gameplay, especially visually.

      Soko

      --
      "Depression is merely anger without enthusiasm." - Anonymous
    2. Re:Fluids in games by Xzzy · · Score: 4, Insightful

      We're still a long, long way from doing this in real time.

      In a general sense, computer graphics follow a pattern where someone researches a new method, the ray tracing community adopts it into their tools, refine the technology, then some sharp thinking programmer hacks up a way to approximate the effect so it can be done in real time in a game. Bump mapping, for example, was first introduced in 1996. We didn't start seeing it heavily used in games until around 2004, and it was a combination of advancing computing power and optimization.

      Not that I'm an expert, but based on this I'd guess we're at least 8 years away from having fluid simulation in whatever the FPS of the month is.

    3. Re:Fluids in games by Anonymous Coward · · Score: 4, Informative

      Bump mapping was invented in 1978 by James Blinn and has been available in non-realtime rendering ever since. By 1996 it was a reasonably common effect in realtime software renderers (as in, everybody who wanted to show off their coding skillz had to have bump mapping in their rendering engine). But it was not easy to do bump mapping with the first-generation consumer-level 3D accelerators like 3dfx voodoo so people basically forgot about it as they moved onto hardware accelerated graphics... Until pixel shaders reintroduced the programmable pixel pipeline.

  3. Funding by skinfitz · · Score: 5, Funny

    Like many technological advances, this could find funding from the porn industry...

  4. Need "Before" and "After" animations by dpbsmith · · Score: 4, Interesting

    The animations are impressive, but so was the animated water in Titanic and A Perfect Storm. I wish they had featured a comparison of the same animation, performed with the same computer resources, using the traditional and new methods.

  5. video is gone by brunascle · · Score: 4, Informative

    hmm... the video i was talking about is gone, replaced by the 2nd one under "Multimedia." sorry about that. the other 2 are still good though. the smoke is in the first one. too bad, though, the snowglobe was great.

  6. More Cutting-Edge Graphics Videos by cyberanth · · Score: 5, Informative

    Ron Fedkiw at Stanford also has a lot of very impressive demonstrations of liquids, smoke, fire, cloth, rigid bodies, elasticity, and fracturing. The videos are definitely worth checking out: http://graphics.stanford.edu/~fedkiw/ I especially like the water being poured into the glass. It's nearly photo realistic.

  7. Real-world applications? by RobertB-DC · · Score: 4, Interesting

    While I'm sure the gee-whiz factor of more accurately simulating Lara Croft swimming is the hook for the story, shouldn't it at least pay lip service to real-world applications of this new technique? Wind-tunnel testing is one area that currently requires massive physical facilities, and would clearly benefit from this research -- air is a "fluid", too. You could even apply it to thicker fluids, perhaps devising new ways to fabricate items from glass or non-destructively test metal part designs for weaknesses that wouldn't have been otherwise revealed.

    Though the importance of properly modelling Lara Croft's swimsuit can hardly be overstated.

    --
    Stressed? Me? Of course not. Stress is what a rubber band feels before it breaks, silly.
  8. Re:Roughly analygous to FEA? by bockelboy · · Score: 5, Informative

    No, it has nothing to do with the finite element/difference methods at all.

    In fact, it's a fundamentally different approach from both of those methods. Finite element/difference means that you think of the problem as a continuous, smooth manifold. Then, you break the manifold into chunks (discretize) it, and you apply the "natural laws" like they would work on a smooth surface to the discretized approximation. The idea is that, the smaller the chunks, the errors becomes too small to notice.

    However, in some cases the discretization process causes quantities (like total energy of the system) to not be conserved. The little errors add up to a lot. In fluid dynamics, non-conserved quantities cause solutions to the systems that just look wrong to the casual observer.

    This team's approach is fundamentally different. Instead of discretizing a continuous problem involving a smooth manifold and continuous operators, they think of the problem as discrete to begin with and define operators on the discrete geometry. They don't say "apply the derivative to an approximation of a smooth surface", they say "apply this discrete derivative-like operator to this discrete surface". It turns out that if you define your discrete operators correctly, you can focus on conserving quantities (such as total system energy) that the normal approximation to the derivative won't.

    It offers no speedup in computation time, and probably has no parallelization opportunities beyond those normally there in fluid dynamics. However, it *does* produce better-looking solutions as all of the conservation laws are met.

    Very interesting research.

  9. It's not clear by GuyMannDude · · Score: 5, Insightful

    Remember that just because a simulated fluid flow "looks" more accurate, that doesn't mean that it is. The article isn't very technical at all so it's difficult to tell what's going on here. But the way it is phrased leads me to believe that they are solving new equations rather than using new techniques to solve the well-known traditional equations (e.g., Navier-Stokes, Euler, vorticity evolution equation, etc.). The result may be that the new equations are less accurate in a point-wise sense but the resulting gross observable features of the flow may look more natural. Your eye can't tell the difference between errors O(h) and O(h^2) where h is the grid spacing, but it can certainly tell if artificial viscosity from the numerical scheme causes obvious features of the flow, such as shock waves or density discontinuities, to diffuse with time.

    The applications you list require that the estimates of velocity, pressure, etc. come out accurately, and not that the resulting animated fluid flow passes the "looks plausible" test. When you're doing computational fluid dynamics solely for graphics, however, the pointwise accuracy doesn't mean squat; you want something that looks nice. I'm guessing that they've come up with a method that is optimized to make pretty movies at the expense of true numeric accuracy of the flowfield. But, again, the article is worded so generically, it's hard to tell what's going on.

    GMD

    1. Re:It's not clear by Pseudonym · · Score: 4, Informative

      Remember that just because a simulated fluid flow "looks" more accurate, that doesn't mean that it is.

      In fact, just the opposite. The entertainment industry (e.g. animation/vfx) wants fluids that will obey a director rather than the laws of physics, while remaining as credible as possible.

      I have read the SIGGRAPH course notes. They are indeed solving the Navier-Stokes equations. Because this is for the entertainment business, they want to retain as much visual detail as possible while keeping the time step as large as possible.

      Previous approaches are based on techniques developed for astrophysics, meteorology and oceanography, where you don't care so much about the small-scale detail. To overcome this, previous approaches either modelled more viscous fluids, such as melting wax (see House of Wax for onex example) where there fine-scale detail dissipates quickly anyway, or went to some trouble to mimic the propagation of the detail. One common approach, for example, is to take the curl of the velocity field ("vorticity"), advect it, then add a bit back. Yeah, it looks pretty good.

      The main advances of this approach are two-fold. One is that instead of using Lagrangian particles or an Eulerian grid, they're using a simplicial grid which matches exactly the geometry of the environment, which means that interactions with the environment are exact.

      Secondly, and this is the key bit, rather than separate "a bit" of the vorticity, they treat it as a completely separate variable. The advantage is that the vorticity field, being the curl of a vector field, is inherently divergence-free. Previous techniques had to manually zero-out the divergence in a separate step, which was usually the expensive part.

      OK, if you didn't understand that, think about what's happening physically. The fluids that you generally care about in visual effects/animation are incompressible at the scales that you care about. Think of a glass of water, for example. Water in a glass isn't really incompressible, but it is close enough because the "speed of sound" in water is huge, when you consider the size of a glass and the length of a single frame of film.

      So the water is effectively incompressible, which means it has an effectively infinite spend of sound. That means that if you "push" it in one place, then for the water to conserve its volume/mass (volume is proportional to mass in an incompressible fluid, remember), displacement elsewhere will have to happen instantaneously. That means that in general, you can't just make decisions locally; there needs to be a step in the solver which propagates these pressure effects over the whole fluid in one step.

      The advance of this new method is hard to explain, but it uses a formulation that avoids this error-prone step completely. It's not free, since it requires that you convert between vorticity and flux. And it's hard to see how you'd model some of the more difficult forces like surface tension. But it's pretty impressive nonetheless.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  10. Paper by MajroMax · · Score: 4, Informative

    What the CFD-literate Slashdotters will want to read is the actual paper (warning, pdf) that the article is based upon.

    It's a neat method, but it's nothing revolutionary. The upshot is that their method tries to conserve vorticity (fluid spin) better than the other methods currently used for graphics, with the aim of getting rid of hacks that are now necessary to Make Things Look Good. The entire spin (no pun intended) in the article about "equations for computers, not for people" is journalistic sensationalism.

    All told, it's a vorticity-based Finite Element Method, which is solved as a sparse linear system. Cool pictures, though.

    --
    "Evil company X is threatening to restrict our rights! Let's all get together to stop--OOOH! SHINEY!!!" -- AC