Schlick BRDF and PDF back

(L) [2007/06/28] [playmesumch00ns] [Schlick BRDF and PDF] Wayback!

Has anyone implemented Schlick's brdf? There's a lot of attractive things about it, although there's 2 different papers that seem to provide different formulae. My main concern though is I don't know how to construct a pdf for it, and he doesn't give one in the paper. Anyone know how to make one?


links:

the first one: [LINK http://citeseer.ist.psu.edu/schlick93customizable.html]

the second one that talks about MC sampling: [LINK http://citeseer.ist.psu.edu/schlick94inexpensive.html]
(L) [2007/06/29] [necro] [Schlick BRDF and PDF] Wayback!

I haven't implemented it but had short look at the second paper recently and as far I understand:


His pdf is equation 25 and he gives the inversion for his variants of Z and A in equation 29. This is all you need for reasonal importance sampling, at least it should be, as I said, I haven't implemented it and there might be some pitfalls [SMILEY Wink]


However, the general evil part of the Fresnel still ruins nice Russian roulette and component selection... For high albedos variance might still explode as you cannot really tell which term of equation 22 ("double" variant) to choose with what probability.
(L) [2007/09/28] [phkahler] [Schlick BRDF and PDF] Wayback!

I've been toying with the Schlick lighting stuff for a few days now and have some observations and questions.


First, there is some ambiguity in the paper (the 94 version I believe is the one I've got). There is a little picture with a bunch of vectors, and a table of dot products and angles. One of the vectors is H which is midway between V and V' (outgoing and incoming directions), and its dot product with V is used in the Fresnel calculation. The table next to the diagram indicates that the dot product (u = H.V) is the inverse cosine of the angle between H and V. This suggests that H and V are unit vectors, and the picture shows all three about the same length. After normalizing H=V+V' and getting obviously wrong results, I looked around and found that H is commonly 0.5 * ( V+V' ) and this works very nicely. Oddly this means that the Fresnel calculation does not involve the surface normal vector!! But hey it works. Anyway I was confused by the definitions and still wonder if this is correct. BTW, the Wikipedia entry on it is completely broken (I may volunteer to fix that if I can get everything working).


So now I'm trying to use Equation 25 to compute the "Directional Factor" and plug that into equation 22 and back into equation 1. Really this is just taking the existing stuff I've got working and multiplying by D as computed in Eq 25. The problems are 1) this doesn't work at all, and 2) It doesn't make sense that it would work.


By setting the anisotropic value = 1 and the roughness = 1 it just darkens my object (the bunny). As soon as r is reduced even to 0.99 I start to get sparkles at grazing angles (around the edges) and where the light sources graze (the edges of shadows). As r is decreased everything darkens and the edges all get brighter. This makes sense because equation 25 has both v and v' in the denominator which will make things brighter for shallow angles. But why only when r<1 ? This is not at all what I want - I want specular highlights that you don't get from the Fresnel approximation.


One possible problem is that I used an arbitrary tangent vector T which isn't correct. I also tried fudging the dot product t = 1.0 with no luck. Do I need to actually produce a real tangent vector to get meaningful results even with a perfectly isotropic (p=1.0) surface? Are there any other hidden assumptions (like the above definition of H) that I need to know about? The equation doesn't work for me, and it's broken in a way that does make sense. So what am I doing wrong?


BTW I also tried the alternate formula 30+31 for D along with the blending function in Eq 33 for each variant. All results are similarly broken.


Another note, he shows H-bar as H projected onto the surface. This is used to compute t = H-bar dot T. It's redundant to actually compute H-bar because H-dot-T will yield the same result ( T-dot-N = 0, so adding a multiple of N to do the projection doesn't change the resulting dot product). Is this correct?


So where might I look to fix this? The Fresnel is nice, but I want those specular highlights [SMILEY Smile] I can't find the bug because my intuition tells me the strange artifacts should be expected, so what might be wrong?


Thanks,

Paul
_________________
--Paul

The OctTree Guy
(L) [2007/10/02] [lmv] [Schlick BRDF and PDF] Wayback!

Sorry for delay, I was sick for three days.

back