07.01.2013 Views

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

UV mapping 223<br />

UV mapping<br />

UV mapping is the <strong>3D</strong> modeling<br />

process of making a 2D image<br />

representation of a <strong>3D</strong> model.<br />

UV mapping<br />

This process projects a texture map<br />

onto a <strong>3D</strong> object. The letters "U" and<br />

"V" are used to describe the 2D<br />

mesh [1] because "X", "Y" and "Z" are<br />

already used to describe the <strong>3D</strong> object<br />

in model space.<br />

UV texturing permits polygons that<br />

make up a <strong>3D</strong> object to be painted with<br />

color from an image. The image is<br />

called a UV texture map, [2] but it's just<br />

an ordinary image. The UV mapping<br />

process involves assigning pixels in the<br />

image to surface mappings on the<br />

polygon, usually done by<br />

"programmatically" copying a triangle<br />

shaped piece of the image map and<br />

pasting it onto a triangle on the<br />

object. [3] UV is the alternative to XY,<br />

it only maps into a texture space rather<br />

than into the geometric space of the<br />

object. But the rendering computation<br />

uses the UV texture coordinates to<br />

determine how to paint the three<br />

dimensional surface.<br />

In the example to the right, a sphere is<br />

given a checkered texture, first without<br />

and then with UV mapping. Without<br />

UV mapping, the checkers tile XYZ<br />

space and the texture is carved out of<br />

the sphere. With UV mapping, the<br />

The application of a texture in the UV space related to the effect in <strong>3D</strong>.<br />

A checkered sphere, without and with UV<br />

mapping (<strong>3D</strong> checkered or 2D checkered).<br />

A representation of the UV mapping of a cube.<br />

The flattened cube net may then be textured to<br />

texture the cube.<br />

checkers tile UV space and points on the sphere map to this space according to their latitude and longitude.<br />

When a model is created as a polygon mesh using a <strong>3D</strong> modeler, UV coordinates can be generated for each vertex in<br />

the mesh. One way is for the <strong>3D</strong> modeler to unfold the triangle mesh at the seams, automatically laying out the<br />

triangles on a flat page. If the mesh is a UV sphere, for example, the modeler might transform it into a<br />

equirectangular projection. Once the model is unwrapped, the artist can paint a texture on each triangle individually,<br />

using the unwrapped mesh as a template. When the scene is rendered, each triangle will map to the appropriate<br />

texture from the "decal sheet".

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!