openGL blur
what's the easiest way to do a blur effect in OpenGL?
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
That depends on what kind of a blur effect you're trying to achieve.
To do motion blurs like in Oni you draw the blurred object multiple times in slightly different positions, with a traparent blend mode.
To get light trails like in some flight sims you draw extra polygons on the screen to form the trails. You can also use the trails method on moving sticks (character limbs) to quite good effect.
To get real full screen motion blur you can use accumulation buffers, or render-to-texture.
To get fake full screen motion blur (ala GTA3 and GTA:VC) you use render to texture, and then draw that on top of the previous frame with a slight bit of transparency.
To do motion blurs like in Oni you draw the blurred object multiple times in slightly different positions, with a traparent blend mode.
To get light trails like in some flight sims you draw extra polygons on the screen to form the trails. You can also use the trails method on moving sticks (character limbs) to quite good effect.
To get real full screen motion blur you can use accumulation buffers, or render-to-texture.
To get fake full screen motion blur (ala GTA3 and GTA:VC) you use render to texture, and then draw that on top of the previous frame with a slight bit of transparency.
"He who breaks a thing to find out what it is, has left the path of wisdom."
- Gandalf the Gray-Hat
Bring Alistair Cooke's America to DVD!
I was looking for more of just a basic blur, like gaussian or radial, not a motion blur. is there any way to use a matrix transorm to do this?
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Oh, sorry. Most people are interested in motion blur
.
For a general blur your best bet is render-to-texture. Render the object once then draw it several times with a mostly transparent blend.
.For a general blur your best bet is render-to-texture. Render the object once then draw it several times with a mostly transparent blend.
"He who breaks a thing to find out what it is, has left the path of wisdom."
- Gandalf the Gray-Hat
Bring Alistair Cooke's America to DVD!
or use glConvolutionFilter2D which enables you to apply arbitrary filter kernals to images.
Have a look at NeHe's tutorial on Radial Blur & Rendering To A Texture
NeHe tutorial 36
Here's a link to download the Cocoa source code of this tutorial.
here
NeHe tutorial 36
Here's a link to download the Cocoa source code of this tutorial.
here
the glConvolutionFilter2D sounds like what I need. I looked at the NeHe#36 and they just use texture scaling to fake the blur; not bad, but it gets chunky when you do a big blur.
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Gaussian blur | g00se | 0 | 1,896 |
Oct 3, 2011 12:58 PM Last Post: g00se |
|
| Gaussian blur, software fallback on GMA950 | Fenris | 11 | 6,339 |
Jul 28, 2007 05:00 PM Last Post: OneSadCookie |
|

