This chapter will introduce the concepts of light and material in 3D graphics. We will understand the concept of light from the aspect of physics and its dual nature. We will discuss the different types of light components, such as ambient, diffuse and specular, with their implementation techniques. Later in this chapter, we will cover some important common illumination techniques (such as Phong shading and Gouraud shading). This will help us in implementing realistic-looking lighting models in computer graphics. In addition, you will learn the difference between directional and positional light and see how optimization can be achieved in the specular lighting by using the halfway vector technique. At the end of this chapter, we will demonstrate how to set up multiple lights in a scene and render objects with two-sided shading.
Light is an electromagnetic radiation; it exists with an enormous range of frequencies or wavelengths. Human eyes can only see a portion of this wavelength...