Sign in to follow this  
IcedCrow

Glowing boxes Tutorial Needed (2D)

Recommended Posts

IcedCrow    267
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.

[img]http://baelsoubliette.files.wordpress.com/2011/05/stage1_1.jpg[/img]

Share this post


Link to post
Share on other sites
Hodgman    51336
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.

Share this post


Link to post
Share on other sites
IcedCrow    267
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this