Ambient occlusion in scenes with light sources #54

matt77hias opened this Issue Mar 11, 2016 · 0 comments


None yet

1 participant


Using an AmbientOcclusionIntegrator (or another SurfaceIntegrator which Li method does not return physical radiance values) in open scenes with light sources results in some dual behavior:

Spectrum SamplerRenderer::Li(...) const {
    if (scene->Intersect(ray, isect))
        Li = surfaceIntegrator->Li(...);       // Could be any spectrum
    else {
        // Handle ray that doesn't intersect any geometry
        for (uint32_t i = 0; i < scene->lights.size(); ++i)
            Li += scene->lights[i]->Le(ray); // Always physical radiance spectrum

This dual behavior is illustrated in the image below:

The easiest way to fix this is to let the user take care of it by not adding light sources in the .pbrt file. Or refactor the else part to a new abstract method in the SurfaceIntegrator hierarchy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment