Page 1 of 1

qestion regarding "A null-scattering path integral formulation of light transport"

Posted: Tue Apr 21, 2020 9:29 am
by gigacore
Hello guys,
I have experimenting with hetero volume pathtracing recently and trying to implement
I started with pure scattering volume , some density in the center of larger volume box( so, many empty areas ). I have matched results with the reference delta-tracker in monochromatic case, however, spectral (RGB actually) version has issues: (volume box) (monochrome pure scattering) ( problematic chromatic pure scattering)

In the last problematic case, i set up my RGB majorant (combined extinction) to somewhat red color dominant value (density in the volume is restricted to [0,1]), and got that weird red filled air.
Once new position x is outside of the volbox, I used the same return value expression as on absorption event : return EnvironmentValue * f / ((p.r + p.g + p.b) / 3)
As i can see from the algorithm

those air zones without density will be always null-scattered until ray gets outside the box, but according to line 9 and 10 the null Un which equals to Umajorant in the absense of Uabs and Uscatt will influence subpath contribution and pdf, these f and p perfectly cancels each other in the monochromatic case, but when dealing with color case, the average of p is no more red-dominant and cant compensate too much for f . I am sure i got something wrong from the above derivations , but cant understand what exactly.

Just for clarity: i assume p and f is rgb values which gets multiplied each subpath with itself, with T (transmittance with subpath length t and Umajorant rgb extinction) and with rgb extinction sampled from volume (abs, scatt or null selected when the event type is choosen).
And this also produces a one more issue, once i went with scattering/null/abs coeff above 1, p and f will quickly raised so high that float32bit value is not enough to cover (something like 100 bounces and i got INF)

Could anyone advise in the right direction ? ( i have contacted directly with authors but they are busy at the moment and suggest to ask here)

Re: qestion regarding "A null-scattering path integral formulation of light transport"

Posted: Fri May 08, 2020 7:07 am
by dawelter

Nice paper you found there. I try to answer because I may attempt to implement this for my renderer, too.

It's just a wild guess, but the authors omitted from algorithm 1 what happens when the particle hits a surface. In Eq (9) there is the last term T(x,z)L^s(z,w) which adds the light from the surface. In regular tracking T cancels out with the probability to not scatter in front of the surface. I think in the MIS algorithm the terms do not cancel so they should be present.

Moreover, my gut feeling says maybe something is wrong where the "hero wavelength" is picked. Because for the "hero wavelength MIS scheme" Wilkie et al. [2014] to work one would have to trace one path distributed according to the pdf for red, one according to green, and so on. It is my understanding that only the combined estimator will result in "clean" air.

Please let us know any tips the Authors share. I'm very interested, too.

Best regards

Re: qestion regarding "A null-scattering path integral formulation of light transport"

Posted: Tue May 26, 2020 2:28 pm
by gigacore
thank for the suggestions, dawelter.
Didnt notice that my question is posted and now i am also unable to reach the site witout vpn somehow..
Anyway, just found this tech report (didnt read in details yet):
[url] [/url]
also, there is a link to author's pbrt code for that paper:
i will check it out myself a bit later , please share any thoughs if it will shed some light :)

Re: qestion regarding "A null-scattering path integral formulation of light transport"

Posted: Fri Aug 07, 2020 12:56 pm
by dawelter
Ha! Thank you very much. The project report was very helpful. To write the estimator as

Code: Select all

 pr     +     pg    +   pb
----           ----        ----
 fr              fr           fr
like in Eq. 4. was the key to make the algorithm practical. I "only" had to carefully handle edge cases with arithmetic operations, 0/0 and 0 x inf.

Like explained in my previous post, I do handle the case where the delta-tracking "hits" a surface. That is, when the tracking step crosses a surface, I multiply the transmittance T(x,y) from the last node x to the surface node y, to f and p.

I think it is working now! Unidirection path tracing + NEE, chromatic heterogeneous media. :)
null_scattering_path_integral_media_rendering.jpg (199.13 KiB) Viewed 592 times