[RELz] pk's SSAO

Post » Wed Jul 14, 2010 9:34 am

So I've finally gotten my long-promised SSAO shader working and gotten around to posting it. I put this package together a week or two ago, so I think it worked. If not, just lemme know and I'll fix things up ASAP.
Now, before we get started: this is nothing like Knu's SSAO. His is more physically correct and very obvious. Mine is far less correct (the method is a total hack, actually, but I'm working on improving it) and much more subtle. Where his highlights the difference between nearby objects, mine does more emphasis on bigger gaps (although that's something I'm working on fixing). However, the trade-off is, where as his usually looks better, mine is far faster. 15-40 FPS lost vs 1-4 (on my systems). So, if you have power to burn, go with Knu's SSAO. If you can't, try this.

A few screens:
Effect on left, mask on right:
http://i4.photobucket.com/albums/y145/peachykeen000/pkssao/MGEScreenshot136.png
http://i4.photobucket.com/albums/y145/peachykeen000/pkssao/MGEScreenshot135.png
Effect on left, without on right:
http://i4.photobucket.com/albums/y145/peachykeen000/pkssao/MGEScreenshot139.png

As you can see, it's a very slight effect around the edges. It can be increased (darkened), but I have it setup how I like. I think it adds to the impression of depth without being in-your-face.

Download:
http://www.mediafire.com/?ymggezyo1gt

Will be on PES within a few days, hopefully, with a legitimate package. The FX file goes in MW\Data Files\shaders\default.
Requires MGE 117+, I recommend using 161 or later.

Usage is creative commons, non-commercial, attribution, share-alike.
If you'd like to adapt them, re-release your tweaks or use them, feel free to. You can put them in packs and compilations, just lemme know so I can email you of any updates.
I don't mind if you add a modified-by line to the code or change the author to say "original author" and credit yourself for tweaks, just leave the original header intact.

It's come to my attention that a couple shaders from the library were copied and used in the Oblivion graphics extender (they were ones I wrote from CryTek published source). That I don't mind.
However, the ripper removed parts of the descriptive header and replaced the author line with his own screenname. Not cool.
I have no problems sharing, but sharing doesn't mean I do the work and you take the credit. ;)
User avatar
Reanan-Marie Olsen
 
Posts: 3386
Joined: Thu Mar 01, 2007 6:12 am

Post » Wed Jul 14, 2010 10:27 pm

...
It's come to my attention that a couple shaders from the library were copied and used in the Oblivion graphics extender (they were ones I wrote from CryTek published source). That I don't mind.
However, the ripper removed parts of the descriptive header and replaced the author line with his own screenname. Not cool.
I have no problems sharing, but sharing doesn't mean I do the work and you take the credit. ;)

I think you should contact them and ask for removing your codes or addition of headers. Author names and member names must be the same.

As for the shader, it looks like an edge detection shader for now. Although I think it enhances the perceptive depth which is what is important. I hope final version can create a more closer effect to ambient occlusion.
User avatar
Dalley hussain
 
Posts: 3480
Joined: Sun Jun 18, 2006 2:45 am

Post » Wed Jul 14, 2010 10:24 pm

I think you should contact them and ask for removing your codes or addition of headers. Author names and member names must be the same.

As for the shader, it looks like an edge detection shader for now. Although I think it enhances the perceptive depth which is what is important. I hope final version can create a more closer effect to ambient occlusion.

I'm not particularly worried about those shaders, they weren't original code. The obvious display of disregard did kill any thoughts I had of modding for Oblivion, but...

As for the shader... All SSAO is is glorified edge detection.
This version finds the farther side of the edge (by using a technique nVidia's likes to refer to as "unsharp masking the depth buffer") and darkens it. Same effect as before, just much faster. I doubt there will be any major revisions, I like it how it is. I will be trying to make it play nice with close-up objects, though.
User avatar
Judy Lynch
 
Posts: 3504
Joined: Fri Oct 20, 2006 8:31 am

Post » Wed Jul 14, 2010 10:59 am

Will have a look when I get back from work tomorrow =) I welcome faster SSAO any day. What are the settings one can play with? You mentioned darkness?
User avatar
Red Sauce
 
Posts: 3431
Joined: Fri Aug 04, 2006 1:35 pm

Post » Wed Jul 14, 2010 2:47 pm

I tried this new SSAO for 10 min. and here are my comments. First, I like how it gives the outline of trees and buildings, for example, a softer look. In fact, this could be a good side effect to help people who are not using AA have a less jaggy outline of distant objects. When I tried to look up to see the leaves of a tree it reminded me of Crysis which also gives off a soft look to the outline of distant objects. But there seem to be a problem with some certain trees in that the mesh outline is visible, thus, creating a squared outline artifact. Another more glaringly artifact is when you are underwater. The dark outline of rocks, for example, are still visible. This problem reminds me of Oblivion's (OBGE) SSAO which looks correct outside but when you go underwater you can see all the outlines of the objects(though in Oblivion it's worst because everything turns colorless, textureless, monochrome) So far, i haven't seen more problems.

Indeed, my fps increased with this new SSAO. Hopefully, you will add SSAO to nearby objects. This new SSAO has a lot of potential.
User avatar
Jinx Sykes
 
Posts: 3501
Joined: Sat Jan 20, 2007 11:12 pm

Post » Wed Jul 14, 2010 6:41 pm

I too enjoyed it but the lack of close ambient occlusion is kind of a huge disadvantage, hope you get that working correctly =)
User avatar
Melissa De Thomasis
 
Posts: 3412
Joined: Tue Feb 27, 2007 6:52 pm

Post » Wed Jul 14, 2010 3:53 pm

I too enjoyed it but the lack of close ambient occlusion is kind of a huge disadvantage, hope you get that working correctly =)


Did you get any visual problems underwater?
User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am

Post » Thu Jul 15, 2010 12:40 am

It works as intended.

The outline is there, and looks quite good at dawn and dusk hours. But like C said above...
User avatar
Daramis McGee
 
Posts: 3378
Joined: Mon Sep 03, 2007 10:47 am


Return to III - Morrowind