Glowing boxes Tutorial Needed (2D)

Started by
1 comment, last by IcedCrow 12 years, 10 months ago
If you check out my signature blog you will see a screenshot of a wargame I am working on.

While the art is chincy right now (I'm trying to get it to work right now and then make it pretty later), I have run into a tough spot that I cannot find a decent tutorial on.

Basically I have models on a simulated game table surface. The models are all rectangular. When I select a model or group of models through dragging, I want them to be surrounded by a glowing blue border to indicate that they are active or selected.

Right now I can surround them with a blue line but I do not know how to make it glow. (essentially what I do to surround them with a blue line is to draw four rectangles that are 2 pixels wide to create the box effect, in effect creating four lines that I join together to form the blue rectangle border) This game, by the way, is entirely 2D.

Where is a good launch point to getting these blue lines to glow? I feel that there is some blooming in order. Is that it? I'm not much of a graphics wizard unfortunately, I am mostly a logic programmer, so some of these terms, while I know them, I cannot apply them fully.

The image below is a screen. The purple boxes represent three "models' that I am using to represent swordsmen. When I click on one or drag a box around all I want them to be surrounded by a glowing blue box to indicate that they are selected.

stage1_1.jpg
For more on my wargaming title check out my dev blog at http://baelsoubliette.wordpress.com/
Advertisement
Blooming is probably overkill. In your favorite image editor, draw a blue line in a texture over a black background, then blur the image so it fades from blue into black.
Then texture your 'line' quads with that image and use additive blending.
Thanks for the reply... let me see if I can piece that together lol:

So go into photoshop (or wherever), draw a 2 pixel blue line over black backdrop, apply blur to it... save it... apply it to the rectangle's textures....

I'm not sure what additive blending is at this point though?

Edit: Google-fu is good. I'll need to find a good tutorial on that one. Reiners has a good page but doesn't flow as well as I'd like.
For more on my wargaming title check out my dev blog at http://baelsoubliette.wordpress.com/

This topic is closed to new replies.

Advertisement