<p>No, you don't need to know this stuff to implement basic path tracer.</p>

<p>Basic unidirectional path tracer is quite simple to implement. Just trace bunch of paths of length X for each pixel with uniform distribution over the normal oriented hemisphere at the path's intersection points. Then weight the remaining path with the BRDF at each intersection point and multiply with luminance of light once the path hits a light.</p>

<p>You'll get quite a noisy (but unbiased!) image even for large number of paths and then you can start to look into methods to reduce noise, e.g. importance sampling &amp; bidirectional path tracing. Just validate the more optimized path tracers towards earlier validated path tracers to avoid introducing accidental bias.</p>

CC BY-SA 3.0
2016-10-08T08:49:35.463Z
Thanks for your answer. I'll move on to writing the path tracing bit :) You suggested tracing paths of length X will produce an unbiased image but my book says when looking at techniques to prevent paths growing too long: "A first technique is cutting off the recursive evaluations after a fixed number [...] but important light transport might have been ignored. Thus, the image will be biased". Are you suggesting to set X fairly high (e.g. 10) to ensure important long paths are considered?
PeteUK
CC BY-SA 3.0
2016-10-08T11:37:33.657Z
Yes, you should set X to a fairly large number or cut the length adaptively until the path weight factor drops below a certain threshold
JarkkoL
CC BY-SA 3.0
2016-10-07T18:25:47.573Z
2016-10-07T18:37:58.797Z
2016-10-07T18:37:58.797Z
JarkkoL
<p>I need to write a photo-realistic renderer. I have been looking at ScratchAPixel site, asking a couple of questions here on CG, and going through the Advanced Global Illumination 2nd ed book. I've read about radiometry, probability, Monte Carlo, and a bit on Russian roulette. I'm aware of the rendering equation in its hemispherical and area formulations. I've written a SAH based kd-tree, so am ok for efficient ray casting.</p>

<p>I'm poised to start writing some code alongside reading chapter 5 of my book which is about path tracing algorithms. However, the last half of chapter 4 is taken up with talking about the following concepts:</p>

<ul>
<li>The Importance Function</li>
<li>The Measurement Equation</li>
<li>Adjoint equations and linear transport operators</li>
<li>GRDF (Global Reflectance Distribution Function)</li>
</ul>

<p>These concepts I've not seen appearing elsewhere in my research (if you can call reading a few web pages about GI rendering proper research?). My question is, <strong>do I really need to know this stuff to progress to writing my path tracer?</strong> I suspect the answer might depend on which type of path tracer I'm going to developer. To start, based upon what little I know, I think it'll be unidirectional.</p>

CC BY-SA 3.0
2016-10-09T02:01:01.330Z
Here's a nice resource about basic path tracing: http://blog.demofox.org/2016/09/21/path-tracing-getting-started-with-diffuse-and-emissive/
Alan Wolfe
CC BY-SA 3.0
2016-10-09T12:55:07.580Z
@AlanWolfe Thank you. I actually read through that yesterday :) and have found some of your posts on CGSE helpful too. Have downloaded the PTBlogPost1 code and will look through it when I've finished with SmallPt.
PeteUK
CC BY-SA 3.0
2016-10-09T13:50:08.667Z
Awesome! I'm really glad to hear that (:
Alan Wolfe
<pathtracing>
Can I ignore importance, adjoint equations, GRDFs for my path tracer?
PeteUK
# Can I ignore importance, adjoint equations, GRDFs for my path tracer?

(Asked by: username_0 on 2016-10-07)

I need to write a photo-realistic renderer. I have been looking at ScratchAPixel site, asking a couple of questions here on CG, and going through the Advanced Global Illumination 2nd ed book. I've read about radiometry, probability, Monte Carlo, and a bit on Russian roulette. I'm aware of the rendering equation in its hemispherical and area formulations. I've written a SAH based kd-tree, so am ok for efficient ray casting.

I'm poised to start writing some code alongside reading chapter 5 of my book which is about path tracing algorithms. However, the last half of chapter 4 is taken up with talking about the following concepts:

* The Importance Function
* The Measurement Equation
* Adjoint equations and linear transport operators
* GRDF (Global Reflectance Distribution Function)

These concepts I've not seen appearing elsewhere in my research (if you can call reading a few web pages about GI rendering proper research?). My question is, **do I really need to know this stuff to progress to writing my path tracer?** I suspect the answer might depend on which type of path tracer I'm going to developer. To start, based upon what little I know, I think it'll be unidirectional.

**Tags:** pathtracing

> **Comments:**
> **username_1**: Here's a nice resource about basic path tracing: http://blog.demofox.org/2016/09/21/path-tracing-getting-started-with-diffuse-and-emissive/  
> **username_0**: @username_1 Thank you. I actually read through that yesterday :) and have found some of your posts on CGSE helpful too. Have downloaded the PTBlogPost1 code and will look through it when I've finished with SmallPt.  
> **username_1**: Awesome! I'm really glad to hear that (:  

---

## 1 answers

### Answer by username_2 on 2016-10-07. Score: 3 | Accepted answer

No, you don't need to know this stuff to implement basic path tracer.

Basic unidirectional path tracer is quite simple to implement. Just trace bunch of paths of length X for each pixel with uniform distribution over the normal oriented hemisphere at the path's intersection points. Then weight the remaining path with the BRDF at each intersection point and multiply with luminance of light once the path hits a light.

You'll get quite a noisy (but unbiased!) image even for large number of paths and then you can start to look into methods to reduce noise, e.g. importance sampling & bidirectional path tracing. Just validate the more optimized path tracers towards earlier validated path tracers to avoid introducing accidental bias.

> **Comments:**
> **username_0**: Thanks for your answer. I'll move on to writing the path tracing bit :) You suggested tracing paths of length X will produce an unbiased image but my book says when looking at techniques to prevent paths growing too long: "A first technique is cutting off the recursive evaluations after a fixed number [...] but important light transport might have been ignored. Thus, the image will be biased". Are you suggesting to set X fairly high (e.g. 10) to ensure important long paths are considered?  
> **username_2**: Yes, you should set X to a fairly large number or cut the length adaptively until the path weight factor drops below a certain threshold  

---

