My little path tracer back

Board: Home Board index Raytracing Visuals, Tools, Demos & Sources

(L) [2017/12/09] [ost by dawelter] [My little path tracer] Wayback!

This came out of my path tracer.

[IMG #1 cornelbox3.jpg]


Unfortunately convergence stagnated after some 10k samples per pixel. Not unexpected since it is a difficult scene. Lit by two point lights through the holes in the ceiling. I haven't implemented area lights. The medium has chromatic collision coefficients with high scattering for blue wavelengths.

Cheers
[IMG #1]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=276&sid=cf38e4f3b3545b2736807de247c45fe2
(L) [2017/12/09] [ost by dawelter] [My little path tracer] Wayback!

This came out of my path tracer.
cornelbox3.jpg
Unfortunately convergence stagnated after some 10k samples per pixel. Not unexpected since it is a difficult scene. Lit by two point lights through the holes in the ceiling. I haven't implemented area lights. The medium has chromatic collision coefficients with high scattering for blue wavelengths.

Cheers
(L) [2017/12/11] [ost by dawelter] [My little path tracer] Wayback!

Trying to reproduce results from Peter Kutz's Sky Render.
Using 10 discrete wavelengths, no ozone, purely exponential density decrease. Something is wrong. Much too greenish for my taste.

[IMG #1 atmosphere_fisheye1.jpg]


[IMG #2 atmosphere_fisheye2.jpg]

My approximation to the solar emission spectrum might be inadequate in the blue wavelengths  [SMILEY :roll:]

[IMG #3 solarspectrum10bins.png]


EDIT:
Yeah that looks better!
[LINK https://www.dropbox.com/s/0jjsmpi5jvfmisd/atmosphere_fisheye3.jpg?dl=0]
[LINK https://www.dropbox.com/s/nh80qd93qnbjeoj/atmosphere_fisheye4.jpg?dl=0]

I changed two things at once: 36 bins instead of 10. sRGB output instead of CIE RGB 1931 because if I tell CIMG to write jpg it is probably going to be interpreted as sRGB.

Because I need RGB to spectrum conversions, I implemented the way of Smits (1999) but with more bins (kind of). The code is easily adaptable. I put it up on github: [LINK https://github.com/DaWelter/ToyTrace/blob/master/misc/SpectraGenerationSmitsWay.ipynb]
[IMG #1]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=278&sid=cf38e4f3b3545b2736807de247c45fe2
[IMG #2]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=277&sid=cf38e4f3b3545b2736807de247c45fe2
[IMG #3]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=279&sid=cf38e4f3b3545b2736807de247c45fe2
(L) [2017/12/11] [ost by dawelter] [My little path tracer] Wayback!

Trying to reproduce results from Peter Kutz's Sky Render.
Using 10 discrete wavelengths, no ozone, purely exponential density decrease. Something is wrong. Much too greenish for my taste.
atmosphere_fisheye1.jpg
atmosphere_fisheye2.jpg
My approximation to the solar emission spectrum might be inadequate in the blue wavelengths  [SMILEY :roll:]
solarspectrum10bins.png
EDIT:
Yeah that looks better!
[LINK https://www.dropbox.com/s/0jjsmpi5jvfmisd/atmosphere_fisheye3.jpg?dl=0]
[LINK https://www.dropbox.com/s/nh80qd93qnbjeoj/atmosphere_fisheye4.jpg?dl=0]

I changed two things at once: 36 bins instead of 10. sRGB output instead of CIE RGB 1931 because if I tell CIMG to write jpg it is probably going to be interpreted as sRGB.

Because I need RGB to spectrum conversions, I implemented the way of Smits (1999) but with more bins (kind of). The code is easily adaptable. I put it up on github: [LINK https://github.com/DaWelter/ToyTrace/blob/master/misc/SpectraGenerationSmitsWay.ipynb]
(L) [2018/01/20] [ost by dawelter] [My little path tracer] Wayback!

Been working on my path tracer. Implemented table lookup for the height profile of collision coefficients. After some more work I could reproduce the blueness of the evening sky due to absorption by ozone.

[IMG #1 atmosphere_fisheye_ozone_compare.jpg]


Now there is support for area lights - in the form of triangles and spheres. Before, it supported only point lights and distant directional lights. Implemented MIS weighting for light vs. BRDF sampling.

[IMG #2 arealights.jpg]


Quick test rendering with clouds went super slow. The ground is not a plane but a huge sphere. Thus the geometry is extremely inhomogeneously distributed. And my naive Kd-tree cannot cope with it.

[IMG #3 atmosphere_cloudy.jpg]
[IMG #1]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=281&sid=cf38e4f3b3545b2736807de247c45fe2
[IMG #2]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=282&sid=cf38e4f3b3545b2736807de247c45fe2
[IMG #3]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=283&sid=cf38e4f3b3545b2736807de247c45fe2
(L) [2018/01/20] [ost by dawelter] [My little path tracer] Wayback!

Been working on my path tracer. Implemented table lookup for the height profile of collision coefficients. After some more work I could reproduce the blueness of the evening sky due to absorption by ozone.
atmosphere_fisheye_ozone_compare.jpg
Now there is support for area lights - in the form of triangles and spheres. Before, it supported only point lights and distant directional lights. Implemented MIS weighting for light vs. BRDF sampling.
arealights.jpg
Quick test rendering with clouds went super slow. The ground is not a plane but a huge sphere. Thus the geometry is extremely inhomogeneously distributed. And my naive Kd-tree cannot cope with it.
atmosphere_cloudy.jpg
(L) [2018/02/06] [ost by koiava] [My little path tracer] Wayback!

Really good results [SMILEY :)]
(L) [2018/02/07] [ost by dawelter] [My little path tracer] Wayback!

Thank you!

Meanwhile I have a better pic. Something about the clouds strikes me as odd. Still a nice second try if you ask me. [SMILEY :-)]

[IMG #1 atmosphere_cloudy.jpg]


To test my algorithms needed a material that has a "delta peak" plus a continuous density, so I implemented a dielectric material with a perfectly specular reflective layer. I followed a publication by Kelemen and Kalos (2001) to obtain a symmetric brdf which goes to fully specular towards grazing angles. The result:

[IMG #2 material_test_scene.jpg]
[IMG #1]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=284&sid=cf38e4f3b3545b2736807de247c45fe2
[IMG #2]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=285&sid=cf38e4f3b3545b2736807de247c45fe2
(L) [2018/02/07] [ost by dawelter] [My little path tracer] Wayback!

Thank you!

Meanwhile I have a better pic. Something about the clouds strikes me as odd. Still a nice second try if you ask me. [SMILEY :-)]
atmosphere_cloudy.jpg
To test my algorithms needed a material that has a "delta peak" plus a continuous density, so I implemented a dielectric material with a perfectly specular reflective layer. I followed a publication by Kelemen and Kalos (2001) to obtain a symmetric brdf which goes to fully specular towards grazing angles. The result:
material_test_scene.jpg
(L) [2018/02/22] [ost by dawelter] [My little path tracer] Wayback!

Bidirectional path tracing! The first correct image! Well, as far as I can tell  [SMILEY ;)]

[IMG #1 cornelbox5.jpg]

High variance at 128 bidirectional random walks per pixel. Paths are weighted by one over the number of techniques that can generate the path. Implementation of MIS pending ...
[IMG #1]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=286&sid=cf38e4f3b3545b2736807de247c45fe2
(L) [2018/02/22] [ost by dawelter] [My little path tracer] Wayback!

Bidirectional path tracing! The first correct image! Well, as far as I can tell  [SMILEY ;)]
cornelbox5.jpg
High variance at 128 bidirectional random walks per pixel. Paths are weighted by one over the number of techniques that can generate the path. Implementation of MIS pending ...
(L) [2018/02/22] [ost by graphicsMan] [My little path tracer] Wayback!

Nice [SMILEY :)]
(L) [2018/02/28] [ost by dawelter] [My little path tracer] Wayback!

Thank you graphicsMan! [SMILEY :-)]

Meanwhile, I implemented what I want to be mis weighting straight from the defnition p_k^a / sum_i p_i^a ... I also fixed the reflector. It has 10k triangles now and increased tesselation near the focal point. The light source was a point light, now I take very small sphere light, to "smooth" the irregularities of the model. Moved it a slight bit, too. And tada! The reflector focusses the light much much more cleanly.

Unfortunately, it does not converge [SMILEY :-(]  The noise around the sphere is gone. Which is great. But near the corners - No way this is correct. Also the brightness seems to increase from sweep to sweep as you can see at the line where  I interrupted the rendering.

Will investigate. Hints appreciated [SMILEY ;-)]

[IMG #1 bdpt_second_pic_w_mis.jpg]

That's 512 samples per pixel btw. Took the night to render.
[IMG #1]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=287&sid=cf38e4f3b3545b2736807de247c45fe2
(L) [2018/02/28] [ost by dawelter] [My little path tracer] Wayback!

Thank you graphicsMan! [SMILEY :-)]

Meanwhile, I implemented what I want to be mis weighting straight from the defnition p_k^a / sum_i p_i^a ... I also fixed the reflector. It has 10k triangles now and increased tesselation near the focal point. The light source was a point light, now I take very small sphere light, to "smooth" the irregularities of the model. Moved it a slight bit, too. And tada! The reflector focusses the light much much more cleanly.

Unfortunately, it does not converge [SMILEY :-(]  The noise around the sphere is gone. Which is great. But near the corners - No way this is correct. Also the brightness seems to increase from sweep to sweep as you can see at the line where  I interrupted the rendering.

Will investigate. Hints appreciated [SMILEY ;-)]
bdpt_second_pic_w_mis.jpg
That's 512 samples per pixel btw. Took the night to render.
(L) [2018/03/01] [ost by ingenious] [My little path tracer] Wayback!

>> dawelter wrote:Will investigate. Hints appreciated
Yeah, doesn't look correct. The most likely reason is that the MIS weights corresponding to the different techniques for constructing a path don't sum up to one. This in turn is probably due to incorrect/inconsistent path pdf computation. What has helped me greatly in the past to debug such issues has been to debug one path length at a time.

Here are some more specific tips:
1. Start with an entirely diffuse scene. The pdfs are simpler.
2. Have a unidirectional path tracer that you're sure converges to the right solution.
3. Have a unidirectional light tracer that you're sure converges to the right solution. Compare against the images produced by the path tracer.
4. In the bidirectional path tracer, start by rendering direct illumination only, i.e. paths of length two (segments). There are already three ways to construct each such path. Make sure you compute the correct path pdfs, with solid-angle-to-area conversion factors (Jacobians) etc.
5. Only after you're sure the direct illumination converges to the same result as the path tracer and light tracer, move on to debugging one path longer. And one longer, etc.
6. Once you can correctly render a diffuse scene with your bidirectional tracer, add more complex materials.

Hope this helps!
(L) [2018/03/03] [ost by dawelter] [My little path tracer] Wayback!

Thanks Ingenious. Indeed it was wrong MIS weighting. My logic for splatting on the light image is slightly odd and so it came that the weights for techniques with one eye vertex were much too low. Had to factor in the number of pixels. Got a clue by imaging MIS weights for various eye/light path lengths in Veach's "pyramid" style.

Now this looks so much better!   [SMILEY 8-)]

[IMG #1 bdpt_mis_proper.jpg]
[IMG #1]:Not scraped: /web/20190529191952im_/http://ompf2.com/download/file.php?id=288&sid=cf38e4f3b3545b2736807de247c45fe2
(L) [2018/03/03] [ost by dawelter] [My little path tracer] Wayback!

Thanks Ingenious. Indeed it was wrong MIS weighting. My logic for splatting on the light image is slightly odd and so it came that the weights for techniques with one eye vertex were much too low. Had to factor in the number of pixels. Got a clue by imaging MIS weights for various eye/light path lengths in Veach's "pyramid" style.

Now this looks so much better!   [SMILEY 8-)]
bdpt_mis_proper.jpg

back