Skip to main content
19 events
when toggle format what by license comment
Jun 18, 2020 at 8:32 history edited CommunityBot
Commonmark migration
Mar 19, 2020 at 17:02 comment added lightxbulb I would suggest you formulate an answer to your question yourself, since you're more familiar with the PBRT details you were referring to. It may be useful for someone in the future.
Mar 18, 2020 at 16:04 comment added 0xbadf00d @lightxbulb Sorry, I couldn't return to this problem for a while. The source of the error was indeed the normalization of the importance function. So, multiplying the importance function by the area solves the problem.
S Mar 13, 2020 at 9:02 history bounty ended CommunityBot
S Mar 13, 2020 at 9:02 history notice removed CommunityBot
Mar 5, 2020 at 12:51 comment added lightxbulb Any progress on that - did you find whether they do not have this probability in their code? Basically, was my assumption correct, or does this arise from somewhere else?
Mar 5, 2020 at 10:53 comment added lightxbulb Then they simply do not have this $\frac{1}{|J|}$ in the probability, since they have taken it outside. This means that their contribution is divided by $q'$, instead of $q$, which explains the $\frac{1}{spp}$. They basically simply took out the raster probability out of the sum, and canceled it out. Note that this makes sense, especially since this makes it consistent with the other pixel estimators. In general if you had pixels with varying area, you would instead have $\frac{A_j}{\sum_k A_k}$ for example. Simply put - you're missing the $\frac{1}{|J|}$ in your probability in your code.
Mar 5, 2020 at 10:49 comment added 0xbadf00d @lightxbulb Now, if I understood them correctly, they defined $W_e(z_0\to z_1)$ (for a perspective camera) to be equal to this density; see equation 16.3 here: pbr-book.org/3ed-2018/Light_Transport_III_Bidirectional_Methods/…). Maybe the normalization of $W_e(z_0\to z_1)$ is the source of the error. What do you think?
Mar 5, 2020 at 10:48 comment added 0xbadf00d @lightxbulb That's a good point. Well, they don't compute $f$ and $q$ separately, but only the fraction $\frac fq$ (which is what I called contribution and they refer to a $\beta$ in the book). The relevant $β_1⋯β_k$ here would be the one for the second vertex $z_1$ on the camera subpath. This $\beta$ is always equal to $1$. Formally, it should be $$\beta_1:=\frac{W_e(z_1\to z_0)}{p_0(z_0,\omega_{z_0\to z_1})},$$ where $p_0(z_0,\omega_{z_0\to z_1})$ is the density of choosing the first ray $r_1=(z_0,\omega_{z_0\to z_1})$ on the camera subpath with respect to the path throughput measure.
Mar 5, 2020 at 10:47 comment added lightxbulb With regards to your new edit - how does sample_path compute the probability? If it doesn't include the $\frac{1}{|J|}$ probability multiplication (the contribution being divided by it), then what happens is exactly what I outlined above.
Mar 5, 2020 at 10:44 history edited lightxbulb CC BY-SA 4.0
C++ code highlight
Mar 5, 2020 at 10:38 history edited 0xbadf00d CC BY-SA 4.0
added 1937 characters in body
Mar 5, 2020 at 10:26 comment added lightxbulb Are you certain they have what you refer to as $g$ in their code/formulation? It could be that they have $\frac{hf}{q'}$ where $q'$ is the probability without the first vertex (for which it is $\frac{1}{|J|}$). If that is the case then what you wrote and what they have would be equivalent, since what you have is really: $\frac{1}{spp}\sum \frac{h(X_i)f(X_i)}{q'(X_i)}$. $q'$ would be the probability of picking the remaining dimensions of the sample (without the factor coming from picking a uniformly a sample on the film) - that is $q(X_i) = \frac{q'(X_i)}{|J|}$.
Mar 5, 2020 at 9:42 history edited 0xbadf00d CC BY-SA 4.0
added 7 characters in body
Mar 5, 2020 at 8:01 history edited 0xbadf00d CC BY-SA 4.0
added 1 character in body
S Mar 5, 2020 at 7:55 history bounty started 0xbadf00d
S Mar 5, 2020 at 7:55 history notice added 0xbadf00d Canonical answer required
Mar 5, 2020 at 7:55 history edited 0xbadf00d CC BY-SA 4.0
added 3457 characters in body
Feb 19, 2020 at 14:31 history asked 0xbadf00d CC BY-SA 4.0