{"id":349,"date":"2018-07-21T06:01:29","date_gmt":"2018-07-21T06:01:29","guid":{"rendered":"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=349"},"modified":"2018-12-27T06:07:14","modified_gmt":"2018-12-27T06:07:14","slug":"rendering","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/chapter\/rendering\/","title":{"rendered":"Rendering"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/fWkLMRcVTBM\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>Objectives:<\/strong>\r\n<ul>\r\n \t<li>To understand how to apply shading models, textures, shadows for visual realism<\/li>\r\n \t<li>To understand the \u2018Ray Tracing method\u2019 of rendering<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Discussion:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The study of 3D Graphics primarily focuses on the aspect of \u2018imitating the real world as closely as possible\u2019. This goal is referred to as \u2018Visual Realism\u2019. Modeling 3D objects that look exactly or closely similar to that of the real world objects is a daunting task and involves a series of steps, with each step producing an improvised version of its previous step. The stages of Visual Realism are summarized here.<\/p>\r\n&nbsp;\r\n\r\nWire frame \u2192 Shading \u2192 Lighting \u2192 Textures \u2192 Shadows \u2192 Materials \u2192 Environment Maps\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The wire frame model of an object is the first level of visual realism, where the objects skeleton is only modeled using either of the popular techniques available. The next stage is to apply shading techniques that describe the interactions of the light with the surfaces of objects. Lights and their properties are then modeled to give a sense of objects bathed in light. Since there are lights, the objects cast shadows, and so shadows are modeled. Textures and Materials give the object the material with which it is made. The final step is to call the Rendering algorithms to complete the goal of visual realism. Rendering algorithms compute the pixel intensity value for the given viewing dimensions and direction. The figure below shows the stages, as we move towards the right, the objects attain their true visual realism.<\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-351 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-251.png\" alt=\"\" width=\"572\" height=\"140\" \/>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Shading Model:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">A shading model captures the interactions of light with surfaces of objects. These interaction include absorption, reflection, refraction. The model assumes that there are two types of lights that illuminate objects in a scene: point light and ambient light. A shading model computes the amount of colored light that gets reflected from a surface given a viewing position. The aim of this step is to compute the amount of reflected light that reaches the eye, its color and intensity. The interaction of light with objects is quite a complex phenomenon. The reflected light intensity depends on properties of light, the surface properties of objects, contributing neighbouring objects and their properties, the viewing direction.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-353 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-252.png\" alt=\"\" width=\"177\" height=\"95\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Lets understand how light interacts with the surface of an object Most of the objects reflect some part of the light incident and absorb some part of it. . If all of the light is absorbed the object is a black body.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-354 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-253.png\" alt=\"\" width=\"557\" height=\"322\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><em>Diffuse Scattering<\/em>: Occurs when some of the incident light penetrates the surface slightly and is re-radiated uniformly in all directions. Its color is usually affected by the nature of the material out of which the surface is made. It is shown in the figure above. The effect of this interaction is that the object looks dull and seems to be lit equally on all sides, if we assume ambient light. An example of a ball modeled with diffuse properties is shown in the figure below.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><em>Specular Reflections<\/em>: incident light does not penetrate the object, instead is reflected directly from its outer surface. Ex: Plastic, metal etc., It is shown in the figure above. The effect of this interaction is that the object on its surface will have a bright spot called the <em>specular highlight<\/em>.<\/p>\r\n\r\n<\/div>\r\n<div>\r\n<p style=\"text-align: justify\">The object appears to have been made of reflective materials. An example of a ball modeled with specular properties is shown in the figure below.<\/p>\r\n<img class=\"size-full wp-image-355 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-254.png\" alt=\"\" width=\"331\" height=\"92\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The truth is that most surfaces produce a combination of the two types of reflections, depending on the characteristics of the surfaces such as roughness and the type of the material with which the surface is made.<\/p>\r\n&nbsp;\r\n\r\nThe computation involves many factors like\r\n<ul>\r\n \t<li>Amount of light incident<\/li>\r\n \t<li>The color of incident light<\/li>\r\n \t<li>The relation between viewing direction and incident direction<\/li>\r\n \t<li>The surface properties of objects<\/li>\r\n \t<li>The types of light sources in the scene<\/li>\r\n \t<li>The reflective properties of neighboring objects<\/li>\r\n \t<li>Ambient light and its color<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Flat Shading:<\/strong>\r\n\r\n&nbsp;\r\n\r\nThis is at the next level of visual realism after the Wire Frame level. The effect is that\r\n<ul>\r\n \t<li style=\"text-align: justify\">Color is computed at one point on the face and the same color is applied throughout the face.<\/li>\r\n \t<li style=\"text-align: justify\">Specular highlights are rendered poorly<\/li>\r\n \t<li style=\"text-align: justify\">Edges between faces are identifiable due to a phenomenon called <em>lateral inhibition<\/em> which leads to <em>Mach band<\/em> effect as shown in the figure below.<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-356 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-255.png\" alt=\"\" width=\"136\" height=\"92\" \/>\r\n\r\n<strong>Smooth Shading:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-decoration: underline\">Gouraud Shading<\/span>: This shading model computes a different color value for each pixel. It uses the method of linear interpolation. As can be seen in the first figure below, the color for a polygonal face can be computed by interpolating the known colors given at the vertices.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-357 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-256.png\" alt=\"\" width=\"440\" height=\"151\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Phong Shading: This shading model computes the normal vector at each point on the face, and finds a suitable color there. The normal vector at each pixel is computed by interpolating the\u00a0<span style=\"font-size: 1em;text-align: initial\">normal vectors at the vertices of the polygon. The concept is explained in the second figure above.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">As we know that, normal vectors are important to identify the orientation of objects in the 3D world, the interpolation of normal vectors gives us the most accurate direction and thus intensity for a pixel, given a viewing position and direction.<\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-358 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-257.png\" alt=\"\" width=\"626\" height=\"383\" \/>\r\n<div>\r\n\r\n&nbsp;\r\n\r\nThe common attributes of light are\r\n<ul>\r\n \t<li>Position<\/li>\r\n \t<li>Type of light (default is point light)<\/li>\r\n \t<li>Color of light<\/li>\r\n \t<li>Attenuation<\/li>\r\n \t<li>Default diffuse, ambient, specular values<\/li>\r\n<\/ul>\r\n&nbsp;\r\n\r\n<strong>Adding Textures to faces:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Textures give the look and feel for the objects bathed in light. It is more cumbersome and inefficient to compute color and intensity at each position on the surface of a 3D object. Instead, textures are modeled as wrapper sheets made up of 2D images. You can imagine this to be similar to that of making a Globe, where a printed plastic sheet is wrapped around a spherical object.<\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-359 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-258.png\" alt=\"\" width=\"214\" height=\"94\" \/>\r\n<div>\r\n<p style=\"text-align: justify\">There are fundamentally two types of Textures: Bitmap Textures, Procedural Textures. <em>Bitmap textures <\/em>are 2D captured images; while<em> procedural textures <\/em>are artificial images generated using any algorithm \/ procedure.<\/p>\r\n<img class=\"size-full wp-image-360 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-259.png\" alt=\"\" width=\"237\" height=\"121\" \/>\r\n<p style=\"text-align: justify\">Before we paste textures onto to the surfaces of 3D objects, we need to represent the 3D surfaces in their parametric form. The procedure takes the following order.<\/p>\r\n&nbsp;\r\n\r\n<em>Image space <\/em>\u2190<em> Texture Space <\/em>\u2190<em> Object space <\/em>\u2190<em> viewing space <\/em>\u2190<em> Screen space<\/em>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Except for the Object space in 3D, the rest of the coordinates are in 2D space. It is interesting to note that, Textures are in 2D space, while surfaces of objects onto which this texture is pasted, are in 3D space. The aim to find a mapping between the object space in 3D and texture space in 2D. For each position on the 3D surface a mapping texture value is identified and applied. The <em>texture space<\/em> is a normalized version of the 2D <em>image space<\/em>. Say for ex: If the image has dimensions 640 x 480, in the texture space this is represented as a normalized rectangle in the interval [0,1], i.e., the pixel position 320x240 in the image space will have its equivalent position in the texture space at [0.5, 0.5].<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-361 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-260.png\" alt=\"\" width=\"419\" height=\"220\" \/>\r\n<p style=\"text-align: justify\">Since the pixel values from an image are being used as Texture values, the name <em>Texels<\/em> are used in place of pixels. For ex: if we consider a cylindrical surface for pasting a texture, and a bitmap image to be used as texture, we will be doing a reverse mapping from 3D to 2D, i.e., for every position on the cylindrical surface, we shall find a mapping Texel in the <em>texture space<\/em>, and from <em>texture space<\/em> find the actual pixel intensity value from the texture image in the <em>image<\/em> <em>space<\/em>.<\/p>\r\n<img class=\"size-full wp-image-362 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-261.png\" alt=\"\" width=\"359\" height=\"99\" \/>\r\n\r\n&nbsp;\r\n\r\nThe texture value can be used in a variety of ways:\r\n<ul>\r\n \t<li>It can be used as the color of the face itself.<\/li>\r\n \t<li style=\"text-align: justify\">It can be used as the ambient, diffuse, or specular reflection coefficients to modulate the amount of light reflected from the face.<\/li>\r\n \t<li style=\"text-align: justify\">It can be used to perturb the normal vector to the surface to give the object a bumpy appearance as shown in the figure below.<\/li>\r\n<\/ul>\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-363 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-262.png\" alt=\"\" width=\"527\" height=\"129\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>Reflection Mapping:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In the real world, object surfaces that are shiny and reflective, show images of surrounding environment or objects. The same is imitated in <em>reflection mapping<\/em>. The two main types are<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-decoration: underline\">Chrome mapping<\/span>: In this a rough and usually blurry image suggesting the surrounding environment is modeled.<\/p>\r\n<span style=\"text-decoration: underline\">Environment mapping:<\/span> A recognizable image of environment is reflected.\r\n\r\n<img class=\"size-full wp-image-364 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-263.png\" alt=\"\" width=\"319\" height=\"158\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>Shadows:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Adding Shadows of objects to a 3D scene enhances visual realism. All objects under light cast shadows. The shape of the shadow depends on the orientation of objects towards a fixed light source. Here we assume that the scene is lit by a point light source that spews light equally in all directions.<\/p>\r\n<img class=\"size-full wp-image-365 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-264.png\" alt=\"\" width=\"288\" height=\"106\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">This technique displays shadows that are cast onto a flat surface by a point light source. The shape of the shadow is determined by the projections of each of the faces of the object onto the plane of the floor, using the source as the center of projection. The shadow is the union of the projections of the six faces for a cube. After drawing the plane using ambient, diffuse and specular light contributions, redraw the six projections of the cubes faces using only ambient light. This will draw the shadow in the right shape and color as shown in the figure below.<\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-366 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-265.png\" alt=\"\" width=\"340\" height=\"156\" \/>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Ray Tracing:<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Ray Tracing is a global illumination based rendering method for generating realistic images on the computer. Its primary use is creating and adding realism to images. This technique takes visual realism to its ultimate level.<\/p>\r\n\r\n<ul>\r\n \t<li>Enhance visual Realism<\/li>\r\n \t<li>Lighting simulation<\/li>\r\n \t<li>Hidden surface removal<\/li>\r\n \t<li>Shadow calculation<\/li>\r\n \t<li>Texturing<\/li>\r\n \t<li>Reflections and Transparency<\/li>\r\n<\/ul>\r\n<p style=\"text-align: justify\">In ray tracing, a ray of light is traced in a backwards direction i.e., from <em>eye<\/em> to the <em>source<\/em> of light as shown in the figure below. We start from the <em>eye<\/em> or <em>camera<\/em> and trace the ray through a pixel in the image plane \/ view plane into the scene and determine what and where it intersects. At each intersection, depending on the surface properties at the hit point, the light intensities are divided among reflections \/ refractions. These reflected and refracted rays are further tracked till they hit another object or surface and again we perform sub division of light rays. This is continued till we track the rays to end at the light source. We take into account the contributions of those rays that finally make it to the source. We finally add all these smaller contributions to compute the fraction of light intensity that finally reaches a pixel on the grid.<\/p>\r\n<img class=\"size-full wp-image-367 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-266.png\" alt=\"\" width=\"316\" height=\"183\" \/>\r\n<p style=\"text-align: justify\">In this technique, the ray is tracked in the reverse order, because, as we know that all light rays emerge from the light source, but all of them need not necessarily pass through the grid of pixels \/ view plane. So we need to bother about only those light rays that after undergoing multiple reflections and refractions, reach the grid. The pixel is then set to the color values returned by the ray. If the ray misses all objects, then that pixel is shaded with the background color.<\/p>\r\n\r\n<\/div>\r\n<img class=\"size-full wp-image-368 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-267.png\" alt=\"\" width=\"280\" height=\"256\" \/>\r\n\r\nThe figures above show how ray tracing technique renders 3D scenes with amazing clarity and realism.\r\n\r\n&nbsp;\r\n\r\n<strong>Summary:<\/strong>\r\n<ul>\r\n \t<li>Learnt how shading models, lights, textures and shadows are applied on 3D objects for visual realism<\/li>\r\n \t<li>Learnt the concepts of Ray Tracing technique<\/li>\r\n<\/ul>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Rendering<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/fWkLMRcVTBM\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<img class=\"size-full wp-image-370 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-268.png\" alt=\"\" width=\"631\" height=\"378\" \/>","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/fWkLMRcVTBM\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Objectives:<\/strong><\/p>\n<ul>\n<li>To understand how to apply shading models, textures, shadows for visual realism<\/li>\n<li>To understand the \u2018Ray Tracing method\u2019 of rendering<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Discussion:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The study of 3D Graphics primarily focuses on the aspect of \u2018imitating the real world as closely as possible\u2019. This goal is referred to as \u2018Visual Realism\u2019. Modeling 3D objects that look exactly or closely similar to that of the real world objects is a daunting task and involves a series of steps, with each step producing an improvised version of its previous step. The stages of Visual Realism are summarized here.<\/p>\n<p>&nbsp;<\/p>\n<p>Wire frame \u2192 Shading \u2192 Lighting \u2192 Textures \u2192 Shadows \u2192 Materials \u2192 Environment Maps<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The wire frame model of an object is the first level of visual realism, where the objects skeleton is only modeled using either of the popular techniques available. The next stage is to apply shading techniques that describe the interactions of the light with the surfaces of objects. Lights and their properties are then modeled to give a sense of objects bathed in light. Since there are lights, the objects cast shadows, and so shadows are modeled. Textures and Materials give the object the material with which it is made. The final step is to call the Rendering algorithms to complete the goal of visual realism. Rendering algorithms compute the pixel intensity value for the given viewing dimensions and direction. The figure below shows the stages, as we move towards the right, the objects attain their true visual realism.<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-351 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-251.png\" alt=\"\" width=\"572\" height=\"140\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-251.png 572w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-251-300x73.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-251-65x16.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-251-225x55.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-251-350x86.png 350w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Shading Model:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">A shading model captures the interactions of light with surfaces of objects. These interaction include absorption, reflection, refraction. The model assumes that there are two types of lights that illuminate objects in a scene: point light and ambient light. A shading model computes the amount of colored light that gets reflected from a surface given a viewing position. The aim of this step is to compute the amount of reflected light that reaches the eye, its color and intensity. The interaction of light with objects is quite a complex phenomenon. The reflected light intensity depends on properties of light, the surface properties of objects, contributing neighbouring objects and their properties, the viewing direction.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-353 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-252.png\" alt=\"\" width=\"177\" height=\"95\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-252.png 177w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-252-65x35.png 65w\" sizes=\"auto, (max-width: 177px) 100vw, 177px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Lets understand how light interacts with the surface of an object Most of the objects reflect some part of the light incident and absorb some part of it. . If all of the light is absorbed the object is a black body.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-354 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-253.png\" alt=\"\" width=\"557\" height=\"322\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-253.png 557w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-253-300x173.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-253-65x38.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-253-225x130.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-253-350x202.png 350w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><em>Diffuse Scattering<\/em>: Occurs when some of the incident light penetrates the surface slightly and is re-radiated uniformly in all directions. Its color is usually affected by the nature of the material out of which the surface is made. It is shown in the figure above. The effect of this interaction is that the object looks dull and seems to be lit equally on all sides, if we assume ambient light. An example of a ball modeled with diffuse properties is shown in the figure below.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><em>Specular Reflections<\/em>: incident light does not penetrate the object, instead is reflected directly from its outer surface. Ex: Plastic, metal etc., It is shown in the figure above. The effect of this interaction is that the object on its surface will have a bright spot called the <em>specular highlight<\/em>.<\/p>\n<\/div>\n<div>\n<p style=\"text-align: justify\">The object appears to have been made of reflective materials. An example of a ball modeled with specular properties is shown in the figure below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-355 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-254.png\" alt=\"\" width=\"331\" height=\"92\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-254.png 331w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-254-300x83.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-254-65x18.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-254-225x63.png 225w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The truth is that most surfaces produce a combination of the two types of reflections, depending on the characteristics of the surfaces such as roughness and the type of the material with which the surface is made.<\/p>\n<p>&nbsp;<\/p>\n<p>The computation involves many factors like<\/p>\n<ul>\n<li>Amount of light incident<\/li>\n<li>The color of incident light<\/li>\n<li>The relation between viewing direction and incident direction<\/li>\n<li>The surface properties of objects<\/li>\n<li>The types of light sources in the scene<\/li>\n<li>The reflective properties of neighboring objects<\/li>\n<li>Ambient light and its color<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Flat Shading:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>This is at the next level of visual realism after the Wire Frame level. The effect is that<\/p>\n<ul>\n<li style=\"text-align: justify\">Color is computed at one point on the face and the same color is applied throughout the face.<\/li>\n<li style=\"text-align: justify\">Specular highlights are rendered poorly<\/li>\n<li style=\"text-align: justify\">Edges between faces are identifiable due to a phenomenon called <em>lateral inhibition<\/em> which leads to <em>Mach band<\/em> effect as shown in the figure below.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-356 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-255.png\" alt=\"\" width=\"136\" height=\"92\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-255.png 136w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-255-65x44.png 65w\" sizes=\"auto, (max-width: 136px) 100vw, 136px\" \/><\/p>\n<p><strong>Smooth Shading:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-decoration: underline\">Gouraud Shading<\/span>: This shading model computes a different color value for each pixel. It uses the method of linear interpolation. As can be seen in the first figure below, the color for a polygonal face can be computed by interpolating the known colors given at the vertices.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-357 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-256.png\" alt=\"\" width=\"440\" height=\"151\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-256.png 440w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-256-300x103.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-256-65x22.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-256-225x77.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-256-350x120.png 350w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Phong Shading: This shading model computes the normal vector at each point on the face, and finds a suitable color there. The normal vector at each pixel is computed by interpolating the\u00a0<span style=\"font-size: 1em;text-align: initial\">normal vectors at the vertices of the polygon. The concept is explained in the second figure above.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">As we know that, normal vectors are important to identify the orientation of objects in the 3D world, the interpolation of normal vectors gives us the most accurate direction and thus intensity for a pixel, given a viewing position and direction.<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-358 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-257.png\" alt=\"\" width=\"626\" height=\"383\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-257.png 626w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-257-300x184.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-257-65x40.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-257-225x138.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-257-350x214.png 350w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p>The common attributes of light are<\/p>\n<ul>\n<li>Position<\/li>\n<li>Type of light (default is point light)<\/li>\n<li>Color of light<\/li>\n<li>Attenuation<\/li>\n<li>Default diffuse, ambient, specular values<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Adding Textures to faces:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Textures give the look and feel for the objects bathed in light. It is more cumbersome and inefficient to compute color and intensity at each position on the surface of a 3D object. Instead, textures are modeled as wrapper sheets made up of 2D images. You can imagine this to be similar to that of making a Globe, where a printed plastic sheet is wrapped around a spherical object.<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-359 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-258.png\" alt=\"\" width=\"214\" height=\"94\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-258.png 214w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-258-65x29.png 65w\" sizes=\"auto, (max-width: 214px) 100vw, 214px\" \/><\/p>\n<div>\n<p style=\"text-align: justify\">There are fundamentally two types of Textures: Bitmap Textures, Procedural Textures. <em>Bitmap textures <\/em>are 2D captured images; while<em> procedural textures <\/em>are artificial images generated using any algorithm \/ procedure.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-360 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-259.png\" alt=\"\" width=\"237\" height=\"121\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-259.png 237w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-259-65x33.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-259-225x115.png 225w\" sizes=\"auto, (max-width: 237px) 100vw, 237px\" \/><\/p>\n<p style=\"text-align: justify\">Before we paste textures onto to the surfaces of 3D objects, we need to represent the 3D surfaces in their parametric form. The procedure takes the following order.<\/p>\n<p>&nbsp;<\/p>\n<p><em>Image space <\/em>\u2190<em> Texture Space <\/em>\u2190<em> Object space <\/em>\u2190<em> viewing space <\/em>\u2190<em> Screen space<\/em><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Except for the Object space in 3D, the rest of the coordinates are in 2D space. It is interesting to note that, Textures are in 2D space, while surfaces of objects onto which this texture is pasted, are in 3D space. The aim to find a mapping between the object space in 3D and texture space in 2D. For each position on the 3D surface a mapping texture value is identified and applied. The <em>texture space<\/em> is a normalized version of the 2D <em>image space<\/em>. Say for ex: If the image has dimensions 640 x 480, in the texture space this is represented as a normalized rectangle in the interval [0,1], i.e., the pixel position 320&#215;240 in the image space will have its equivalent position in the texture space at [0.5, 0.5].<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-361 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-260.png\" alt=\"\" width=\"419\" height=\"220\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-260.png 419w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-260-300x158.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-260-65x34.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-260-225x118.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-260-350x184.png 350w\" sizes=\"auto, (max-width: 419px) 100vw, 419px\" \/><\/p>\n<p style=\"text-align: justify\">Since the pixel values from an image are being used as Texture values, the name <em>Texels<\/em> are used in place of pixels. For ex: if we consider a cylindrical surface for pasting a texture, and a bitmap image to be used as texture, we will be doing a reverse mapping from 3D to 2D, i.e., for every position on the cylindrical surface, we shall find a mapping Texel in the <em>texture space<\/em>, and from <em>texture space<\/em> find the actual pixel intensity value from the texture image in the <em>image<\/em> <em>space<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-362 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-261.png\" alt=\"\" width=\"359\" height=\"99\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-261.png 359w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-261-300x83.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-261-65x18.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-261-225x62.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-261-350x97.png 350w\" sizes=\"auto, (max-width: 359px) 100vw, 359px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>The texture value can be used in a variety of ways:<\/p>\n<ul>\n<li>It can be used as the color of the face itself.<\/li>\n<li style=\"text-align: justify\">It can be used as the ambient, diffuse, or specular reflection coefficients to modulate the amount of light reflected from the face.<\/li>\n<li style=\"text-align: justify\">It can be used to perturb the normal vector to the surface to give the object a bumpy appearance as shown in the figure below.<\/li>\n<\/ul>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-363 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-262.png\" alt=\"\" width=\"527\" height=\"129\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-262.png 527w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-262-300x73.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-262-65x16.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-262-225x55.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-262-350x86.png 350w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Reflection Mapping:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In the real world, object surfaces that are shiny and reflective, show images of surrounding environment or objects. The same is imitated in <em>reflection mapping<\/em>. The two main types are<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-decoration: underline\">Chrome mapping<\/span>: In this a rough and usually blurry image suggesting the surrounding environment is modeled.<\/p>\n<p><span style=\"text-decoration: underline\">Environment mapping:<\/span> A recognizable image of environment is reflected.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-364 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-263.png\" alt=\"\" width=\"319\" height=\"158\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-263.png 319w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-263-300x149.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-263-65x32.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-263-225x111.png 225w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Shadows:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Adding Shadows of objects to a 3D scene enhances visual realism. All objects under light cast shadows. The shape of the shadow depends on the orientation of objects towards a fixed light source. Here we assume that the scene is lit by a point light source that spews light equally in all directions.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-365 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-264.png\" alt=\"\" width=\"288\" height=\"106\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-264.png 288w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-264-65x24.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-264-225x83.png 225w\" sizes=\"auto, (max-width: 288px) 100vw, 288px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">This technique displays shadows that are cast onto a flat surface by a point light source. The shape of the shadow is determined by the projections of each of the faces of the object onto the plane of the floor, using the source as the center of projection. The shadow is the union of the projections of the six faces for a cube. After drawing the plane using ambient, diffuse and specular light contributions, redraw the six projections of the cubes faces using only ambient light. This will draw the shadow in the right shape and color as shown in the figure below.<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-366 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-265.png\" alt=\"\" width=\"340\" height=\"156\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-265.png 340w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-265-300x138.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-265-65x30.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-265-225x103.png 225w\" sizes=\"auto, (max-width: 340px) 100vw, 340px\" \/><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Ray Tracing:<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Ray Tracing is a global illumination based rendering method for generating realistic images on the computer. Its primary use is creating and adding realism to images. This technique takes visual realism to its ultimate level.<\/p>\n<ul>\n<li>Enhance visual Realism<\/li>\n<li>Lighting simulation<\/li>\n<li>Hidden surface removal<\/li>\n<li>Shadow calculation<\/li>\n<li>Texturing<\/li>\n<li>Reflections and Transparency<\/li>\n<\/ul>\n<p style=\"text-align: justify\">In ray tracing, a ray of light is traced in a backwards direction i.e., from <em>eye<\/em> to the <em>source<\/em> of light as shown in the figure below. We start from the <em>eye<\/em> or <em>camera<\/em> and trace the ray through a pixel in the image plane \/ view plane into the scene and determine what and where it intersects. At each intersection, depending on the surface properties at the hit point, the light intensities are divided among reflections \/ refractions. These reflected and refracted rays are further tracked till they hit another object or surface and again we perform sub division of light rays. This is continued till we track the rays to end at the light source. We take into account the contributions of those rays that finally make it to the source. We finally add all these smaller contributions to compute the fraction of light intensity that finally reaches a pixel on the grid.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-367 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-266.png\" alt=\"\" width=\"316\" height=\"183\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-266.png 316w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-266-300x174.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-266-65x38.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-266-225x130.png 225w\" sizes=\"auto, (max-width: 316px) 100vw, 316px\" \/><\/p>\n<p style=\"text-align: justify\">In this technique, the ray is tracked in the reverse order, because, as we know that all light rays emerge from the light source, but all of them need not necessarily pass through the grid of pixels \/ view plane. So we need to bother about only those light rays that after undergoing multiple reflections and refractions, reach the grid. The pixel is then set to the color values returned by the ray. If the ray misses all objects, then that pixel is shaded with the background color.<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-368 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-267.png\" alt=\"\" width=\"280\" height=\"256\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-267.png 280w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-267-65x59.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-267-225x206.png 225w\" sizes=\"auto, (max-width: 280px) 100vw, 280px\" \/><\/p>\n<p>The figures above show how ray tracing technique renders 3D scenes with amazing clarity and realism.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Summary:<\/strong><\/p>\n<ul>\n<li>Learnt how shading models, lights, textures and shadows are applied on 3D objects for visual realism<\/li>\n<li>Learnt the concepts of Ray Tracing technique<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Rendering<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/fWkLMRcVTBM\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-370 aligncenter\" src=\"http:\/\/csp06.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/52\/2018\/07\/1-268.png\" alt=\"\" width=\"631\" height=\"378\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-268.png 631w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-268-300x180.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-268-65x39.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-268-225x135.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-content\/uploads\/sites\/52\/2018\/07\/1-268-350x210.png 350w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/p>\n","protected":false},"author":3,"menu_order":19,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-t-raghuveera"],"pb_section_license":""},"chapter-type":[],"contributor":[59],"license":[],"class_list":["post-349","chapter","type-chapter","status-publish","hentry","contributor-dr-t-raghuveera"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/pressbooks\/v2\/chapters\/349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":9,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/pressbooks\/v2\/chapters\/349\/revisions"}],"predecessor-version":[{"id":633,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/pressbooks\/v2\/chapters\/349\/revisions\/633"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/pressbooks\/v2\/chapters\/349\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/wp\/v2\/media?parent=349"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/pressbooks\/v2\/chapter-type?post=349"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/wp\/v2\/contributor?post=349"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp06\/wp-json\/wp\/v2\/license?post=349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}