# Notes on half-vector

I find many interesting topics mentioned in our Computer Graphics class last week. I plan to do some extension reading on them. This post is about half-vectors.

I write a program to illustrate the differences between \( H \cdot N \) model(which uses the half-vector) and \( V \cdot R \) model.

The section 7.5.6 of the book Real-Time Rendering^{1} provides
a very good introduction to the microfacet theory,
which is based on half-vector modeling.
And the section 4.5 of paper^{2} contains a detailed comparison of
the two specular models.

## The microfacet theory

In microfacet theory, a surface is modeled as a collection of
tiny, flat Fresnel mirrors(“microfacets”).
And the shading of a surface is modeled by how the *normals* of those mirrors
distribute(by the normal distribution function, NDF) over the surface.
Therefore the half-vector is a more natural way of modeling
in the microfacet theory.

## The asymmetrical lobe

Is half-vector just a convenient way to model the specular shading? No, it is also different from the \( V \cdot R \) model in that it has an asymmetrical lobe.

I write a Python script to plot the isocontour of the reflected vectors.

We can see that the isocontours become more and more asymmetrical when the light direction approaches narrower glancing angle. This plot also explains why we do not see much difference in the shape specular spot for surfaces with high curvature(such as spheres).