Failures in GI-land

posted in Vaguely In Focus
Published July 21, 2015
Advertisement
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

CodeCogsEqn (1).gif

, 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

CodeCogsEqn (2).gif

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

Pretty Pictures and Opinions


.
ex2.jpg
[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 biggrin.png )
.
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:
.
ex1.jpg
[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 tongue.png A graph of what this looks like might be something like
.
lolz.jpg
.
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 unsure.png
.
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 biggrin.png
.
See yah!
6 likes 2 comments

Comments

Migi0027

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

July 25, 2015 03:08 AM
CulDeVu

They'll never see it coming :ph34r:

July 26, 2015 01:24 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement