See what's going on with flipcode!




 

2D Glow Effect
Question submitted by (28 December 1999)




Return to The Archives
 
  I have seen the 2D effect of "Glow" in many places but I do not understand how to achieve this effect. In particular I would like to have the particles in a particle engine "glow" as they are emitted from a ships engine. Is there a trick or a formula to this or do you simply create the appropriate bitmaps in your favorite graphics package and display them in sequence?  
 

 
  There are a number of ways to do this. The easiest it to enlarge the bitmap and draw it semi-transparently with a 25-75 or 50-50 blend from the dest->source so that you get an outline, then draw it normal size in the middle. Which should give you a glowing look around the edges, as its ghosted and spread out from the center.

Any article on blending (sometimes called Alpha blending even when not using an alpha (light) channel) will show you how to do this.

There's one here.



Response provided by Geoff Howland
 
 

This article was originally an entry in flipCode's Fountain of Knowledge, an open Question and Answer column that no longer exists.


 

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.