Contents
A More Accurate Volumetric Particle Rendering Method Using the Pixel Shader
 
 
Printer-Friendly VersionPrinter-Friendly Version
 


Part of:



[More information...]
 

Latest News
spacer View All spacer
 
November 22, 2009
 
Video Game Watchdog National Institute On Media And The Family Shutting Down [11]
 
Modern Warfare 2 Infinity Ward's 'Most Successful PC Version' Yet [12]
 
New Tech, Design Details Of Project Natal To Emerge At Gamefest In February
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
November 22, 2009
 
Trion Redwood City
Sr. Evnironment Modeler
 
Trion Redwood City
Sr. Environment Artist
 
Sucker Punch Productions
3D Environment Artist
 
Sucker Punch Productions
Network Programmer
 
Sucker Punch Productions
Character Artist
 
Sucker Punch Productions
Texture Artist
 
Monolith Productions
Sr. Software Engineer, Engine - Monolith Productions - #113767
 
Sony Online Entertainment
Brand Manager
spacer
Latest Features
spacer View All spacer
 
November 22, 2009
 
arrow Upping The Craft: Susan O'Connor On Games Writing [6]
 
arrow Small Developers: Minimizing Risks in Large Productions - Part II [7]
 
arrow iPhone Piracy: The Inside Story [48]
 
arrow And Yet It Grows: Analyzing the Size and Growth of the European Game Market [5]
 
arrow NPD: Behind the Numbers, October 2009 [13]
 
arrow Reflecting On Uncharted 2: How They Did It [5]
 
arrow Sponsored Feature: Rasterization on Larrabee -- Adaptive Rasterization Helps Boost Efficiency
 
arrow Postmortem: Wadjet Eye's The Blackwell Convergence [2]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
November 22, 2009
 
Time Fcuk
 
Accepting the Inherent Value of Games
 
Planckogenesis, Part II: Song Structure & Gravy Train [1]
spacer
About
spacer News Director:
Leigh Alexander
Features Director:
Christian Nutt
Editor At Large:
Chris Remo
Advertising:
John 'Malik' Watson
Recruitment/Education:
Gina Gross
 
Features
  A More Accurate Volumetric Particle Rendering Method Using the Pixel Shader
by Mike Krazanowski
7 comments
Share RSS
 
 
June 11, 2008 Article Start Previous Page 2 of 4 Next
 

Most games consider the collision artifacts of semi-transparent particles and the environment acceptable. This is due to the abundant hardware that has been available that performs the basic interpolation functions.

In Software Development Kits (SDKs) such as OpenGL or DirectX, there have been render states defined that simply do the blend function with one function call and have been available for many years. Unfortunately, art departments have been working overtime trying to get basic particle effects in the game and looking correct to account for this one line of code.

In recent years, there has been a significant leap forward with the software developer's ability to define the functions used to render a scene in the hardware: shaders. Even on cheap consumer graphics hardware, the software developer can define almost any function imaginable (usually only limited by available registers and functions made available to the shading language).

Using pixel shaders, render-to-texture technology and a little bit of math, I claim that we can more correctly simulate the volumes that the particles were intended to represent.

The problem with current methods of rendering particles to represent volumes is that, like most geometry in games, they are not volumes. They are camera facing planes rendered with the intention to never show their depth.

Now we all know that their depth does indeed show itself if that simulated depth ever comes close to other geometry defined with real depth. The problem arises due to the fact that we are aliasing the depth into those camera facing polygons. We are taking the visual characteristics of a volume in space and flattening it to a plane, then rendering the plane back in a world with real volume characteristics.

Let's assume that we don't actually want to do this. Let's also assume that we don't want to significantly change the art pipeline the artist would perform on their first pass.

What do we need to better represent these volumes? Assumptions and math. For the purposes of this article, the following assumptions are used:

  1. That the contents of each particle are intended to be uniform density. That is if we were to take a sample in the actual volume that the particle texture was rendered from, it would be the same density as every other sample within the volume.
  2. That there are exactly two real-world boundaries implicitly defined for each pixel in the source texture. The boundaries are the near and far extents of the volume that the pixel is intended to represent.
  3. That there exists a plane that defines a mirror image of the boundary of the volume for each pixel. (This assumption will disappear in a later example).
  4. That the user has access to the actual depth values rendered for the scene occluded by the particle within the pixel shader.
 
Article Start Previous Page 2 of 4 Next
 
Comments

Ronald Mexico
profile image
Very interesting. Nice work.

Anonymous
profile image
Not sure what method UBI used, but GRAW 2 took care of this issue. Pretty amazingly realistic smoke in that game. No plane seams on the ground at all. They even made mention of their new particle tech in a pre-release, PR video.

Anonymous
profile image
How is this different from the DX10 soft particle sample?

Josiah Manson
profile image
What happens when particle volumes intersect? Do the particles act independently and double up the density, or do they somehow preserve uniform density. I think that uniform density may be achieved by having the particles write to the depth buffer.

Aaron Casillas
profile image
Great article!

I'm also interesting in learning more about "Baked" particle animations like the ones found in WOW. Is there a package out there that allows the particles system to be baked in?

Karsten Schwenk
profile image
Nice article, but I think variants of this method have been used for some time now.

My implementation uses the extinction factor to calculate the alpha value, which is a bit more physically based, and optionally also does a short ray-marching (for shadowing and non-homogeneous media). I called them 'thick particles'.

Unfortunately, from my experience, the default soft particles are usually preferable. At least in scenarios where the improved physical correctness isn't needed - and that includes almost all applications in games. Simply because they essentially do the same thing but are cheaper to render and easier to tweak for artists.

Space Games
profile image
I remember in older games like Call of Duty the smoke would just be ridiculous, going through walls and just not really conforming to what it should be doing. Recent games seem to be a lot better in that regard, including the newer Activision stuff. Interesting article either way. :)


none
 
Comment:
 


Submit Comment