Hey Lux devs,
I have a couple of questions regarding the participating media system in Lux.
1) When tracing a path throughout the scene and sampling vertices, only scattering is importance sampled in media, e.g. in the HomogeneousVolume::Scatter() function, whereas traditionally the full transmittance (absorption + scattering) is importance sampled. My question is, why such a decision has been made? I agree it actually makes sense this way, but want to ask the devs. I assume this has the benefit of leaving the path termination decisions to the surface integrator. If you pick a scattering event that's too deep in the medium, so that the low transmittance results in very small contribution of that point, you can still account for this by terminating the path in the integrator using Russian roulette. But on the other hand, next event estimation (i.e. direct lighting) could be hurt, because you normally compute it before making the path termination decision. So in such a case you'll compute direct lighting on a point with little contribution (due to the low transmittance), before eventually terminating the path.
2) What BSDFs are assigned at the interface surface between to media? For example [air : milk], [air : glass], [water : translucent plastic] ? I'm asking because the VolumeIntegrator::Connect() function only evaluates specular transmission with parallel opposite directions, which AFAIK should only work for NullTransmission BxDF. Now consider I have a polygon with a very transparent double-sided material with diffuse transmission. The Connect() function would not let any light through and return zero transmission. Is that a correct behavior? And what material do I assign to an object with a skin material?
Thanks a lot in advance!
P.S. One more thing: why does HomogeneousVolume::Scatter() multiply L (the transmittance) by SigmaT upon successful scattering even sampling? And then, weirdly, this returned L value is overwritten by a Transmittance call in the volume integrator...
