top of page

Art Render

Introduction

Phong reflection is an empirical model of local illumination. It describes the way a surface reflects light as a combination of the diffuse reflection of rough surfaces with the specular reflection of shiny surfaces. It is based on Phong's informal observation that shiny surfaces have small intense specular highlights, while dull surfaces have large highlights that fall off more gradually. The model also includes an ambient term to account for the small amount of light that is scattered about the entire scene. (Wikipedia: Phong Reflection Model)

Purpose

OpenGL Shading Language(GLSL) shaders make it possible for us to create some amazing lighting effects in real-time computer graphics. These range from photo-realistic lighting to artistically inspired non-photo-realistic rendering. In the project, I implement different GLSL shaders that can produce both realistic per-pixel lighting, “toon shading” and a variety of other effects. Moreover, I also implemented another shader that adds silhouette edges (the black outlines seen above) to complete the cartoon effect.

Design

​Generally speaking, the Phong Illumination model and the silhouette edges are not complex. Therefore, I implement the illumination model with two different effects: the standard effect and the cartoon effect. The standard effect will show the regular light effect during shading; the cartoon effect is more interesting: based on the linear interpolation that the shading pipeline used, the final color will be changed abruptly rather than changing gradually. The highlight would be totally white, then the original color of the object, then total black at the surface which is behind the light.

bottom of page