Glow effect in 2D mode?

Blitz3D Forums/Blitz3D Programming/Glow effect in 2D mode?

andy_mc(Posted 2006) [#1]
Does anyone know how I can do a glow effect around lines drawn in 2D graphics mode, as in asteroids and warzone to add authenticity?


bytecode77(Posted 2006) [#2]
you can do it in 3d;
- render the screen to a texture
- make this texture blurry
- draw the texture over the screen again and render


LineOf7s(Posted 2006) [#3]
This sounds interesting.

The whole "make this texture blurry" part though: can you point me in the right direction? I don't mind learning stuff for myself, but my mind-numbing lack of 3D knowledge leaves me with no idea where to start looking...

...and I know you're all so helpful. :o)

[edit] Feel free to answer, but know I'm currently doing the search of the forums I should have done before I posted. [/edit]

[edit2] Sweet - found this thread from 2 years ago, back when people still used Blitz3D for this sorta thing, not BlitzMax. ;o) [/edit2]


Sledge(Posted 2006) [#4]

"make this texture blurry"



Render to a smaller viewport - you will get it blurred for free when you render it as a scaled-up texture.


LineOf7s(Posted 2006) [#5]
Thanks Sledge!


Pongo(Posted 2006) [#6]
another way is to simply create the graphic lines that already have a glow on them. Then you can use additive mixing for a nice glow feel. You will need to be using 3d, or at least 2d in 3d to do this in blitz3d. I used this method for Neon Blast. You can see an early build example here:

http://www.blitzbasic.com/Community/posts.php?topic=55011#616071

There is an .exe download, and also an .mpg movie there to look at. If you download the game take a look at the images in the GFX directory,... they have the glow pre-applied to them. Excellent glowing effect with very little processing required!


Stevie G(Posted 2006) [#7]
@ Troy, you still working on this?


Pongo(Posted 2006) [#8]
I wouldn't say it's dead, but I haven't worked on it in a while either. A bunch of other games like this were popping up all over, and I didn't want it to get lost in the crowd. Also as you know I was converting it over to a single surface system, and that part is mostly done.

We moved to a new house this summer, so most of the spring was spent getting the old house ready,... then once we got settled in to the new house, a tornado tore apart the neighborhood. (destroyed my garage and part of the roof) I just got the garage finished up a few weeks ago, and the new roof is going on next week, so that has been quite time consuming.

Anyways, I would like to return to it some day, and just last week I was working on some new sound effects for it, but things are very slow.


bytecode77(Posted 2006) [#9]
well, you could use a backbuffer glow algorithm/image proccessing function. but this would be damn slow. so better use 3d on that one^^
there are quite a few glow effects in the code archives. pick one (;