Multi-wavelength free path sampling using ratio tracking back

Board: Home Board index Raytracing General Development

(L) [2017/02/22] [ost by shocker_0x15] [Multi-wavelength free path sampling using ratio tracking] Wayback!

Hi,

I'm curious about whether using ratio tracking for estimating Monte Carlo constribution (f(x) / p(x), not transmittance) with delta tracking for heterogeneous media is unbiased.

We can get a MC contribution of free path sampling by delta tracking for a wavelength used for the procedure.
There is a demand to know MC contributions for other wavelengths simultaneously,
but we don't have the transmittance and PDF as separated values.
Therefore it's not possible to apply delta tracking to estimate MC contributions for multiple wavelengths.

On the other hand, estimating transmittance for a given segment in participating media for multiple wavelengths in unbiased fashion is possible by performing ratio tracking for every wavelengths.

I consider things like following:
perform delta tracking to sample free path for the wavelength wl_i and get the distance d.
PDF of the procedure is
  p(d, wl_i) = sigma_e(d, wl_i) * exp(-int_0^d sigma_e(s, wl_i) ds)
Transmittance for another wavelength wl_j is
  T(d, wl_j) = exp(-int_0^d sigma_e(s, wl_j) ds)
Therefore, MC contribution for the wavelength wl_j is
  T(d, wl_j) / p(d, wl_i) = 1 / sigma_e(d, wl_i) * exp(-int_0^d (sigma_e(s, wl_j) - sigma_e(s, wl_i)) ds)

sigma_e(s, wl_j) - sigma_e(s, wl_i) can be a negative value, but ratio tracking is able to handle correctly.

Does this become unbiased estimate when I integrate this procedure into a light transport algorithm?

Thanks,
(L) [2017/05/04] [ost by yiningkarlli] [Multi-wavelength free path sampling using ratio tracking] Wayback!

Funny you should mention this, we have a SIGGRAPH 2017 paper on this topic. =)

We just released it online here: [LINK http://drz.disneyresearch.com/~jnovak/publications/SDTracking/index.html]
(L) [2017/05/05] [ost by shocker_0x15] [Multi-wavelength free path sampling using ratio tracking] Wayback!

great!!! [SMILEY :o]

I will read it immediately.

Thanks!
(L) [2017/05/12] [ost by citadel] [Multi-wavelength free path sampling using ratio tracking] Wayback!

Residual ratio tracking is very promising, but I wonder how it's used for evaluating multiple scattering? Specifically, how to apply it to sample a free length? I only figured out how to apply it to estimate transmittance for direct illumination. As far as I remember, high variance for high albedo dense media mainly came from multiple scattering, which basically requires massive sampling on the "line of sight" of integration. Conversely, direct lighting can be importance sampled in case the environment map has peaks, and the accuracy of transmittance by delta tracking is sufficient.
(L) [2017/05/21] [ost by citadel] [Multi-wavelength free path sampling using ratio tracking] Wayback!

OK, now I get it what you meant with the code [SMILEY :roll:] . I write it down in case someone else wonders.

[IMG #1 compensation.png]

And I took some time to pick up my old volumetric path tracer, improved it with the fancy stuff (hosted here, [LINK https://github.com/RNG65536/volpath]), and did some comparisons.
It may seem unbiased w.r.t. color, albeit within minor error due to limited samples, etc. The left most one is sampled with delta tracking for separate channels, avoiding the sampling PDF problem. The next ones have different channels sampled all together, and compensated afterwards using ratio tracking. From left to right, red, green, blue and a random channel is used.

[IMG #2 comparison.png]

Maybe equi-angular sampling is better on this matter, as I learned from a variant of smallpaint. The MIS method of Mitsuba may also work, but I only examined it for homogeneous media.
[IMG #1]:Not scraped: /web/20190530192500im_/http://ompf2.com/download/file.php?id=254&sid=2d4c6d14a0c5c467eb0e745f545d35e9
[IMG #2]:Not scraped: /web/20190530192500im_/http://ompf2.com/download/file.php?id=257&sid=2d4c6d14a0c5c467eb0e745f545d35e9
(L) [2017/05/21] [ost by citadel] [Multi-wavelength free path sampling using ratio tracking] Wayback!

OK, now I get it what you meant with the code [SMILEY :roll:] . I write it down in case someone else wonders.
compensation.png
And I took some time to pick up my old volumetric path tracer, improved it with the fancy stuff (hosted here, [LINK https://github.com/RNG65536/volpath]), and did some comparisons.
It may seem unbiased w.r.t. color, albeit within minor error due to limited samples, etc. The left most one is sampled with delta tracking for separate channels, avoiding the sampling PDF problem. The next ones have different channels sampled all together, and compensated afterwards using ratio tracking. From left to right, red, green, blue and a random channel is used.
comparison.png
Maybe equi-angular sampling is better on this matter, as I learned from a variant of smallpaint. The MIS method of Mitsuba may also work, but I only examined it for homogeneous media.
(L) [2017/05/22] [ost by citadel] [Multi-wavelength free path sampling using ratio tracking] Wayback!

After more tests I still find some bias in the image. Maybe it's also necessary to also consider the compensation for passtrough rays that leave the volume. Or just use an infinite medium to compare.

ps. I just worked out a compensation for passthrough rays. Seems to match multichannel and blue channel sampling results well. [SMILEY ;)]

[IMG #1 compensation2.png]
[IMG #1]:Not scraped: /web/20190530192500im_/http://ompf2.com/download/file.php?id=258&sid=2d4c6d14a0c5c467eb0e745f545d35e9
(L) [2017/05/22] [ost by citadel] [Multi-wavelength free path sampling using ratio tracking] Wayback!

After more tests I still find some bias in the image. Maybe it's also necessary to also consider the compensation for passtrough rays that leave the volume. Or just use an infinite medium to compare.

ps. I just worked out a compensation for passthrough rays. Seems to match multichannel and blue channel sampling results well. [SMILEY ;)]
compensation2.png
(L) [2017/05/22] [ost by shocker_0x15] [Multi-wavelength free path sampling using ratio tracking] Wayback!

Nice work! [SMILEY :D]
 >> Maybe it's also necessary to also consider the compensation for passtrough rays that leave the volume.
Right, of course it needs consideration for such rays as you say.

It corresponds to my code at l.80 in the current implementation:
[LINK https://github.com/shocker-0x15/SLR/blob/master/libSLR/MediumDistribution/DensityGridMediumDistribution.cpp]
(L) [2017/05/23] [ost by citadel] [Multi-wavelength free path sampling using ratio tracking] Wayback!

Actually, I'm most concerned with figure 11 in Karl's paper, which is a cumulus cloud with albedo = 1, and forward scattering g = 0.877. For some data, such as my binary checkerboard volume, delta tracking seems to outperform ratio tracking, as it skips most of the sigma_t queries when transmittance is really small. On the other hand, I have no idea what the scale of the scene should be, and it is the only difference between the two distinctly different looking clouds in that figure. Of course the distribution of the data is important, but using a blocky one could still provide some insights.

ps. I just noticed from their video that they might have used Russian Roulette to terminate deep rays. The thinners cloud requires even higher sampling than the thicker one?? [SMILEY :shock:]

back