Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I do a fire effect in 9 lines?
#11
yeah, i saw it, it's really fantastic. i dont think i understand teh effect though (mine is a run-of-the-mill "blur upwards" routine Big Grin)
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#12
MIne is also an 1 pixel shifted blur, but with these issues:

* 1st of all, I read 9 dots (the center dot and the 8 that surround it), which are added and divided by 8, not by 9, so it isn't an average.

* The secret is not overwriting the source image instantly. A new image is built from the original, and then that image overwrites the original 1 pixel up.

This is called "convolution". In a convolution, you calculate each pixel of a new image (transformed image) applying a matrix to a group of pixels centered in the current one and measuring the same than the matrix in the original image. Applying means doing a multiplication of each matrix member to each pixel, adding all the values, saturating the result (so it doesn't exceed 255) and writing with that value the new pixel. The twist is that we are shifting the pixels 1 position up.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)