Saturday, July 21, 2012

Breaking things

While struggling my way through various microfacet brdf papers, I took a "break" to implement the kd tree from pbrt. After a couple of hours of debugging (debugging anything recursive is a pain, geometric acceleration structures even more so) I got it up and running and could compare it to my uniform grid structure. For 100k polys, the kd tree was about twice as fast. Which isn't much, but nice considering it was a compact, uniform mesh which is what uniform grids does best. Next I tried duplicating the mesh and lining them up side by side, and while the uniform grid started to stagger, the kd tree wasn't much slower at all.

200k polys, 12 light bounces, 1024x1024 pixels, 1024 samples per pixel. Single area light source, with a white ground plane and walls to bounce light around.



I then went on to do what any kid with a new toy does - see how much of a beating it can take. 1.5m polys, 20 light bounces, one area light source + infinite area light outside of the windows. 1024x556 pixels, set off with 1024 samples per pixel, but stopped about half way through.



The render times are pretty high, but only about 2-3 times slower than the 200k poly ones, which is pretty nice for that much added complexity. With the infinite area light and small windows it suffers quite a bit from lack of metropolis or any other way of guiding the samples towards the windows, so it's quite noisy for the amount of samples.

-Espen

No comments:

Post a Comment