Apologies for posting two questions in one post, but as they are relevant I kept them in one.
Question 1
In the definition of multi sample estimator that Veach has defined, the integrand is the same for all the n sampling strategies. If this is so, then is it not the case that, in direct lighting, those shadow rays that miss the light geometry are to be considered, as the integrand is not zero (and the PDF is also not zero) but has some value, not from the light of course, but due to the surfaces that have occluded the light?
Would missing those contributions not be the same as partitioning the integral in sampling the lights and BRDF, whereas MIS claims to give a solution without partitioning the integral?
Question 2
My main problem is to sample adequately part of the scene where light comes from the external obstructions (marked as P2 in the image). The only source of light is skylight coming in through the window opening. P1 is PDF for sampling window area (or solid angle) to get direct light; P2 is same PDF but to account for external surfaces contributions; and P3 is BRDF sampling for indirect light from indoor surfaces. I could rely just on BRDF sampling to account for external surfaces but as their contribution is large (illuminance from infinite source) I want to explicitly account for them.
I don't intend to partition the integral into three regions as it ends up to have recursive calls to get the contribution of external hits; it also slows down and makes the code too complex. I therefore guess I need to use MIS to account for indirect contribution of externals surfaces but am not clear how it is to be done.
I tried to take one sample from BRDF P3 with $W3 = p_3/(p_3+p_2)$, and one from P2 PDF with $W2 = p_2/(p_2+p_3)$. I am not clear how to evaluate the integrand for samples taken from P2 distributions. This is the pseudocode:
for each measurement point x {
while(1){
//P1
//DirectLight routine uses P1 if x is indoor hit or
//sampling hemisphere if x is outdoor, to get direct light from sky
totalEstimate += DirectLight(x) * throughput
//P2
y = Trace one sample from P2
if y is external surface {
weight = p2(y) / (p2(y)+p3(y))
totalestimate += DirectRadiance(y) * weight * brdf(x) * dot(x, Nx) / P2
}
//P3
z = Trace one sample form P3
if z is a hit{
weight = p3(z) / (p3(z)+p2(z))
throughput *= weight * brdf(x) * dot(x, Nx) / P3
}
else
break;
//using russian roulette to terminate the path..
}
}
I tried this but had increase in variance. The measurement points are few points in room floor area and a contour line is drawn based on a the values. The above gives higher variance than using only P1 and P3 with no MIS weights.
Update:
This excersise in PBRT seems to be relevant to this question. So I post it here in case it helps.