Lec 07 Shading and Surface Characteristics 2021/22 PDF
Document Details
Uploaded by ImaginativeHedgehog
null
2021
Isaac Kerlow
Tags
Summary
These lecture notes cover shading and surface characteristics in computer animation. The notes discuss different shading techniques, including diffuse, specular, and smooth shading, and explain how these techniques are used in computer animation software. The concepts of reflection models, image mapping, projections, and positioning, the different maps, and their use, are also discussed.
Full Transcript
EIE 3101 Computer Animation Lec 07 Shading and Surface Characteristics 1 Isaac Kerlow, The art of 3D computer animation and effects, 4th ed., Hoboken, N.J.: John Wiley & Sons, 2009. Chapter 9 2021/22 sem 1 2 Content Ch9 Shading and Surface Characteristics Tutorial Materials Maps UVW Map...
EIE 3101 Computer Animation Lec 07 Shading and Surface Characteristics 1 Isaac Kerlow, The art of 3D computer animation and effects, 4th ed., Hoboken, N.J.: John Wiley & Sons, 2009. Chapter 9 2021/22 sem 1 2 Content Ch9 Shading and Surface Characteristics Tutorial Materials Maps UVW Map Modifier Unwrap UVW Modifier 3 Surface Shading Techniques The visual appearance of objects and environments is determined through the shading process. Surface shading is calculated based on the position of objects and distance relative from the light source, and it also takes into account the surface characteristics of the objects. 4 1. A light Reflectance Model Shading techniques are based on representations of light and surface called light reflectance models. Most software today uses a general light reflectance model called BRDF (Bidirectional Reflectance Distribution Function). Based on the amount of light reaching each point on a surface, the BRDF calculates how much light is reflected and in what direction. Fig 9.1.5 2. Diffuse Shading Diffuse surface shading usually assigns a constant shading value to each polygon on the surface according to the angle of its normal in relation to the light source, resulting in a faceted appearance. For this reason, diffuse shading techniques are sometimes called polygonal shading, or constant value faceted shading. Simplest; Fastest Fig 9.1.2 5 surface surface 6 3. Specular Shading The word specular means mirror-like. Specular surface shading techniques create surfaces with highlights typical of reflective surfaces. Also called normal vector interpolation shading because it calculates the shading at every point on the surface of a polygon. This is done by interpolating the vertex normal and shading every point on the surface of the polygon by computing the relation between the angle of its normal and the angle of the incident light. Fig 9.1.3 7 4. Smooth Shading Smooth surface shading first samples the amount of light reaching the surface normal in the center of polygons, then creates a vertex normal from the averaged values of the surface normal of adjacent polygons, and finally blends the intensities of the vertex normal in a polygon. Also called intensity interpolation shading Fig 9.1.4 8 Image mapping Basic idea: take a 2-D image and map it onto the surface of a 3-D object Many mapping techniques e.g. projecting or wrapping. Simulate not only the texture of a 3-D surface, but also other surface attributes such as reflectivity, and roughness. Fig 9.3.1 9 Fig 9.3.2 10 Projection Methods In 3ds Max Planar 1. Box 2. Cylindrical 3. Spherical 4. Shrink-Wrap 5. Flat projection: applies maps onto surfaces in a flat way. Cubical projection: a variation of the flat projection method that repeats the map on each of the six sides of a cube Cylindrical projection: applies maps onto surfaces by wrapping the sides of the map around the shape until the two ends of the map meet behind the object. (can be customized by determining whether the top and bottom are covered with a cap) Spherical projection: applies a rectangular map by wrapping it around a surface until the opposite sides meet, and then pinching it at the top and bottom and stretching it until the entire object is covered. Wrapping projection: allows textures to be projected onto 3-D objects in a straight way, but also to be stretched until the four sides of the map are pressed against each other. 11 12 Positioning the Map Texture maps are always rectangular images that are applied to polygonal or curved surfaces, and they can be defined by tagging their 4 corners. Origin (0,0), lower left corner (0,1), upper right corner (1,0), lower right corner (1,1) Placing texture maps on 3-D surfaces requires some fine-tuning when the surfaces are complex, when the proportions of the map and the surface differ, or when special effects are sought. 13 Positioning the Map In general, the parameter space used to position image maps on curved patches is based on the rectangular coordinate system used when maps are applied to polygonal models. But points on curved surfaces are defined in terms of their UV coordinates instead of XY values. The parameter space of a curved surface is defined by a U horizontal value (latitude) that stretches from 0 to 1, and a V vertical value (longitude) that also ranges from 0 to 1. Fig 9.3.10, 9.3.12 14 Fig 9.3.12 In 3ds Max: Unwrap UVW modifier 15 Positioning the Map There are also techniques for controlling the map once it has been placed on the surface. These techniques include scaling and tiling. Scaling image maps can be used when the maps need to cover more or less of the surface of an object. Tiling an image allows you to create patterns based on repeating a tile or single rectangular image map. Fig 9.3.15, 9.7.1 16 Surface Reflectivity Surfaces reflect light in different ways depending on a number of factors captured in the BRDF method The rendering of surface shading usually includes the basic three components of local illumination surface reflectivity: ambient, diffuse, and specular. Fig 9.4.1 17 1. Ambient Reflectivity The type of surface reflection that reacts to the intensity and color of the ambient light sources only is called ambient reflectivity. A unique characteristic of ambient reflection is that its intensity is independent of the distance between the reflective surface and the light source The angle of the surface in respect to the light source. This means that light scatters evenly in all directions End up with a uniform intensity and appear fairly flat sometimes 18 2. Diffuse Reflectivity A surface with diffuse reflectivity reacts to incident light in different ways depending on the position and orientation of the light source in respect to the surface. Naturally, a surface with diffuse reflectivity will reflect more of a light source that is positioned next to it than a light source that is far away. But the most important factor is the angular position of the light source Diffuse reflectivity is greater in areas of the surface that face the light source from a perpendicular angle Decreases as the angle between the incident light source and the reflective surface becomes more oblique. 19 3. Specular Reflectivity Surfaces with specular reflectivity appear shiny because they reflect light the way a mirror does. Specular reflectivity light does not scatter evenly through out the surface. Instead, it is reflected in a focused and concentrated way, a characteristic known as highlight sharpness. The apparent intensity of light reflected off surfaces with specular reflectivity depends mostly on the relation between the angle of the reflected light and the angle of the camera that is looking at the object. The intensity of the reflected light is greater when these two angles coincide. 20 Reflection Maps Realistic reflection effects typical of shiny materials such as glasses, metals, plastics, or varnished surfaces are best obtained with ray tracing rendering. A simple strategy for creating reflective surfaces is based on the technique of reflection maps. A reflection map consists of a 2-D image that is applied to a 3-D surface with the purpose of making the surface reflective. Reflection maps are usually monochromatic. Brightness values: The dark or light values in a reflection map can be used to determine which parts of the object will be fully reflective. In 3ds max, specular level map (white for 1; gray for 0.5; black for 0 shininess) 21 22 Environment Maps Environment maps can be thought of as a special type of reflection map because they reflect not only the objects surrounding the mapped object but also the environment surrounding the reflective surfaces. The main characteristics of environment maps is that they are projected on all the objects with reflective surface characteristics in the scene and not just on one particular object. (Reflection maps are usually applied to one 3D surface at a time) 23 Environment Maps 24 Bump Maps Bump mapping simulate roughness on a smooth surface not by affecting the surface itself but by altering the orientation of the surface normals. Changing the orientation of the surface normals of polygons before shading causes the light to be reflected in several directions, simulating the way light would be reflected from an object with rough surfaces. The darkest values in the image map may represent the valleys, and the lightest values simulate the peaks in the simulated texture, or vice versa. 25