Presentation is loading. Please wait.

Presentation is loading. Please wait.

Procedural Animation Lecture 6: Mapping

Similar presentations


Presentation on theme: "Procedural Animation Lecture 6: Mapping"— Presentation transcript:

1 Procedural Animation Lecture 6: Mapping
Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa

2 Mapping Texture mapping Texture coordinates (UV coordinates)
Two-part texture mapping Other UV tools UV on points vs. vertices Aliasing & anti-aliasing Mip-mapping Bump mapping Displacement mapping Solid (procedural 3D) texture

3 Texture mapping Process of projecting a 2D texture image onto the surface of a 3D object. 2D texture image can be: a prepared source image (a photo, a painting, etc.) in an file or a procedurally created image

4 Texture mapping can manipulate a variety of surface characteristics, such as color, transparency, specularity, incandescence, bumpiness, and displacement.

5 How? How do we create a corresponding relationship between a 3D object and a 2D image?

6 Texture coordinates In order to apply 2D texture to a 3D object, we create texture coordinates. Texture mapping coordinates in texture space are represented as (U, V).

7 NURBS and Bezier Surface patch (e.g., NURBS and Bezier) is a rectangular patch with UV coordinates. So, it is natural to use a NURBS surface's UV coordinates as texture mapping coordinates.

8 How about polygons? Polygons have arbitrary numbers of vertices and shapes. How can we make texture mapping coordinates for each vertex of a polygon?

9 How about polygons? Built-in two part-texture mapping for relatively simple polygonal objects. Sculpting applications (e.g. Zbrush) generate UV maps.

10 Two-part texture mapping
Create texture coordinates in two steps: Step 1. A 2D texture is mapped onto the surface of a regular 3D geometric shape, such as plane, cube, cylinder, and sphere. Step 2. A 3D texture (created in Step 1) is mapped onto the surface of an arbitrary shaped object.

11 Two-part texture mapping
Commonly used two-part mapping methods are: Orthographic (flat, planar) projection Cylindrical projection Spherical projection Implemented in uvtexture and uvproject SOPs.

12

13 Other UV SOPs uvunwrap SOP uses two-part mapping on a tetrahedron, square pyramid, cube and octahedron. uvflatten SOP tries to preserve the shapes of polygons using given seams (cuts). uvpelt SOP tries to make UV with a minimum amount of cut.

14 UV on points vs. vertices
No of points < No of vertices UV coordinates on points generate less data and require less memory. UV coordinates on vertices allow adjacent polygons (polygons sharing an edge) to have disjointed texture map.

15 Texel and pixel Pixel is the smallest element in a digital image.
Texel is the smallest element in a texture mapping source image. When a large texture area corresponds to a small image area, a large number of texels need to be mapped to a single pixel.

16 When a large texture area corresponds to a small image area, a large number of texels need to be mapped to a single pixel. For instance, in a perspective view of a plane with a texture mapping, a single pixel in a rendered image may correspond to thousands of texels in the source image. Source image Rendered image

17 When a large texture area corresponds to a small image area, a large number of texels need to be mapped to a single pixel. If you use the color of a single texel to paint the pixel (i.e. point sampling), aliasing occurs.

18 Aliasing

19 How to avoid aliasing? Average the colors of all the corresponding texels to paint a pixel?

20 Averaging the colors of all the corresponding texels…
A single pixel in a rendered image may correspond to thousands of texels in the source image. If the renderer had to average the colors of all the corresponding texels per pixel, it would take a lot of rendering time. Bad idea.

21 Mip-mapping Texture mapping method that prevents aliasing without making rendering take much longer. The renderer prepares pre-filtered mip-mapped textures before starts rendering.

22 Mip-mapped texture Multiple copies of an original texture mapping image, all derived by averaging down the original image to successively lower resolutions. Each image in the sequence is at exactly half the resolution of the previous. The red, green, and blue components of a texture mapping image are separated to create a titled square map

23 Mip-mapping During the rendering process, the appropriate level of texture image is selected, depending on how much screen coverage there is and how obliquely the object is being viewed. The further away or more obliquely the object is, the lower-resolution (i.e., blurrier) version of the texture is used to render it.

24 Mip-mapping Many 3D applications (e.g., Houdini and Maya) use the mip-mapping technique and rendering takes less time if you use square textures. If your texture is not square, add black borders to make it a square texture. A multiple of 2 (e.g.,1024 x 1024) is the best choice for a resolution.

25 Bump mapping gives a bumpy appearance to a flat surface by disturbing the surface normals (normal vectors) of a surface

26 Bump mapping The bumpiness of bump mapping does not appear in the silhouette (profile edges) of an object.

27 Displacement mapping modifies both the position and surface normal at each point on a surface, giving bumpiness to the silhouette of an object as well.

28 Displacement mapping gives bumpiness to the silhouette of an object.

29 Solid (3D procedural) texture
provides texture to the 3D space in which an object exists. The object's color at each point on the object surface is determined by where the point is in the solid texture.

30 Solid (3D procedural) texture
Solid textures are good at creating an object that seems to have been carved out of a textured material, such as wood and marble.


Download ppt "Procedural Animation Lecture 6: Mapping"

Similar presentations


Ads by Google