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.

  • $\begingroup$ Here's a nice resource about basic path tracing: blog.demofox.org/2016/09/21/… $\endgroup$ – Alan Wolfe Oct 9 '16 at 2:01
  • $\begingroup$ @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. $\endgroup$ – PeteUK Oct 9 '16 at 12:55
  • $\begingroup$ Awesome! I'm really glad to hear that (: $\endgroup$ – Alan Wolfe Oct 9 '16 at 13:50

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.

| improve this answer | |
  • $\begingroup$ 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? $\endgroup$ – PeteUK Oct 8 '16 at 8:49
  • 1
    $\begingroup$ 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 $\endgroup$ – JarkkoL Oct 8 '16 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.