Glow problems

Hi;
I had implemented my glow system, using render to texture (pbuffer), mipmapping and blurring the texture(rendering it again in another pbuffer with x and y offsets), but when the models are far, the blur is not so nice…did anybody resolved it?

far model

near model

ops…i dont know why but the link is wrong…try
http://www.geocities.com/jcoluna
and the pictures screen1.JPG (far) and screen2.JPG (near)…

Your glowing effect seems really good to me, in what ways do you find it ‘not so nice’ ?

When the model is far from camera, the glow almost goes away…thats because the pixels that will be blurred (the glow source) are too few, and even rendering to a 1024x1024 target ( actually im rendering to a 256x256), the glow almost disappears when the model is far from camera…

I’d think that if it were brighter far away it would look like the glow itself were brighter, which isn’t the effect I think you are going for.

To boost your glow in the distance, you can try using screen aligned quads textured with a glow. It is a sort of a fake, and it implies placing correctly the quads, but that can work pretty well :
http://www.serioussam.com/fe/sam05.jpg

As you can manually tweak the quads transparency and size, you should be able to get whatever glowing effect you want.

@ZBuffer :
As I’ve implemented glow into my game recently, I wouldn’t recommend those screen-aligned quads, cause they won’t give real glow.
One of glow’s properties is the fact that it “overlaps” parts of objects in front of it, which isn’t the case with those quads (though they may be good enough for some cases).

@Coluna :
Could you tell something more about how you do the glow? My glows ( shot , yes it’s kind of overdone, but that was by intention :wink: ) also looks strong in the distance. I’m rendering to a 512^2-PBuffer and I’m also doing a radial blur (16 times).

Well,first i create 2 pbuffers, of 256x256 size, with automatic mipmap generation in both.
In the first one, i render the glow sources (rgb*alpha). So i bind it ( wglBindTexImageARB), use the mipmap LOD control with level = 2, enable the second pbuffer, and do a radial blur ( x,-x,y,-y,2x,-2x,2y,-2y). Im doing this to avoid blending many times over the whole screen, what could slow down a lot.
After that i bind the 2nd pbuffer with LOD level = 1 and blend over the screen.
I tried with a lot of combinations of pbuffer size and LOD level, but these was the best values i found…

So I guess that this is your “problem”. I’m blending the glow 12 times (16 times before, but that’s looking too strong) into my Pbuffer. That gives for a better glow in the distance, but also gives a very huge performancehit.

How are you blending (blurring) your glow?

First I render all glows to my glowbuffer (512^2) and then I blurr it this way into another pbuffer :

 Render_GlowOverlay(0,0);
for i := 1 to NumGlowRots do
 Render_GlowOverlay(Sin(DegToRad(360/NumGlowRots*i))*GlowOffset, Cos(DegToRad(360/NumGlowRots*i))*GlowOffset);
  

And Render_GlowOverlay just draws my glowtexture onto a quad, blended via GL_ONE/GL_ONE.