I’m looking for information about the theory and mathematics behind UV mapping. I’ve looked at some of the source in Blender, and I know (a little, tiny bit) how to use the UV mapping features of the program. What I’m looking for is general information behind the concepts, the math used to convert a 3D topology to a 2D one, that sort of thing. Books, web pages, even source code for other mapping programs would be great.

If anyone knows of anything like this and would like to pass it along, I would really appreciate it, thank you.

I did not find anything as well when I searched, so I learnt on trial and error. This is what I understand, I hope this makes sense:

UV coordinates are local to every polygon in a 3D object and also for their counterparts in the 2D UV map.

The U and V numbers are a scale along the edges of the polygon.

0, 1, 2, 3 are the indices of the polygon vertices.

The UV coordinates of point P are U=0.5 V=0.25, because it is in the intersection of a line that cuts segments 01 and 32 at 0.5 of their lengths starting from 0 and 3 and a line that cuts segments 03 and 12 at 0.25 of their lengths starting from 0 and 1.

Thank, that’s quite interesting. Hmm… I wonder how that applies to polygons of other orders, with three or five sides? And if the UV coordinates refer to a fraction of the polygon’s side, how are they used to index into the rectangle of the 2D image being mapped? Curiouser and curiouser…

For any triangle, you are basically mapping each corner onto another triangle in image-space. For any point in a triangle you can compute its barycentric coordinates which are then used to locate the appropriate point in the triangle defined in the texture.

For n-sided polygons, you can simply convert it to n - 2 triangles. Then you determine which triangle a point lies in before computing its texture coordinates.

This is a bit vague but I don’t have my CG notes handy at the moment. If you still need more info, I have some references at home and I’d be happy to post a little bit more once I get home.

Cool, thank you, that certainly gives me something to chew on, anyway. I’m also interested in algorithms for unfolding and unwrapping an object; I can visualize how it works, but I’d like to get a better grounding in the theory. If you’ve got any more information, or can recommend some reference works, that’d be really great, thanks.