new and fast SSAO

Ok thanks for your answer Kupoman. What about having two viewports on display ? One with the glsl 2d filter on and another one for selecting objects in single texture ? Also, if it would be for a gl rendered animation, we wouldn’t actually need to select the objects.

I posted a video showcasing a bedroom I made, and this SSAO. I thought some people would like to see it in video so, here it is:

The effect looks very smooth and nice, I’ll have to see how well it performs on my archaic computer.

However, I’m getting an error in the console: “2D Filter GLSL Shader: link error:”, and I get no results. Am I doing something wrong, or is it my comp?

Hey. I’d like to use this AO filter, as well, but I’m getting banding on the demo scene - any ideas why? Maybe it’s my graphics card…


I can say you are using an old GPU, and thats why, 20 fps says everything.

SolarLune these bandings are caused by Z-buffer precision and they vary on different GPUs. Each stripe is a step of depth gradient. I suggest you to play with cameras Near and Far clipping values. Usually increasing Near clip fixes this issue.

Btw I just wrote even faster SSAO.
It is a 2 pass filter - 1st one makes ambient occlusion and scatters with simple ordered dithering filter and sends it through alpha channel to 2nd pass which blurs it with 2x2 blur kernel and mixes it with scene color.
This way SSAO looks smoother and nice even with 4 or 6 samples (instead of 16).
On my crappy ATI Mobility GPU the framerate has increased at least twice. It would be interesting for me to know how it runs on different hardware.

blend is here (Blender 2.5x&2.6x): http://dl.dropbox.com/u/11542084/SSAO_blur_2.6.blend
1 - enables SSAO (enabled by default)
2 - disables SSAO

laser blaster:
The filter is optimized even for old Mobility ATI cards so I don’t really know what else could be causing that…

It doesn’t seem to work for me. I press 1, and my frame rate drops like it is trying to do something, but, no ssao.
Windows XP, intel quad core cpu [email protected] ghz, 3gb ram, Nvidia GEForce 7100, nvidia nforce 630i

Umm, nothing happens…

Remember, press 1. Also, if nothing happens for you, give your system info. Without that, your comment is useless.

I like the new one. Much quicker. Works like a charm (AMD Radeon HD 5970). Thanks, martinsh!

I press 1 and my pc: VGA- GTS 450 1GB CPU- AMD Phenom XII.
Nothing happens when i press 1 or2 or other keys…

Okay.
3dmedieval and BlendingBGE
It seems like the problem is in the second pass. Do you have anything in the console?
I will try to simplify the second pas as much as I can and see if that works for you guys.
But I think I had similar issue with my PC with NVidia GPU. I could not transfer anything in alpha channel to another pass.

Edit: here is the simple version.
http://dl.dropbox.com/u/11542084/SSAO_blur_2.6_simple.blend

If it does not work you guys then finally something is working only on ATI cards :smiley:

Strange… Works amazingly for me. Maybe an Nvidia problem?

No errors in the console. I guess it doesn’t like Nvidia. I’d post a screen of the console, but now I can’t get it to pop up. Not sure how I did it the first time. It was just there, behind the main window. I think 2.6 series doesn’t always display the console, and as I mostly make simple game props, I never look for it.

Not working, not showing, when i multiple press 1 key the rasterizer is affected, so its clear an nividia problem.
Too bad.

Yeah… well
here is a Nvidia version, but it is pretty useless because it blurs Color channel along SSAO.
http://dl.dropbox.com/u/11542084/SSAO_blur_2.6_nvidia.blend

That works, but it has the jagged edges you mentioned earlier. I’d play with the camera clipping, but I get only a few frames a second, so it’s not feasible for my system. Thanks all the same.

That is awesome! The the ATI version works flawlessly on my computer. Frame rate is amazing, in fact, there really is no difference with it on or off to me. I will definitely be using this sometime.

The nVidia version worked well for me; I didn’t notice any jagged edges either. The previous versions, however, didn’t work. I’m also using an nVidia card. Nothing in the console though.