projects

Friday, September 02, 2005

Finally some Phong shading :)


This is the model I used for phong shading. Soon I will be using different models. It is a geosphere and backface culling is done. The green lines show the face normals and the red the avg normal. Note.. the normals are not culled and therefor those that are behind can also be seen!
However only the face normals are now used and therefor you can see the outlines of the triangles.. I will be using the average normals soon.
  • The light source is the eye itself.
  • The light color is (1, 1, 1).
  • The diffuse material color is (0.6, 0.6, 0.6) which is gray.
  • The specular material color is (1, 0, 0) which is red.
  • The specular light color is (1, 1, 1)... same as the diffuse light color.
Well... i did not exactly use the Phong model.... I used the 'Blinn-Phong Model' which is faster than the real one and produces good results. More about Blinn-Phong model can be found in this link http://www.lighthouse3d.com/opengl/glsl/index.php?ogldir2


With no specular reflection and only diffuse component.


With shininess set to 1.


With shininess set to 10.
Note: Since only the face normals were used... the shading is not smooth and therefor the individual triangles are easily visible :)

0 Comments:

Post a Comment

<< Home