I'm messing around with the basics of a vector game, sort of like Asteroids, Bitfighter, or Geometry Wars. For optimum coolness factor, I'm trying to figure out a convenient way to make the lines sort of shimmer or glow, like they did on those old arcade screens.
Kenta Cho uses the effect a lot in his games, but from his source code, it looks like he makes some OpenGL calls to accomplish it. Does Love has access to this stuff, or do I need to use an external library or something?
A non-OpenGL method of doing this seems to be to copy a portion of the drawing surface, blur it (maybe increase saturation?), then slap it down right before the next drawn frame. The blur has to be very efficient though; otherwise things start crawling. I'm looking at Love's documentation though, and I don't see an easy way to do that, either. Am I missing something?
http://www.blackpawn.com/texts/blur/default.html
http://incubator.quasimondo.com/process ... stblur.pde
Thanks!
Easy way to make fancy glowing vector lines?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 8
- Joined: Sat Jan 31, 2009 7:10 pm
Re: Easy way to make fancy glowing vector lines?
I don't quite understand what you mean, but if you want to change the alpha of something for a "pulse" effect, use:JamesGecko wrote:I'm messing around with the basics of a vector game, sort of like Asteroids, Bitfighter, or Geometry Wars. For optimum coolness factor, I'm trying to figure out a convenient way to make the lines sort of shimmer or glow, like they did on those old arcade screens.
Kenta Cho uses the effect a lot in his games, but from his source code, it looks like he makes some OpenGL calls to accomplish it. Does Love has access to this stuff, or do I need to use an external library or something?
A non-OpenGL method of doing this seems to be to copy a portion of the drawing surface, blur it (maybe increase saturation?), then slap it down right before the next drawn frame. The blur has to be very efficient though; otherwise things start crawling. I'm looking at Love's documentation though, and I don't see an easy way to do that, either. Am I missing something?
http://www.blackpawn.com/texts/blur/default.html
http://incubator.quasimondo.com/process ... stblur.pde
Thanks!
Code: Select all
math.sin(os.clock())*255
Re: Easy way to make fancy glowing vector lines?
If it's glowing, it probably involves additive blending. [love.graphics.setBlendMode(love.blend_additive)]
http://love2d.org/demos/particles.love
http://love2d.org/demos/particles.love
-
- Prole
- Posts: 8
- Joined: Sat Jan 31, 2009 7:10 pm
Re: Easy way to make fancy glowing vector lines?
I was going for an effect sort of like this or this.
There seems to be very little difference between the love.blend_additive and love.blend_normal modes on my Intel graphics card. It looks like it just makes lines a little smoother. Maybe I'm not using it properly? The glowing particles demo looked pretty neat.
Using Kaze's pulse with love.color_modulate looks pretty neat, but it's still not exactly what I was going for.
More techniques for glowyness:
In GridWars, they appear to just prerender everything as sprites with the glowy effect, but I'd rather have the flexibility offered by vectors rather than manipulate sprites.
There seems to be very little difference between the love.blend_additive and love.blend_normal modes on my Intel graphics card. It looks like it just makes lines a little smoother. Maybe I'm not using it properly? The glowing particles demo looked pretty neat.
Using Kaze's pulse with love.color_modulate looks pretty neat, but it's still not exactly what I was going for.
More techniques for glowyness:
In GridWars, they appear to just prerender everything as sprites with the glowy effect, but I'd rather have the flexibility offered by vectors rather than manipulate sprites.
Re: Easy way to make fancy glowing vector lines?
Hi JamesGecko,
Unless you have several items on-screen in the same area, the additive effect will not be much different from the normal blend mode.
I think you might be able to achieve your desired effect by rendering your object multiple times. See attached.
Unless you have several items on-screen in the same area, the additive effect will not be much different from the normal blend mode.
I think you might be able to achieve your desired effect by rendering your object multiple times. See attached.
- Attachments
-
- linesTest.love
- (6.92 KiB) Downloaded 482 times
Re: Easy way to make fancy glowing vector lines?
I also made this demo to showcase additive blending. You should be able to make some pretty cool effects with lines + additive blending alone, but it will take some work.
http://love2d.org/demos/glow.love
http://love2d.org/demos/glow.love
-
- Prole
- Posts: 8
- Joined: Sat Jan 31, 2009 7:10 pm
Re: Easy way to make fancy glowing vector lines?
Ah, excellent. Thanks for your help. :-)
- counterfactual_jones
- Prole
- Posts: 24
- Joined: Mon Feb 09, 2009 10:14 am
Re: Easy way to make fancy glowing vector lines?
*Yoink*zapwow wrote: I think you might be able to achieve your desired effect by rendering your object multiple times. See attached.
-
- Prole
- Posts: 5
- Joined: Mon Feb 22, 2010 1:00 am
Re: Easy way to make fancy glowing vector lines?
Anywhere I can get this demo now?rude wrote:I also made this demo to showcase additive blending. You should be able to make some pretty cool effects with lines + additive blending alone, but it will take some work.
http://love2d.org/demos/glow.love
Re: Easy way to make fancy glowing vector lines?
Without pretending to know what I'm talking about:
Couldn't you surround the line with particles with a certain alpha value?
Couldn't you surround the line with particles with a certain alpha value?
Programming is an art form that fights back.
Who is online
Users browsing this forum: Semrush [Bot] and 3 guests