Be sure to use vertex arrays and element arrays as geometry, handle textures, and illum = 2, i.e., Blinn-Phong illumination model (inclusive of diffuse and ambient terms). In addition, implement the following modifications to the MTL file format.
illum 5 # corresponds to Cook Torrance illumination model with Beckman's distribution function
rough <%f> # corresponds to roughness term, given as a real number, in the Beckman's distribution function
Use Schlick's approximation for the Fresnel factor, with F0 given by the dielectric approximation. (Use the provided Ni as the refractive index.)
Make sure that the camera is initially looking directly at the centre of the model.
Sp is 0 (i.e., light is specified in the camera coordinate system) or 1 (light is specified in the world coordinate system) The remaining six items are real numbers. <X, Y, Z> is the direction of the light in the listed space (do not forget to normalize it), and <R, G, B> is its color (spectral radiance). The world space is given by the coordinate system of the first read Obj file.
-- The URL of this page is: http://www.cse.iitd.ac.in/~subodh/courses/CSL781/a2_opengl.html --