Graphics Trick: Fresnel Environment


















4 responses to “Graphics Trick: Fresnel Environment

  1. Pingback: Graphics Trick: Schlick Approximation | UMBC Games, Animation and Interactive Media

  2. Pingback: Graphics Trick: Schlick Approximation | UMBC Games, Animation and Interactive Media

  3. T is left undefined, this is useless.

  4. I may have left a few steps out, since they’d be obvious to someone experienced in graphics. In this case, T is a vector in the direction of light refracted through the surface. Even for surfaces that appear opaque, this direction is important for the Fresnel reflectance. In fact, the symmetry in Fresnel’s equations can be even more apparent if you replace dot(N,V) with dot(N,R) for the reflection direction R.

    If you do want to know the T direction, it is completely defined by the incident ray direction, V, the normal, N, and Snell’s law, that n_1 \sin\theta_V = n_2 \sin\theta_T. Given those facts, and a bunch of vector algebra, you can eventually get that T=(N(N\cdot V)-V)n_1/n_2-N\sqrt{1-(1-(N\cdot V)^2)\,n_1^2/n_2^2}.

    If you want to know the R direction, it is completely defined by V, N, and the fact that \cos\theta_V=\cos\theta_R. Given those facts, and significantly less vector algebra, you can get that R = 2\ N(N\cdot V)-V

    But in any case, you don’t need to compute T for this. You just need to use either the Cook-Torrance form or Schlick approximation.

    On the other hand, you could have complained that I didn’t define n=n_1/n_2

Leave a Reply


You are commenting using your account. Log Out / Change )

Twitter picture


Facebook photo


Google+ photo


Connecting to %s