Presentation is loading. Please wait.

Presentation is loading. Please wait.

HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield1 Texturing Based on 3D Rendering, Humphreys, G., University of Virginia, 2004.

Similar presentations


Presentation on theme: "HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield1 Texturing Based on 3D Rendering, Humphreys, G., University of Virginia, 2004."— Presentation transcript:

1 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield1 Texturing Based on 3D Rendering, Humphreys, G., University of Virginia, 2004.

2 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield2

3 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield3

4 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield4 The appearance of many real world objects depends on its texture. The texture of an object is really the relatively fine geometry at the surface of an object. To appreciate the role surface textures play in the appearance of real world objects, consider carpet. Even when all of the fibers of a carpet are the same color the carpet does not appear as a constant color due to the interaction of the light with geometry of the fibers. Even though computers are capable of modeling the geometry of the individual carpet fibers, the memory requirements and rendering performance for a room size piece of carpet modeled to such detail would make such a model useless. On the other hand, having a flat polygon of a single color does not make a convincing replacement for the carpet in the rendered scene. Texturing

5 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield5 Ed Catmull, who later founded Pixar, was sitting in his car in the parking lot of the engineering building at the University of Utah in 1974 thinking about how to make a more realistic computer animation of a castle. The problem was that modeling the rough stone walls would require prohibitively many polygons. Even if he were only interested in the color variation, not the geometric variation (bumpiness), it would still require a new polygon for each point that had a different color. What approach would you take? Texturing

6 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield6 He concluded that if pictures of the stone wall could be stored for reference and then be applied or mapped onto the otherwise smoothly shaded polygon, then the result would be increased scene detail without increasing geometric complexity (and its associated increased difficulty in modeling the scene). In effect, texture mapping simply takes an image (a texture map) and wallpapers it onto the polygons in the scene. Since those days, texture mapping has become the most important method of increasing the level of detail of a scene without increasing its geometric complexity (the number of geometric primitives in the scene). Texturing

7 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield7 When creating image detail, it is cheaper to employ mapping techniques that it is to use myriads of tiny polygons. The image on the right portrays a brick wall, a lawn and the sky. In actuality the wall was modeled as a rectangular solid, and the lawn and the sky were created from rectangles. Texturing

8 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield8 The entire image contains eight polygons. Imagine the number of polygon it would require to model the blades of grass in the lawn! Texture mapping creates the appearance of grass without the cost of rendering thousands of polygons. Texturing

9 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield9

10 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield10 Texturing Police Shooting of a Civilian Stoke-on-Trent, UK

11 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield11 Texturing

12 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield12 Texturing

13 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield13

14 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield14

15 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield15

16 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield16 The basic method of texture mapping is to specify the coordinates in the texture map (s,t) that map to a particular point on the geometric surface. For polygonal models, the (s,t) coordinates are specified at the polygon vertices and are interpolated across the surface. Normally, the texture coordinates are on the range [0..1] in u and v. Texturing

17 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield17

18 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield18 Texturing

19 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield19 Forward mapping is stepping through the texture map and computing the screen location of each texel. This is done in real-time video effects systems. Most other systems use inverse mapping, which is done by stepping through the screen pixels and computing the color of each by determining which texels map to this pixel. Texturing

20 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield20 A disadvantage of mapping from texture space to pixel space is that a selected texture patch usually does not match up with the pixels boundaries, thus requiring calculation of the fractional area of pixel coverage. Therefore, mapping from pixel space to texture space is the most commonly used texture mapping method. This avoid pixel subdivision calculations and allows antialiasing (filtering) procedures to be easily applied. Texturing

21 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield21 Texturing

22 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield22 Texturing

23 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield23

24 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield24

25 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield25 In two-dimensional texture mapping, we have to decide how to paste the image on to an object. In other words, for each pixel in an object, we encounter the question, "Where do I have to look in the texture map to find the color?" Texturing

26 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield26 We’ll discuss map shapes first. For a map shape that’s planar, we take an ( x,y,z ) value from the object and throw away (project) one of the components, which leaves us with a two- dimensional (planar) coordinate. We use the planar coordinate to look up the color in the texture map. Texturing

27 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield27 Texturing

28 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield28 This slide shows several textured-mapped objects that have a planar map shape. None of the objects have been rotated. In this case, the component that was thrown away was the z-coordinate. Texturing

29 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield29 You can determine which component was projected by looking for color changes in coordinate directions. When moving parallel to the x-axis, an object’s color changes. When moving up and down along the y-axis, the object’s color also changes. However, movement along the z-axis does not produce a change in color. This is how you can tell that the z-component was eliminated. Texturing

30 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield30 A second shape used in texture mapping is a cylinder. An ( x,y,z ) value is converted to cylindrical coordinates of ( r, theta, height ). For texture mapping, we are only interested in theta and the height. To find the color in two-dimensional texture map, theta is converted into an x- coordinate and height is converted into a y-coordinate. This wraps the two- dimensional texture map around the object. Texturing

31 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield31 The texture-mapped objects in this image have a cylindrical map shape, and the cylinder’s axis is parallel to the z-axis. At the smallest z-position on each object, note that the squares of the texture pattern become squeezed into "pie slices". This phenomenon occurs at the greatest zposition as well. When the cylinder’s axis is parallel to the z-axis, you’ll see "pie slices" radiating out along the x- and y- axes. Texturing

32 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield32 When using a sphere as the map shape, the ( x,y,z ) value of a point is converted into spherical coordinates. For purposes of texture mapping, we keep just the latitude and the longitude information. To find the color in the texture map, the latitude is converted into an x-coordinate and the longitude is converted into a y-coordinate. Texturing

33 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield33 The objects have a map shape of a sphere, and the poles of the sphere are parallel to the y-axis. At the object’s "North Pole" and "South Pole", the squares of the texture map become squeezed into pie-wedge shapes. Compare this to a map shape of a cylinder. Both map shapes have the pie-wedge shapes at the poles, but there is a subtle difference at the object’s "equator". The spherical mapping stretches the squares in the texture map near the equator, and squeezes the squares as the longitude reaches a pole. Texturing

34 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield34 The objects have a map shape of a sphere, and the poles of the sphere are parallel to the y-axis. At the object’s "North Pole" and "South Pole", the squares of the texture map become squeezed into pie-wedge shapes. Compare this to a map shape of a cylinder. Both map shapes have the pie-wedge shapes at the poles, but there is a subtle difference at the object’s "equator". The spherical mapping stretches the squares in the texture map near the equator, and squeezes the squares as the longitude reaches a pole. Texturing

35 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield35

36 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield36 Texturing

37 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield37 Texturing

38 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield38 Texturing

39 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield39 We detect bumps in a surface by the relative darkness or lightness of the surface feature. In local illumination models, this is primarily determined by the direct diffuse reflection term which is proportional to N*L. N is the surface normal and L is the light vector. By modifying N, we can create spots of darkness or brightness. Bump Mapping

40 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield40 James Blinn invented the method of perturbing the surface normal, N, by a "wrinkle" function. This changes the light interaction but not the actual size of the objects so that bump mapped objects appear smooth at the silhouette. Bump mapping affects object surfaces, making them appear rough, wrinkled, or dented. Bump mapping alters the surface normals before the shading calculation takes place. It’s possible to change a surface normals magnitude or direction. Bump Mapping

41 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield41 Bump Mapping

42 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield42 Bump Mapping

43 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield43 Bump Mapping

44 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield44 In displacement mapping, the surface is actually modified, in contrast to bump mapping where only the surface normal is modified. This means that displacement mapped surfaces will show the effect even at the silhouette. In contast, displacement mapping alters an object’s geometry. Compare the profiles and the shadows cast by these two objects. Which is bump mapped? Displacement Mapping

45 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield45 Displacement Mapping

46 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield46 Environment Mapping Environment mapping is a cheap way to create reflections. While it’s easy to create reflections with a ray tracer, ray tracing is still too expensive for long animations. Adding an environment mapping feature to a z-buffer based renderer will create reflections that are acceptable in a lot of situations. Environment mapping is a two-dimensional texture mapping technique that uses a map shape of a box and a map parameter of a reflection ray.

47 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield47 Environment mapping is a cheap way to create reflections. While it’s easy to create reflections with a ray tracer, ray tracing is still too expensive for long animations. Adding an environment mapping feature to a z-buffer based renderer will create reflections that are acceptable in a lot of situations. Environment mapping is a two-dimensional texture mapping technique that uses a map shape of a box and a map parameter of a reflection ray. Environment Mapping

48 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield48 Environment Mapping

49 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield49 Environment Mapping

50 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield50 Environment Mapping

51 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield51 Texture mapping can be divided into two-dimensional and three-dimensional techniques. Two-dimensional techniques place a two-dimensional (flat) image onto an object using methods similar to pasting wallpaper onto an object. Three-dimensional techniques are analogous to carving the object from a block of marble. 3D Mapping

52 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield52 In three-dimensional texture mapping, each point determines its color without the use of an intermediate map shape. We use the (x,y,z) coordinate to compute the color directly. It’s equivalent to carving an object out of a solid substance. 3D Mapping

53 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield53 Environment Mapping

54 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield54 Wood, metal, marble... is not only a picture, it is a material which can be modeled Most 3D texture functions do not explicitly store a value for each (x, y, z)-coordinate, but use a procedure to compute a value based on the coordinate and thus are called procedural textures. Procedural Textures

55 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield55 Perturbing stripes can result in a texture with a marbled appearance. Procedural Textures

56 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield56 Making a wood-grained object begins with a three-dimensional texture of concentric rings. By using noise to vary the ring shape and the inter-ring distance, we can create reasonably realistic wood. Procedural Textures

57 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield57 Procedural Textures

58 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield58 Procedural Textures

59 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield59 Procedural Textures

60 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield60 Procedural Textures

61 HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield61 Internet Examples : ZBrush 3 Basics - ZProject Texturing http://www.youtube.com/watch?v=vTh0wSjF71U Paul Debevec animates a photo-real digital face http://www.ted.com/talks/paul_debevec_animates_a_photo_real_digital_face. html Finally: 3D Me Now Texturing


Download ppt "HCI 530 – Seminar in Advanced Topics 10/8/2004Damian Schofield1 Texturing Based on 3D Rendering, Humphreys, G., University of Virginia, 2004."

Similar presentations


Ads by Google