How to switch between Blinn and Phong lighting models?

How to switch between Blinn and Phong lighting models?

The controls are similar to the last tutorial. Pressing the H key will switch between Blinn and Phong specular. Pressing Shift + H will switch between diffuse+specular and specular only. Because the specular exponents have different meanings between the two lighting models, each model has a separate exponent.

How is half vector used in Blinn model?

The half-vector in Blinn model is used as an input to normal distribution function (NDF), which is an approximation how microfacets are distributed about surface normal as the function of the surface roughness.

Can you substitute Blinn for Phong in a shader?

Feel free to substitute Phong for Blinn in any renderer/shader you write. I have discovered the reason for the H vector to be used. Unfortunately it is not the way it is used in most shading models, which can then be concluded to be incorrect. For physically based shading reflected light must obey the fresnel equations.

Is the Blinn specular exponent the same as Phong?

The Blinn specular exponent does not mean quite the same thing as the Phong exponent. In general, to produce a highlight the same size as a Phong one, you will need a larger Blinn exponent. Play around with the different exponents, to get a feel for what Blinn and Phong can and cannot achieve.

How is specular light related to ambient light?

Specular– the “shininess” of the object. This light is reflected more strongly in a particular direction. Its color is related to the color of the light source. Ambient– a minimum amount of light to simulate “global illumination” of the environment. Preventis unlit areas from becoming too dark. Emit– a “glowing” object 7.

Which is an example of a specular light source?

Specular light example Sources of lights 1. Directional lights Mimic lights that are far, far away, thus having the same direction for every point in the scene. Using directional lights simlifies math. 2. Point lights Mimic the light sources that are near the scene or within the scene: