new and fast SSAO

After tweaking the clipping values and scaling the scene, it is possible to get rid of the lines under some circumstances. There appears to be a “sweet spot”. Thanks for the tip.

I’m really going to have to save up for that new computer I’ve been eyeing up. I feel like if I wait too much longer I’ll miss so much good stuff.

I hope you keep releasing your shaders to the community, martinsh, your work in bge is inspiring. :slight_smile:

i tried this filter and it dropped my game to 5 frames per second any idea why, and also i made a new blend with just 1 point light and 2 planes and the framerate is 10!

It’s a brand new blend with just those three things? Are you doing something like running anti-virus software? Try updating your graphics driver, if nothing else works.

yep and im just running chrome (browser) and downloading a game is all im on a think pad SL510 intel centrino core 2 duo win7 2gigs ram.

Cool
Thanks for your and Arkano22 work :slight_smile:

Hey martinsh I tried to use the ssao filter with the ssgi filter the ssao on the main scene and the ssgi on the scene on BG but It didnt worked the BG scene went blue or something, the same happens when I try to use the ssao with an animated texture there is a way to make it work properly?
Sorry to bother you with this.
Thanks

Edit: i Justa saw your DOF with bokeh effect and its sooo bealtiful that is amazing Im trying to use it right now thanks for all this amazing filters that you share with us. I have another question but about the noise DOF that you made its possible to make it ignore objects? like for example I have a portion of the bg or the foreground blured like on the normal DOF but somewhere on the blur there is an object not blured and I still having the DOF effect for the current focus.

Hey great stuff indeed certainly the best ssao i’ve seen. Wouldn’t normally ask but im getting some corruption all over the screen and also near the bottem right hand corner of the screen. I’ve got a ati 3850x2 and I also tried it with a much newer ati 5850 both have the same problem. Don’t suppose you have any idea why its being strange?

Appreciate all the great work by the way :wink:

Attachments


@ leonn, I have no idea what is happening for your scene. The shader has nothing really to do with the type of textures used in the scene. Fo the depth of field - well no, it is not quite yet possible to mask out separate objects, but you can always focus on it so it is sharp :slight_smile:
@flame -
yeah i am also experiencing these artifacts, try to comment out the “if” line in the readDepth()
like this:


float readDepth(in vec2 coord) 
{
	<b>//if (gl_TexCoord[3].x&lt;0.0||gl_TexCoord[3].y&lt;0.0) return 1.0;</b>
	return (2.0 * near) / (far + near - texture2D(bgl_DepthTexture, coord ).x * (far-near));
}

and here is another ssao with different sampling algorithm:
http://dl.dropbox.com/u/11542084/SSAO_spiral_2.6.blend

Ok Understood I wanted that for a project that I m working on but its nothing very important, thanks!

its a nice filter but a simple problem though, wont look like it should when i turn mist on! anyway to fix it?

Yeah, you need to have a mist in the ssao shader also :slight_smile:
here it is:
http://dl.dropbox.com/u/11542084/SSAO_spiral_mist_2.6.blend
or just the shader:
http://dl.dropbox.com/u/11542084/SSAO_spiral_mist_2.6

Thanks for having a look I changed what you said but it caused more black errors. However the sprial version you posted works perfect bit more haloing round the edges of the screen and less shading on vertical lines but has a nicer softer look it runs faster also :wink:

Attachments



okay I updated the shaders and blends, there were some minor bugs. I have also reduced the haloing around the edges a bit.
newest ssao shader: http://dl.dropbox.com/u/11542084/ssao_nohalo_1.2
flame, yeah ATI/AMD cards are very sensitive and sometimes they have artifacts for no apparent reason at random places…
nice scenes btw

Thanks! I will check it when I get home, also based on some experiments ,large( large scaled ) scenes won’t really be affected by shader. Anyway ,if I resize the scene the effect looks perfect and really fast shader btw.

Cheers Martinsh yeah there looking quite good now thanks to yours and Arkano22’s shader work.
Yes very true ati are quite odd in that regard they did fix the depth buffer ssao error with the long stripes
in one of there recent driver releases though so all good.

The shader really improves the graphics, even if your game has dark areas.

Here is my video with the game I am working on and 3 2d filters (bloom,distance blur,SSAO) thanks for all the filters Martinsh!

BlendingBGE: I yeah already noticed it today, looks really good. :slight_smile:
The distance blur seem very subtle, can’t really notice it in the video, even in 720p.

Thanks! I prefer using the distance blur in a subtle way. Anyway, the SSAO does a great job! Tho,o hope others will be able to play it with SSAO enabled because at the moment uses some GPU.

Hi martinsh, is it possible to implement the SSAO filter for the blender viewport ? It would be great for rendering GL animations! Yet, I have no idea how hard it is.

The problem with implementing something like this in the viewport is that it tends to be incompatible with the method used for selecting objects.

When doing a screen space post process effect like this you typically render the scene into a texture, modify the texture, and then draw a rectangle that fills the screen and applies the modified texture (this is what the 2D filter system does). With a giant rectangle in the way it makes it difficult to select the actual objects represented on the rectangle.

I don’t know if there is a way to modify the selection code to overcome this as it is something I have never looked at.