Jump to content
  • Advertisement
  • entries
  • comments
  • views

Failures in GI-land

Sign in to follow this  


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

[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:
[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
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!
Sign in to follow this  


Recommended Comments

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

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!