Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualHodgman

Posted 20 May 2012 - 10:47 PM

Hello, greatly appreciate the suggestion. I'm kind of curious whether it's view direction and the halfway vector or if it's the light and normal as you said. I've seen some people suggesting the halfway vector and view direction in their implementation but when I had a look at nvidias whitepaper that describes Fresnel reflection, the article describes it as you do, that you want the angle between the direction to the light and the surface normal. What exactly is the difference between the two?

The input to Schlick's approximation is cos theta, where 2*theta is the angle between the incoming light and reflected light direction.
So 2*theta == angleDiff( in, out ), and we also know that out == reflect( in, N ), and thus angleDiff( in, N ) == angleDiff( out, N ) == theta.
in  N  out
  \o|o/  
   \|/	(o is theta)
So from in to out is 2*theta, and from in to N is theta and from N to out is theta. Or alternatively, dot(N,L) == dot(N,reflect(L,N) == cos theta.

#1Hodgman

Posted 20 May 2012 - 10:44 PM

Hello, greatly appreciate the suggestion. I'm kind of curious whether it's view direction and the halfway vector or if it's the light and normal as you said. I've seen some people suggesting the halfway vector and view direction in their implementation but when I had a look at nvidias whitepaper that describes Fresnel reflection, the article describes it as you do, that you want the angle between the direction to the light and the surface normal. What exactly is the difference between the two?

The input to Schlick's approximation is cos theta, where 2*theta is the angle between the incoming light and reflected light direction.
So 2*theta == angleDiff( in, out ), and we also know that out == reflect( in, N ), and thus -angleDiff( in, N ) == angleDiff( out, N ).
in  N  out
  \o|o/  
   \|/    (o is theta)
So from in to out is 2*theta, and from in to N is theta and from N to out is theta. Or alternatively, dot(N,L) == dot(N,reflect(L,N) == cos theta.

PARTNERS