Graphical Borders Glow Effect

I used to have a red image and shadow come black, but never mind.

I dont think i can achieve the result by coding.

Thanks for your help horacebury

Ok, I think I’ve got it. I need pretty much the same thing you do right now, so I’ve really looked into this. I thought that combining (compositing) effects would do it, but what I thought Corona’s compositing filters is not what it actually is. I think.

Anyway, it turns out that if you want to make an object glow, that is basically brightening the bright bits and blurring the edges. Which is exactly what the bloom filter does. Right there at the top of the list. It’s pretty much 3 effects in one.

Here’s the code I used to take an image and make it glow. I didn’t want the inner side effects, so I put another copy of the same image over the top, to make sure the glow effect is coming from beneath it, but you don’t have to do that, of course.

local image = display.newImage("logo.png") local snapshot = display.newSnapshot( 800, 600 ) snapshot.x, snapshot.y = 400, 300 local snapshot2 = display.newSnapshot( 800, 600 ) snapshot.group:insert( snapshot2 ) snapshot2.group:insert( image ) --snapshot.fill = compositePaint --image.fill.effect = "filter.blurGaussian" --image.fill.effect.horizontal.blurSize = 38 --image.fill.effect.horizontal.sigma = 140 --image.fill.effect.vertical.blurSize = 38 --image.fill.effect.vertical.sigma = 140 snapshot2.fill.effect = "filter.bloom" snapshot2.fill.effect.levels.white = 0.8 snapshot2.fill.effect.levels.black = 0.4 snapshot2.fill.effect.levels.gamma = 1 snapshot2.fill.effect.add.alpha = 0.8 snapshot2.fill.effect.blur.horizontal.blurSize = 40 snapshot2.fill.effect.blur.horizontal.sigma = 140 snapshot2.fill.effect.blur.vertical.blurSize = 40 snapshot2.fill.effect.blur.vertical.sigma = 140 --snapshot.fill.effect = "filter.exposure" --snapshot.fill.effect.exposure = 2 local image2 = display.newImage("logo.png") image2.x, image2.y = 400, 300

So, I used this image and saved it as “logo.png”:

http://vignette4.wikia.nocookie.net/gow-fireage/images/3/3b/Wiki_logo.png/revision/latest?cb=20130923012616

That turned out to be a really dumb idea because it already has a bit of a shadow and the edges of the actual image are all dark, causing absolutely no glow effect with the bloom filter. This image works MUCH better:

http://siliconangle.com/files/2013/10/coronaicon.png

@horacebury this is really awesome , thank you for sharing :slight_smile:

i was looking at all corona filters here:

http://docs.coronalabs.com/guide/graphics/effects.html

what i am trying to achieve i think its too complicated because i want the edges shadow to be dark yellow that fades to white,

here shadows play only with white,black, alpha and the glow color that comes from the effect

but this example would be helpful to know :slight_smile: