Closed nyorain closed 4 months ago
Classic AO term = %
of rays reaching infinity (sky). It's barely usable in graphics due to excessive overall darkness. You need to decide what is AO for you and how you wanna use it. The most common use case is to use ambient as an approximation of the missing "tail" of lighting, i.e. approximation of missing bounces. In this case, INFs are not needed, and you can switch:
hitDist < INF ? 0 : 1
hitDist < maxDist ? 0 : 1
saturate( hitDist / maxDist )
Smaller maxDist
allows to represent a high-frequency local AO, bigger maxDist
allows to represent a low-frequency more global AO. maxDist
can be increased with viewZ
, making AO scalable.
That makes sense, thanks for the explanation!
When using Reblur with just ambient/specular occlusion, I do not understand how "normalized hit distance" can be used as occlusion term. My understanding of normalized hist distance (as input and output) is that it can be quite high (going towards 1.0) even for surfaces that are fully occluded when all occluding surfaces are at a medium/high distance. I do not understand how this signal is supposed to be used as occlusion term. Am I missing something or is this supposed to be something somewhat different from traditional occlusion terms? Thanks!