|
|

Last Updated:
10
/
08
/
2008
Real-Time Fire, Smoke, Weather, Liquids, Vegetation, and Terrain
Fire, smoke, landscapes, weather -- aspects of the natural world we take for granted that
require great care in real-time rendering.
Fire, Smoke, Weather, & Liquids |
Vegetation |
Terrain
- Samples from NVIDIA Graphics SDK 10.5:
- Lightning (Whitepaper)
- This sample shows how to simulate and animate different kinds
of lighting effects using DirectX10 features. The structure of
a lightning beam is created by using fractal subdivision of
line segments, efficiently implemented using geometry shaders
and stream out. A geometry shader is then used to create camera
facing billboards with a procedurally created color gradient.
The atmospheric glow effect is implemented by downsampling and
blurring the rendered bolts of lighting using a Gaussian filter
kernel with separate extinction coefficients per color channel
in order to fake atmospheric scattering.
- Smoke (Video)
- This demo shows how to simulate and render real-time three
dimensional smoke and Fire. Both simulation and rendering are
made easier using DirectX 10's new render to 3D texture
functionality. The Smoke and Fire also correctly interact with
moving objects in thier path and composite seamlessly into the
scene.
- Rain (Whitepaper)
- This sample shows how to animate and render rain as a particle
system entirely on the GPU. Stream out is used to animate the
rain particles over time, and the geometry shader is used to
extrude rain particles into quads at render time. Rain
particles are realistically rendered using precomputed textures
(indexed by light direction and viewing direction) which are
stored in a texture array.
- Soft Particles (Whitepaper)
- Particle sprites in games commonly produce artifacts –
unnaturally sharp edges – where they intersect the rest of the
scene. This sample shows two ways to fade out flat sprites
against a 3D scene, softening the artificial edges. Two
solutions are implemented: one uses the ability of DirectX10 to
read the depth buffer as a texture; the other uses a more
conventional second render target to store depth values. - one
other rendering Z in a 2nd render target.
- Perlin Fire (Whitepaper)
- This sample uses an improved Perlin noise algorithm on the GPU.
This method renders realistically animated fully procedural
fire, with individual uniquely animated flame shapes generated
in a pixel shader that uses three-dimensional simplex flow
noise or four-dimensional simplex noise. The improved Perlin
noise algorithm requires many complex scalar computations,
making it a great match for the scalar architecture of the
NVIDIA® GeForce® 8800 GPU.
- Samples from NVIDIA Graphics SDK 9.52:
- Snow Accumulation (Whitepaper)
- This sample shows a technique for procedurally adding snow to a
"non snow" scene.
- Vertex Texture Fetch Water (Whitepaper)
- This sample demonstrates a technique for simulating and
rendering water. The water is simulated via Verlet integration
of the 2D wave equation using a pixel shader. The simulation
result is used by a vertex shader via vertex texture fetch
(VTF). The water surface is rendered by combining screen-space
refraction and reflection textures.
- Water Interaction (Whitepaper)
- Render-to-texture is used to drive a procedural simulation of
water. The water is rendered with a technique similar to
environment mapped bump mapping (EMBM), but an enhancement
allows the EMBM rotation matrix to vary per-vertex and fade the
bumps out as distance to the viewer increases. This sample
requires vertex and pixel shaders 1.1.
- Rainbow Fogbow (Whitepaper)
- This demonstrates how to render a physically modeled rainbow in
realtime. It does so by using a lookup texture with the color
of scattered white light given the angle between a view vector
and a light vector. To blend the rainbow nicely with the scene,
the scene is rendered encoding moisture data in a texture and
using this to change the intensity of the rainbow. This same
technique can also be used to render halos, corona, fogbows,
and any other radially symetrical optical light scattering
effects.
- GPGPU Fluid (Whitepaper)
- This code sample demonstrates fast, realistic fluid dynamics
simulation on the GPU. The sample solves the Navier-Stokes
equations for incompressible fluid flow using a technique
originally presented at SIGGRAPH 1999 by Jos Stam. The sample
allows the user to draw arbitrary obstacles and flow viscous or
inviscid fluid around them.
- GPU Particles (Whitepaper by Lutz Latta)
- This sample implements a large-scale particle system entirely
on the GPU. The positions and velocities of each particle are
stored in floating point textures. Fragment programs are used
to update the velocities and positions of the particles by
rendering to texture each time step. The particles also collide
against a sphere object, and a terrain heightfield which is
stored in a texture. If available, the multiple draw buffers
extension (MRT) is used to update the position and velocities
in a single pass. The particles are rendered as point sprites.
The position texture is converted into a vertex array for
rendering the particles using the vertex buffer and pixel
buffer object extensions (VBO and PBO). On the GeForce 6800,
this method can render a million particles at about 20 frames
per second. This example is inspired by Lutz Latta's talk from
GDC 2004, "Building a
Million Particle System".
- Vertex Shader Water
- This sample gives the appearance that the viewer is surrounded
by a large grid of vertices (because of the free rotation), but
switching to wireframe or increasing the frustum angle makes it
apparent that the vertices are a static mesh with the height,
normal, and texture coordinates being calculated onthe-fly
based on the direction and height of the viewer. This technique
allows for very GPU-friendly water animations because the
static mesh can be precomputed. The vertices are displaced
using sine waves, and in this example a loop is used to sum
five sine waves to achieve realistic effects.
- Vertex Noise
- This example demonstrates an implementation of Perlin noise
using vertex programs. An animated 3D noise function is used to
displace the vertices of a sphere along the vertex normal. The
geometry is entirely static, but is displaced on the fly by the
vertex program hardware. Perlin noise is implemented for the
vertex program profile using recursive lookups into a
permutation table stored in constant memory. The size of this
table determines the period at which the noise function
repeats. 3D noise costs around 65 instructions, 2D noise around
45, 1D noise around 20.
- GPU Gems 2 online:
- Chapter
13. Implementing the mental images Phenomena Renderer on the
GPU
- Chapter
16. Accurate Atmospheric Scattering
- Chapter
18. Using Vertex Texture Displacement for Realistic Water
Rendering
- Chapter
26. Implementing Improved Perlin Noise
- GPU Gems online:
Part I,
Natural Effects
- Chapter
1. Effective Water Simulation from Physical Models
- Chapter
2. Rendering Water Caustics
- Chapter
5. Implementing Improved Perlin Noise
- Chapter
6. Fire in the "Vulcan" Demo
- Chapter
8. Simulating Diffraction
- GDC 2008: Particle-Based Fluid Simulation for Games (Video)
- The computational power of modern GPUs has reached the point where
realistic free-flowing fluids can be simulated and rendered in
real-time. This talk will provide an overview of fluid simulation
techniques for games and then describe in detail the advantages of
particle-based simulations and how they can be implemented
efficiently on the GPU.
- GDC 2007:
- Siggraph 2007: Smoke, Fire, and Water with Fluid Dynamics
- Physically based animation of fluids such as smoke, water and fire
provides some of the most stunning visuals in computer graphics,
but has historically been the domain of high-quality offline
rendering due to its great computational cost. In this
presentation we will talk about how to simulate and render these
effects in real time on the GPU, and also how to build a unified
system that seamlessly integrates these effects into real time
applications such as video games.
- Samples from NVIDIA Graphics SDK 10.5:
- Christmas Tree (Whitepaper)
- Chistmas Tree demonstrates using new fourth generation shader
capabilities to render a visually complex Christmas Tree. The
sample uses deferred shading into a high dynamic range
framebuffer object to handle the complex lighting
environment
- GPU Gems 2 online:
- Chapter
1. Toward Photorealism in Virtual Botany
- GPU Gems online:
Part I,
Natural Effects
- Chapter
7. Rendering Countless Blades of Waving Grass
- GDC 2007:
- Samples from NVIDIA Graphics SDK 10.5:
- Clipmaps (Whitepaper)
- Clipmaps are a feature (first implemented on SGI workstations)
that allow mapping extremely high resolution textures to
terrains. The original SGI implementation required highly
specialized, custom hardware. The advanced features of the
NVIDIA® GeForce® 8800 now permit the same algorithm using
consumer hardware.
- Soft Particles (Whitepaper)
- Particle sprites in games commonly produce artifacts –
unnaturally sharp edges – where they intersect the rest of the
scene. This sample shows two ways to fade out flat sprites
against a 3D scene, softening the artificial edges. Two
solutions are implemented: one uses the ability of DirectX10 to
read the depth buffer as a texture; the other uses a more
conventional second render target to store depth values. - one
other rendering Z in a 2nd render target.
- Texture Arrays (terrain) (Whitepaper)
- This sample is a simple example using Texture Arrays in DX10.
It uses a texture array as a palette of terrain textures to
render a terrain mesh with many textures in a single draw call.
A similar effect in previous APIs would require a texture atlas
or multiple draw calls.
- Transform Feedback Fractal (Whitepaper)
- "Transform Feedback Fractal" shows an advanced use of the
transform feedback and the geometry shader, by iteratively
feeding the data through the transformation stages, adding more
detail each time.
- Samples from NVIDIA Graphics SDK 9.52:
- Snow Accumulation (Whitepaper)
- This sample shows a technique for procedurally adding snow to a
"non snow" scene.
- GPU Particles (Whitepaper by Lutz Latta)
- This sample implements a large-scale particle system entirely
on the GPU. The positions and velocities of each particle are
stored in floating point textures. Fragment programs are used
to update the velocities and positions of the particles by
rendering to texture each time step. The particles also collide
against a sphere object, and a terrain heightfield which is
stored in a texture. If available, the multiple draw buffers
extension (MRT) is used to update the position and velocities
in a single pass. The particles are rendered as point sprites.
The position texture is converted into a vertex array for
rendering the particles using the vertex buffer and pixel
buffer object extensions (VBO and PBO). On the GeForce 6800,
this method can render a million particles at about 20 frames
per second. This example is inspired by Lutz Latta's talk from
GDC 2004, "Building a
Million Particle System".
- Vertex Noise
- This example demonstrates an implementation of Perlin noise
using vertex programs. An animated 3D noise function is used to
displace the vertices of a sphere along the vertex normal. The
geometry is entirely static, but is displaced on the fly by the
vertex program hardware. Perlin noise is implemented for the
vertex program profile using recursive lookups into a
permutation table stored in constant memory. The size of this
table determines the period at which the noise function
repeats. 3D noise costs around 65 instructions, 2D noise around
45, 1D noise around 20.
- GPU Gems 2 online:
- Chapter
2. Terrain Rendering Using GPU-Based Geometry Clipmaps
- Chapter
7. Adaptive Tessellation of Subdivision Surfaces with Displacement
Mapping
- Chapter
8. Per-Pixel Displacement Mapping with Distance Functions
- Chapter
12. Tile-Based Texture Mapping
- Chapter
16. Accurate Atmospheric Scattering
- Chapter
26. Implementing Improved Perlin Noise
- GPU Gems online:
Part I,
Natural Effects
- Chapter
5. Implementing Improved Perlin Noise
- GDC 2007:
- Siggraph 2008:Adaptive Terrain Tessellation on the GPU
- ( Japanese Version )
- Next-generation techniques implement highly-programmable
tessellation entirely on the GPU. We explain how tessellation can
be applied to terrain rendering with displacement mapping. Our
tessellation scheme is adaptive, with the polygon LOD varying as a
function of terrain roughness and also with view-dependent
silhouette detection.
Want to Learn More?
NVIDIA Documentation Home Page
|
|
  |