Algorithmically generating neon layers on pixel grid

Posted by user190929 on Game Development See other posts from Game Development or by user190929
Published on 2012-09-08T17:17:46Z Indexed on 2012/09/08 21:49 UTC
Read the original article Hit count: 353

Filed under:
|

In an attempt at a screensaver I am making, I am a fan of neo-like graphics, which, of course, look great against a black background. As I understand it, neon, graphically speaking, is essentially a gradient of a color, brightest in the center, and gets darker proceeding outward. Although, more accurate is similar, but separating it into tubes and glow. The tubes are mostly white, while the glow is where most of the color is seen. Well... the tubes could also be a light variant of the color, you could say. The glow is darker.

Anyhow, my question is, how could you generate such things given an initial pattern of pixels that would be the tubes? For example, let's say I want to make a neon 'H'. I, via the libraries, can attain the rectangles of pixels which represent it, but I want to make it look neonized. How could I algorithmically achieve such an effect given a base tube shape and base color?

EDIT: ok, I mistated that. Got a bit distracted. My purpose for this was similar to a neon effect, but not. Sorry about that. What I am looking for is something like this:

Start with a pattern of pixels:

[!][!][!][!][!][!][!][!]
[!][!][O][!][!][!][!][!]
[!][!][O][O][!][!][!][!]
[!][!][!][!][O][!][!][!]
[!][!][!][!][!][!][!][!]

How to I find the U pixels?

[!][E][E][E][!][!][!][!]
[!][E][O][E][E][!][!][!]
[!][E][O][O][E][E][!][!]
[!][E][E][E][O][E][!][!]
[!][!][!][E][E][E][!][!]

Sorry if that looks bad.

© Game Development or respective owner

Related posts about c++

Related posts about graphics