Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This plugin calculates a screen space based 2D ambient
occlusion. I been thinking now and again over a couple of years that it
should be possible to
calculate some kind of faked ambient occlusion from just a depth pass
and a normals pass. Then I got
this paper
from SIGGRAPH 2008 that does nearly
that in graphics hardware. Their method is a bit more complex and
yields a more accurate result because they still have access to the 3D
scene.
My method is a rewritten and altered 2D version of the one in the
paper, but does have the same basic calculation structure. If you are
interested in the maths
involved, look at pages 13 to 20 in the PDF above.
This plugin calculates a kind of ambient occlusion using only
a depth pass. It does this inside a macro including three plugins.
The first one calculates a normals pass from the depth pass, so if you
have a correct normals pass render you get better results by feeding
that into the node as well.
It then does a local neighboring occlusion sampling by comparing the
depth of the surrounding samples. The samples are only used if they are
on a surface that doesn't
differ in normal angle from the pixel currently being calculated. This
is to prevent self occlusion on flat surfaces. The result naturally
becomes quite noisy,
and is therefore post blurred using a special normals aware gaussian
blur that doesn't blur over object edges or sharp features.
To sum up this plugin package is a macro that includes three plugins; depth -> normals depth&normals -> noisy SSAO noisy SSAO -> smooth SSAO
Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.