Skip to content

Point Sprites vs Billboarding

by Adam on March 9th, 2005

I have noticed a few things when working with the two different concepts for textured particle effects. Here are some of the points for each.

Point Sprites

  • Quarters the vertex data that needs to be passed down the vertex pipeline
  • No need to use (s, t) coordinates for the point sprite vertex
  • Rotation is difficult
  • Disappearing particles around edges due to clipping (clips by center vertex location)
  • Sizing is dependent on glPointSize() which can’t be called between glBegin() and glEnd()
  • or Sizing is dependent on attenuation which is difficult to setup
  • Maximum sprite size is different on some cards (read: older) resulting is visual inconsistencies
  • Extension only available on newer cards

Billboarding

  • Available on all 3D hardware (and software too)
  • Rotation is easy
  • Properly rasterizes at edges of screen
  • Sizing is easy
  • Size is fine grain and unlimited
  • Four (or three) times the number of vertices needed
  • Software math required to place the vertices based on particle location
  • Need (s, t) coordinates for each vertex

So what we can see from the above is that with ARB_point_sprite you are trading in flexibility for efficiency since all problems with limitations can be programmed around (except maximum point size). For rotation of a point sprite you can use texture rotation as described in the “Million Particle” article I mentioned before or have a 3D texture with many rotated versions of the texture which you can select from using the r value of the texture coordinate (Thanks to Mark Kilgard of NVidia for that one). Unfortunately the current standard for ARB_point_sprite does not support the r coordinate so we are stuck with the first option or many texture objects. Billboarded squares don’t suffer from this problem because they can be rotated using the transformation matrix and the texture is automatically applied properly (rotated) just like any other polygon in the scene.

Currently I think that the best bet for point sprites is using billboarding (as of 2005) since in games you need the flexibility of rotation and placement so that your smoke trails look correct far away and close up. On my current card (ATI Radeon 9600 Mobility) the fill rate can’t keep up with the point sprite calls and the frame rate drops drastically as more of the screen needs to be filled with point sprites so we have unused vertex pipeline bandwidth. Why not use it?

FYI, you can download the Unreal Tournament 2004 demo from here which includes a ton of great visual effects including many particle effects. The Unreal engine is very visually fun so I recommend it for programmer inspiration. :o) (Darn, almost said it without a smile)

From → Uncategorized

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS