MIS with IBL

Practical and theoretical implementation discussion.
papaboo
Posts: 41
Joined: Fri Jun 21, 2013 10:02 am
Contact:

Re: MIS with IBL

Postby papaboo » Sun Jul 16, 2017 3:30 pm

Out of curiosity, because it sounds like I'm doing something very similar and back when I was investigating it I saw no bias issues, what is the RIS trap? Is RIS conceptually flawed or is it a reoccurring 'gotcha' that you keep forgetting?

jbikker
Posts: 175
Joined: Mon Nov 28, 2011 8:18 am
Contact:

Re: MIS with IBL

Postby jbikker » Tue Jul 18, 2017 1:59 pm

papaboo wrote:Out of curiosity, because it sounds like I'm doing something very similar and back when I was investigating it I saw no bias issues, what is the RIS trap? Is RIS conceptually flawed or is it a reoccurring 'gotcha' that you keep forgetting?


I used RIS for my light sources in the past: out of e.g. 1k lights, select 4 based on view independent information (i.e. brightness and area), then evaluate those four in more detail (including distance and orientation). This works like a charm until you need MIS. It is simply not possible to reproduce the probability of sampling a light explicitly when an implicit path reaches the light.

rtpt
Posts: 6
Joined: Wed May 20, 2015 1:17 pm

Re: MIS with IBL

Postby rtpt » Wed Jul 19, 2017 10:08 am

papaboo wrote:Out of curiosity, because it sounds like I'm doing something very similar and back when I was investigating it I saw no bias issues, what is the RIS trap? Is RIS conceptually flawed or is it a reoccurring 'gotcha' that you keep forgetting?


if you want to combine ris/mis have a look at the work of j. talbot and refs.

jbikker
Posts: 175
Joined: Mon Nov 28, 2011 8:18 am
Contact:

Re: MIS with IBL

Postby jbikker » Wed Jul 19, 2017 10:46 am

rtpt wrote:if you want to combine ris/mis have a look at the work of j. talbot and refs.


I am aware of his work, but I don't think he solved this issue, and in fact, I don't think it's possible.

papaboo
Posts: 41
Joined: Fri Jun 21, 2013 10:02 am
Contact:

Re: MIS with IBL

Postby papaboo » Wed Jul 19, 2017 1:50 pm

Interesting.

I guess I must do it slightly different then, because I just tested mine with MIS and MIS + 3 light RIS (or whatever warped self-rolled version of RIS I'm using) and there is no difference. I don't scale the PDF though when evaluating multiple light sources. I simply leave the light PDF as is and scale the contribution of the final selected light. That way my MIS weights should be fairly safe and independent of RIS.

The code looks like this

Code: Select all

    LightSample light_sample = sample_single_light(material, world_shading_tbn);
    for (int s = 1; s < light_samples; ++s) {
        LightSample new_light_sample = sample_single_light(material, world_shading_tbn);
        float light_weight = sum(light_sample.radiance);
        float new_light_weight = sum(new_light_sample.radiance);
        float new_light_probability = new_light_weight / (light_weight + new_light_weight);
        if (rng.sample1f() < new_light_probability) {
            light_sample = new_light_sample;
            light_sample.radiance /= new_light_probability;
        } else
            light_sample.radiance /= 1.0f - new_light_probability;
    }
    light_sample.radiance /= light_samples;


Return to “General Development”

Who is online

Users browsing this forum: No registered users and 7 guests