Ambient occlusion in scenes with light sources #54

Open
matt77hias opened this Issue Mar 11, 2016 · 0 comments

Projects

None yet

1 participant

@matt77hias

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:
am_bunny1-1_grid_test_s4

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