Hi,
I didn’t posted since a while and i thought may be i should write something about my progress…
My current project is a Monte Carlo bidirectional path tracer aiming to be robust and fast as much as it can be.One of its main goals is to familiarize myself with Monte Carlo Methods and how we can apply various variance reduction techniques to better solve the rendering equation.Obviously,the first step that i did is to implement the Light Tracing Algorithm which is very good at handling paths of the type L***DE,the second step is to find a way to combine a Light Path with an Eye Path and this is where all my nightmares began.To do so , I have two options:
-A uniform weighting scheme which treats all the paths as if they are “equal” .A major drawback of this technique is that the estimand can have high variance and as a consequence all of the advantages of the light tracing step will be buried under the ground.
-With variable weights (as described in [1]) ,it weights the paths based on their importance (i.e. important paths have weights closer to 1 and vice versa).
My implementation only supports uniform weighting scheme to combine the two paths ,and as it can be seen below in the images ,a naive BDPT can perform slightly better than a PT for diffuse scenes.
And here is another image which compares Light Tracing (left) to Path Tracing (right):
[1] Optimally Combining Sampling Techniques for Monte Carlo Rendering, Eric Veach Leonidas J. Guibas


Nice stuff!
I think that for such a scene the gain of BDPT over PT is not that significant overall because it is not difficult for eye paths to find the light source.
The trickiest paths to find are the caustics from the glass sphere and that’s where the gain is clearly visible.
Your comment is encouraging but unfortunately ,my implementation of BDPT is buggy and i’m unable to fix it ,until now.As you said , i should test it on scenes where the light source is difficult to find to clearly see the benefits.
(First of all : sorry for bad english)
I was searching information on “raytracing” because I am writing my own raytracer (just for fun) and I found your site…
I just want to say “bravo” because your image are very nice. Do you plan to share your source code ?
Hi Odi,
Please don’t be sorry for your english as i’m not a native english speaker either and i know how frustrating it is to learn a new language.Anyway,
i don’t recommand you to look at other people’s code when you are developing your first ray tracer,you might even get confused and that can discourage you from continuing,just beleive me ,i’ve been at your position a year ago.If you want to progress ,search for tutorials/papers on the net ,there are plenty of them, also read everything you find about ray tracing but don’t go two far though.If you find troubles ,it would be a pleasure for me to help you out ,you can reach me at gtalk ,my email is :
dpower640@gmail.com
What weighting formula do you use in connecting world coordinates to screen coordinates. Just curious. Any text you know that shows its formulation.
You mean how to transform a 3D point expressed in world space to screen space ?
If yes , then this transformation is quite simple . First you transform your point to raster space then to screen space. To be more precise , the transformation is a system of 3 equations with 2 unknowns , I used Cramer’s rule to solve it .
Check the appendix of the paper ” A practical introduction to MLT ” by David Cline et a.l.
Thanks alot!