Texture mapping Process of projecting a 2D texture image onto the surface of a 3D object. 2D image can be: a pre-prepared source image (a photo, a painting, etc.) in an image file or a procedurally created image
Texture mapping can manipulate a variety of surface characteristics, such as color, transparency, specularity, incandescence, bumpiness, and displacement.
How? How do we create a corresponding relationship between a 3D object and a 2D image?
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).
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.
How about polygons? Polygons have arbitrary numbers of vertices and shapes. How can we make texture mapping coordinates for each vertex of a polygon?
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.
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.
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
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.
How to avoid aliasing? Average the colors of all the corresponding texels to paint a pixel?
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.
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.
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
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.
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.
Bump mapping gives a bumpy appearance to a flat surface by disturbing the surface normals (normal vectors) of a surface
Bump mapping The bumpiness of bump mapping does not appear in the silhouette (profile edges) of an object.
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.
Displacement mapping gives bumpiness to the silhouette of an object.
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.
Solid (3D procedural) texture Solid textures are good at creating an object that seems to have carved out of a textured material, such as wood and marble.
Solid (3D procedural) texture When an object with a solid texture is deformed in an animation sequence, the texture on the object appears to change (or slip) over time unless you bake the texture to the object.