0
$\begingroup$

I read a lot about lighting recently but I have (at least) one thing that remains a dark corner: The Blinn-Phong and this opengl sourcetalks about an halfway vector.

My understanding:

  1. This vector is only used in Blinn Phong or derivatives but not in GGX
  2. It is essentially an optimization for old hardware to avoid too many calculations
  3. Other more realistic methods (GGX..) don't limit themselves to a simple half vector but a random number of rays starting from the microfacet.

My question:

Is my understanding correct so far?


It seems logical to reach more photorealism than Blinn-Phong, but again, it has just been a few days of studying path tracers source codes and reading as much litterature as I could on the subject of Lighting.

Thanks

$\endgroup$
2
  • 1
    $\begingroup$ Note the difference between the specular and the diffuse part of the calculation. The half vector (in PBR anyway) is used based on the assuming that a surface is a perfect mirror. In a nutshell this means, that (specularly reflected) light is only contributing where the angles between view ray and half vector, and light ray half vector have the same angle. There is no other light reflected with regards to your calculation. This does not hold true for diffuse reflections however. Thus, it is not (only) for more optimized calculations but has some basis in physics. $\endgroup$
    – Tare
    Commented Feb 27, 2023 at 12:56
  • $\begingroup$ @Tare: i can't upvote your comment, but if some else could it would be wonderful :) $\endgroup$
    – LeXav
    Commented Feb 27, 2023 at 15:12

1 Answer 1

0
$\begingroup$

It is better to think of blinn-phong as a specialization of the more generalized PBR equations. Its major goal is efficiency, so, in that sense you are on the right path, but the light vector, view vector, normal vector and half-way vector comes up repeatedly in PBR.

The Cook-Torrence BRDF is very popular and the half way vector (often just called the half vector) is an important part of the computation.

The half way vector comes up in microfacet distribution models (MDF) Beckman, GGX and Towbridge-Reitz all use the half way vector.

Usually listed in the equations as just 'H'.

$f_r(H,N,L,V)$

Blinn-Phong is a excellent starting point for learning PBR since most of the concepts apply directly to physically based models.

One of the key principles of PBR rendering is the principle of energy conservation. This means that a surface never reflects more light than it receives. The halfway vector is more consistent with this principle because it accounts for both the view direction and the light direction, and does not overestimate the specular reflection as the reflection vector does. The halfway vector also allows for a smoother transition between different roughness levels of a surface.

$\endgroup$
4
  • $\begingroup$ at learnopengl.com/Advanced-Lighting/Advanced-Lighting, it is writen: "halfway vector that is a unit vector exactly halfway between the view direction and the light direction. The closer this halfway vector aligns with the surface's normal vector, the higher the specular contribution"; so the half vector is an indication of the strength of the specularity? $\endgroup$
    – LeXav
    Commented Feb 27, 2023 at 15:18
  • $\begingroup$ I think that is a fair analogy. $\endgroup$
    – pmw1234
    Commented Feb 27, 2023 at 16:04
  • $\begingroup$ I think a lot of confusion comes from the fact the the halfway vector is used in blinn-phong and PBR models for different reasons. In BP it was introduced as an efficient way to compute specular and many discussions about BP stop there without discussing its relation to PBR, while in PBR models like GGX it is introduce purely for physically based reason when computing the microfacet distribution. Either way, it is worth the effort to learn it. $\endgroup$
    – pmw1234
    Commented Feb 27, 2023 at 16:14
  • $\begingroup$ Thanks a lot for your pointers pmw +1 $\endgroup$
    – LeXav
    Commented Feb 27, 2023 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.