Lect 3 Textures Flashcards
- Why is Surface Texturing important.
- Even the best synthesised images lack the richness of a real surface.
- Irregularities and imperfections are difficult to represent with polygons – such detail would require a huge number of facets and vertices.
- Techniques are possible that allow for realistic detail to be added without increasing the polygon count, these are all surface texturing of some kind.
Important for gaming.
- What is texture mapping?
- Also known as image mapping.
- Any image may be used as the source for the image map.
- An image is a 2D array of intensities.
- We can “paint” these images onto polygons – it’s like taking some giffwrap and sticking it onto the polygons.
3 How useful is texture/ image mapping?
- It’s not limited to actual pictures; surface textures like skin and cloth can also be added using this method.
- Helps in situations where we want to limit the polygon count.
- Allows greater control over the appearance of a texture.
- How is an image mapped?
- Have to map from coordinates in the object’s space to points in the image.
- Textures repeat themselves, like giftwrap with a repeating motif.
- In general, mapping a 2D image to a polygon is just a 2D transformation. However, some surfaces are more difficult – like the problems encountered when giftwrapping a spherical object.
- What are the coordinate systems used in texture mapping?
• Texture coordinates
‐ Used to identify points in the image to be mapped
• Object or World Coordinates
‐ Conceptually, where the mapping takes place
• Window/Device Coordinates
‐ Where the final image is really produced
• Parametric coordinates
‐ May be used to model curves and surfaces
- Why is knowing the difference between world and local coordinates important in **texture mapping? **
In object coordinates the origin and coordinate axes remain fixed relative to an object no matter how the object’s position and orientation change.
Most mapping techniques use object coordinates.
Normally, if a teapot’s spout is painted white, the spout should remain white as the teapot flies and tumbles through space.
When using world coordinates, the pattern shifts on the object as the object moves through space.
- Describe the 3 shapes used to bound an object.
Depending on the mapping situation, we may need to bound an object with a box, a cylinder, or a sphere. It’s often useful to transform the bounding geometry so its coordinates range between zero and one.
- Name two things to consider when **mapping a 2D image to a 3D mesh. **
We consider two things: map shape and map entity.
In 2D 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 colour?”
- Describe Map Shapes.
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 2D (planar) coordinate We use the planar coordinate to look up the color in the texture map.
- How can you tell which componant has been projected when texture mapping?
You can determine which component was projected by looking for color changes in coordinate directions - movement along the z-axis does not produce a change in color.
This is how you can tell that the z- component was eliminated.
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.
- Describe the process of texturing using a cylinder shape.
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 2D texture map, theta is converted into an x-coordinate and height is converted into a y- coordinate. This wraps the 2D texture map around the object.
The texture-mapped objects in this image have a cylindrical map shape, and the cylinder’s axis is parallel to the z-axis.
- How is a sphere shape used to map a texture to an object?
- 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.
- Describe the process of spherical mapping.
- The objects have a map shape of a sphere
- 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.
- The spherical mapping stretches the squares in the texture map near the equator, and squeezes the squares as the longitude reaches a pole.
- Descibe the use of box shapes for texture mapping an object.
Using a box as the map shape is similar to planar mapping.
Instead of using one texture map, box mapping uses six – one each for the left, right, front, back, top and bottom sides of the object.
To texture map the front and back sides, we eliminate the z-component of an object’s point.
Use the remaining x- and y-components to locate the color in the corresponding texture maps.
- Describe the use of Map shape and Map identity.
Map shape takes an (x,y,z) value from the object and converts this in various ways.
- but what is that value?
The map entity determines what we use as the (x,y,z) value.
Commonly-used map entities are:
1) a point on the object relative to the object’s bounding box,
2) the surface normal at the point being rendered,
3) a vector running from the object’s centroid through the point,
4) the reflection vector at the current point. (Remember that the reflection vector depends not only on the position of the point and its normal, but on the position of the viewer.)