• entries
32
50
• views
46145

# Failures in GI-land

1645 views

Hello all! It's been quite a while.

So I've been working on life/jobs/family/etc the past couple months. A couple weeks ago, however, I decided to implement a type of arbitrary BRDF sampling based on factoring large matrices, found here: http://gfx.cs.princeton.edu/proj/brdf/brdf.pdf

The idea is to convert the BRDF into a series of matrix representations in such a way that

, where F[sub]l[/sub], u[sub]l[/sub], and v[sub]l[/sub] are matrices that depend on outgoing direction, half angle azimuth, and half angle zenith about surface normal, respectively. Now that the functions for half angle azimuth and zenith are separated out, it's trivial to construct a probability density function based on each. From then on, it's the whole uniform random number -> CDF -> random ray thing like we're used to. The PDF is defined by

, where that last funky term is the Jacobian between half angle representation and normal paths.

# Pretty Pictures and Opinions

.

[Left: factored BRDF representation, Right: Path traced reference, 200 samples each]
.
Okay. enough math. On to my personal thoughts. (Just as a warning, I've checked and re-checked my math a hundred times, so I don't think anything is wrong. If it is, though, be sure to sufficiently embarrass me in the comments )
.
So. The big issue is that, while the representation is extremely good at importance sampling shiny materials, it does so at the expense of accurately representing more lambertian properties. The effect can be seen when only one bounce is traversed:
.

[Left: 256 u terms, 128 v terms, Middle: path traced reference, Right: 512 u terms, 256 v terms, all images rendered with 200 samples]
(btw, the blue ball is the only thing in the picture that new material is applied to here. In case you couldn't tell.)
.
This issue arises because of its discrete nature. In order to get a good enough representation of the BRDF to sample it in this manner, you have to throw more and more samples at the BRDF. In this type of representation, a pure mirror would work very well, and diffuse materials would work less well, because this representation prefers more jagged BRDFs that so that it can sample the correct lobe. Otherwise, it has to make approximations at to what the CDF is, in the same way that a Euler integrator has issues because of regular sampling that doesn't capture the essence of the function. If that makes sense A graph of what this looks like might be something like
.

.
I could show some close-ups like in normal graphics papers, but this journal software is really kicking my ass. I'd like to point out my solution of inserting periods between every paragraph in order to keep them from slamming into each other every time i press the edit button
.
Welp. Hoped you liked it. The factored representation is still fantastic if you want to store measured BRDF data, but it doesn't suit my needs for an actual path tracer. Oh well. I'm bound to find some other snazzy graphics paper to try to implement soon
.
See yah!

When the hardware get's infinitely fast you're going to rule this world as we know it! :P

They'll never see it coming :ph34r:

## Create an account

Register a new account