How to add Bloom Effect with OF

Hi,

First of all I’m really sorry if I’m asking some question that you have answered previously…

I really want to know how to add the bloom (glow) effect to a simple circle object drawn using OF.

I found this link: http://prideout.net/bloom/index.php when I was searching this forum… but have no idea how to apply this opengl code into OF.

Can we apply this bloom effect to a ofCircle(100,400,radius); ?

Thanks a lot!
Regards,
-Lahiru.

Actually there is plenty of stuff online about blooming in openGL.
The best way would be to sue GLSL shaders. You can use openGL code directly in any OF application so I would simply recommend you to read yourself into openGL and GLSL shaders a little more.

There is allready an addon that makes using shaders inside of OF really easy.

[quote author=“moka”]Actually there is plenty of stuff online about blooming in openGL.
The best way would be to sue GLSL shaders. You can use openGL code directly in any OF application so I would simply recommend you to read yourself into openGL and GLSL shaders a little more.

There is allready an addon that makes using shaders inside of OF really easy.[/quote]

Thanks a lot for the reply!

Well can I actually make that ofCircle(100,400,radius); bloom using regular OpenGL shaders? I couldn’t figure out how to apply that shader into the OF circle.

But as you said I will read more into opengl and shaders. Will update this as soon as I got something working! :slight_smile:

Thanks again!
-Lahiru.

Hi,

I still couldn’t figure out how to apply the GLSL shader and get the bloom effect… but I found an alternative way with transparent PNGs. (with ofAlphaBlending).

Is it fine to use transparent PNG images to add visual effects (like bloom, glow) to an openframeworks (opengl) application? :slight_smile:

Thanks a lot!

If it works and doesn’t slow things down, why not??

Computing is one of those fields where there could always be several solutions to a given problem.

Oh yeah, here is a link to the ofxShader addon that moka mentioned. (At least I’m guessing it is the one he was referring to)

[quote author=“plong0”]
If it works and doesn’t slow things down, why not??

Computing is one of those fields where there could always be several solutions to a given problem.

Oh yeah, here is a link to the ofxShader addon that moka mentioned. (At least I’m guessing it is the one he was referring to)[/quote]

Hi,

Thanks a lot for the reply!

Yeah I found that addon but there were some runtime errors when I tried to run an example.

Anyway that solution with PNGs works fine at the moment. So I’m gonna stick to that for now. :slight_smile:

Thanks a lot!
-Lahiru.

What were the errors? I have been searching for a good bloom GLSL shader myself. I have found HLSL ones but that does not help when you primarily work on MacOS.

I got an runtime exception. the program was terminated.

There were two versions of the addon btw.

The mysterious runtime error. Can you bring up a debugger mode and see where it stops?

Try to run the program without the shader code to see if the error is there. It could be that you are not calling the shader correctly. Try a simple shader from here: http://www.lighthouse3d.com/opengl/glsl/

I’d have to look at my notes I rewrote ofShader to remove the ARB extensions.

Great! I’ll check it again with the latest addon code and let you know. :slight_smile:

Thanks!
-Lahiru.

My new version is not up on a website. I would have to send it to you.

Ah! Could you please mail it me? :slight_smile:

Thanks a lot!

Hey, so i’m also searching for a simple solution to give a circle a glow effect.

Is there a Simple small tutorial for this? The shader tutorial didn’t really helps me :confused:

because he didn’t find the shader, maybe i just forget something but also not an advanced programmer ^^

Would be nice if you have some tips for me, thanks :slight_smile: