<p>Sorry about leaving it for so long but I was so busy implementing the goddamn algorithm, I forgot about this :)</p>

<p>So after reading up on Veach's thesis pretty closely, I understood what was going on. First of all Veach's thesis describes about BDPT using MIS. However I implemented without MIS using the techniques described in the original Lafortune's paper.</p>

<p>One thing to note is, that we have to calculate the radiance by the light path inversely as opposed to the normal flow in the eye path. As lightxbulb said for point 1, there is no pdf since the step is deterministic. However the deterministic step needs to be multiplied by the Geometric factor, the BRDF evaluation of light vertex to eye vertex and the BRDF evaluation of eye vertex to light vertex.</p>

<p>For the second point, you don't have to worry about NEE since at each eye path vertex there is a path that connects to the light vertex directly, according to PBRT and the paper we can discard the already generated light source and use explicit light sampling there. Calculating the light path radiance separately (as done in light tracing) handles all the respective PDFs for generating the vertices there.</p>

<p>Will post another question regarding the result comparison soon.</p>

CC BY-SA 4.0
2020-03-08T18:17:02.993Z
2020-03-08T18:17:02.993Z
gallickgunner
<p>I'm trying to implement a simple BDPT without MIS as described in Lafortune's paper. I've used the weighting scheme defined in the paper in which they suggest that the weight be based on the surface specularity i.e. specular surfaces should add more weight to continue following the eye path rather than connect with the light path (which makes sense since the eye path is based on the current surface BRDF sampling).</p>

<p>I shoot rays from the light source and the camera a fixed number of times. Each bounce stores the Hit Information and the PDF of the next ray generated. The light path can easily be inverted to get the directions similar to the eye path and by connecting both the paths and using the weighting scheme we can use the simple path tracer algorithm to calculate the total radiance.</p>

<p>There are only 2 things that are different from what happens in a normal path tracer.</p>

<p>1) First is the determinstic ray step i.e. the connection of each eye path vertex with the light vertex. This ray is not sampled from a PDF but instead shot deterministically. What should I use the value for the PDF for this step? Do I need to inverse sample the determinstic ray direction from the eye vertex BRDF PDF to get the probability? Or perhaps from the light vertex?</p>

<p>2) The first ray shot from the light has its own PDF unlike in the normal path tracer where light is found explicitly using Direct Light Sampling. How can I incorporate this factor when I have path tracer that uses Next Event Estimation and Direct Light Sampling? I suppose I can fallback to the naive algorithm (no NEE or explicit Direct Light Sampling) since I already have pin pointed the light source from the light path. Just wanted clarification regarding this.</p>

<p>Thanks.</p>

CC BY-SA 4.0
2020-02-26T09:45:44.480Z
Deterministic choices are taken with a probability 1, hence pdf = 1, unless I am missing something.
lightxbulb
<rendering><pathtracing><monte-carlo>
BDPT - How to handle deterministic ray PDF?
gallickgunner
# BDPT - How to handle deterministic ray PDF?

(Asked by: username_0 on 2020-02-24)

I'm trying to implement a simple BDPT without MIS as described in Lafortune's paper. I've used the weighting scheme defined in the paper in which they suggest that the weight be based on the surface specularity i.e. specular surfaces should add more weight to continue following the eye path rather than connect with the light path (which makes sense since the eye path is based on the current surface BRDF sampling).

I shoot rays from the light source and the camera a fixed number of times. Each bounce stores the Hit Information and the PDF of the next ray generated. The light path can easily be inverted to get the directions similar to the eye path and by connecting both the paths and using the weighting scheme we can use the simple path tracer algorithm to calculate the total radiance.

There are only 2 things that are different from what happens in a normal path tracer.

1) First is the determinstic ray step i.e. the connection of each eye path vertex with the light vertex. This ray is not sampled from a PDF but instead shot deterministically. What should I use the value for the PDF for this step? Do I need to inverse sample the determinstic ray direction from the eye vertex BRDF PDF to get the probability? Or perhaps from the light vertex?

2) The first ray shot from the light has its own PDF unlike in the normal path tracer where light is found explicitly using Direct Light Sampling. How can I incorporate this factor when I have path tracer that uses Next Event Estimation and Direct Light Sampling? I suppose I can fallback to the naive algorithm (no NEE or explicit Direct Light Sampling) since I already have pin pointed the light source from the light path. Just wanted clarification regarding this.

Thanks.

**Tags:** rendering, pathtracing, monte-carlo

> **Comments:**
> **username_1**: Deterministic choices are taken with a probability 1, hence pdf = 1, unless I am missing something.  

---

## 1 answers

### Answer by username_0 on 2020-03-08. Score: 2

Sorry about leaving it for so long but I was so busy implementing the goddamn algorithm, I forgot about this :)

So after reading up on Veach's thesis pretty closely, I understood what was going on. First of all Veach's thesis describes about BDPT using MIS. However I implemented without MIS using the techniques described in the original Lafortune's paper.

One thing to note is, that we have to calculate the radiance by the light path inversely as opposed to the normal flow in the eye path. As username_1 said for point 1, there is no pdf since the step is deterministic. However the deterministic step needs to be multiplied by the Geometric factor, the BRDF evaluation of light vertex to eye vertex and the BRDF evaluation of eye vertex to light vertex.

For the second point, you don't have to worry about NEE since at each eye path vertex there is a path that connects to the light vertex directly, according to PBRT and the paper we can discard the already generated light source and use explicit light sampling there. Calculating the light path radiance separately (as done in light tracing) handles all the respective PDFs for generating the vertices there.

Will post another question regarding the result comparison soon.


---

