Ambient Occlusion

Ambient Occlusion

The measure of how much a surface point is occluded by the environment. Analytically:

ambient_occlusion_4da046a87ccff5150412fbe8431db0dcd9e61be6.svg

Where:

  • ambient_occlusion_6477ee33cb86fb179b66d049d0745dce8af508e0.svg the ambient coefficient; how much ambient light is received
  • ambient_occlusion_19316c6c5172a9d135c7c9c5f64909bf4a40d8c0.svg the normal oriented hemisphere
  • ambient_occlusion_38c206ee77256f3798c741a6c12cb699bb09d2c5.svg Visibility Function for direction ambient_occlusion_3a6b9ea01140e5d0cdffe4bba28da9885b0563ee.svg, outputs 0 or 1
  • ambient_occlusion_4b6517b958be4a2a75509d1143395524d07aa75a.svg angle between normal vector and ambient_occlusion_3a6b9ea01140e5d0cdffe4bba28da9885b0563ee.svg

Original paper #

@inproceedings{miller1994efficient,
  title={Efficient algorithms for local and global accessibility shading},
  author={Miller, Gavin},
  booktitle={Proceedings of the 21st annual conference on Computer graphics and interactive techniques},
  pages={319--326},
  year={1994}
}

https://dl.acm.org/doi/pdf/10.1145/192161.192244

Note about why ambient_occlusion_c22e7c4fca520e25a9fa7012918ca2e096f3a851.svg is used for normalization: #

Accounting for Area Foreshortening , the resulting irradiance at a completely unoccluded surface point equals to ambient_occlusion_47784d10955f675d257c986537c6d720c313c93e.svg:

ambient_occlusion_9629345d77cc94b5a6a7789a0d20940845a08dc3.svg

Possible implementations #

AO Pipeline #

Bluring in X and Y separate will take two render passes but is in ambient_occlusion_43e680f66b0384bcf4a0946b4906b66501230475.svg. It a better complexity than a normal gaussian blur which is ambient_occlusion_5fd34c121e07fc376cc733b4ebada9cf9dffe93f.svg.

Problems #

AO leaving image problem #

Depth image based AO methods like SSAO or HBAO suffer AO that is leaving the view:

Solution: Render a bigger depth image

Discontinuity problem #

The computed AO from SSAO or HBAO both work with a radius. So the AO is not continuous.

Noise #

Banding happens when samples are not chosen randomly but same random directions are used throughout the rendering.

To help with the noise, you can blur it.

Calendar October 22, 2023