Subject to the incompressibility constraint: Given these assumptions, the velocity can be described by the momentum equation: In computer animation, fluid is commonly modeled as inviscid (that is, more like water than oil) and incompressible (meaning that volume does not change over time). The motion of a fluid is often expressed in terms of its local velocity u as a function of position and time. (Note that superscripts are used to index the time step and do not imply exponentiation.) Be warned, however, that the forward Euler scheme is not a good choice numerically-we are suggesting it only as a way to think about the equations.
In other words, the value of x at the next time step equals the current value of x plus the current rate of change f ( x n, t n ) times the duration of the time step t. The reader may find it easier to think about this relationship in the discrete setting of forward Euler integration: Which says that the rate at which some quantity x is changing is given by some function f, which may itself depend on x and t. 2006 provides an excellent resource in this respect.įortunately, a deep understanding of partial differential equations (PDEs) is not required to get some basic intuition about the concepts presented in this chapter. As mentioned in that chapter, implementing and debugging a 3D fluid solver is no simple task (even in a traditional programming environment), and a solid understanding of the underlying mathematics and physics can be of great help. In particular, we encourage the reader to look at Harris's chapter on 2D fluid simulation in GPU Gems (Harris 2004). Throughout this section we assume a working knowledge of general-purpose GPU (GPGPU) methods-that is, applications of the GPU to problems other than conventional raster graphics.
Physically based animation of fluids such as smoke, water, and fire provides some of the most stunning visuals in computer graphics, but it has historically been the domain of high-quality offline rendering due to great computational cost. University of Illinois at Urbana-Champaign Real-Time Simulation and Rendering of 3D Fluids You can also subscribe to our Developer News Feed to get notifications of new material on the site.Ĭhapter 30. The CD content, including demos and content, is available on the web and for download.
GPU Gems 3 GPU Gems 3 is now available for free online!