View Full Version : Glow problems
04-12-2004, 05:57 AM
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 (http://www.geocities.com/jcoluna/screen1.JPG)
near model (http://www.geocities.com/jcoluna/screen2.JPG)
04-12-2004, 09:38 AM
ops....i dont know why but the link is wrong...try
and the pictures screen1.JPG (far) and screen2.JPG (near)...
04-12-2004, 12:51 PM
Your glowing effect seems really good to me, in what ways do you find it 'not so nice' ?
04-13-2004, 05:06 AM
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...
04-13-2004, 07:38 AM
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.
04-13-2004, 10:14 AM
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 :
As you can manually tweak the quads transparency and size, you should be able to get whatever glowing effect you want.
04-13-2004, 11:59 AM
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).
Could you tell something more about how you do the glow? My glows ( shot (http://www.delphigl.de/terrorcide/glow_2.jpg) , yes it's kind of overdone, but that was by intention ;) ) also looks strong in the distance. I'm rendering to a 512^2-PBuffer and I'm also doing a radial blur (16 times).
04-14-2004, 06:14 AM
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...
04-14-2004, 09:57 AM
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.
04-14-2004, 10:35 AM
How are you blending (blurring) your glow?
04-14-2004, 11:21 AM
First I render all glows to my glowbuffer (512^2) and then I blurr it this way into another pbuffer :
for i := 1 to NumGlowRots do
And Render_GlowOverlay just draws my glowtexture onto a quad, blended via GL_ONE/GL_ONE.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.