PHOTOREALISTIC TEXTURING FOR DUMMIES
Standard Projection Techniques vs The Painstaking Art of UV Mapping
What on earth is UV Mapping?
“UVs” is a way of saying u,v texture coordinates (as opposed to the X, Y, and Z axis that you construct your meshes on), which are points which define 1-by-1 positions within an image. These obviously connect to points in your 3D model, to position an image texture onto it’s surface. Kind of like virtual “thumb tacks”, what they do is pin an exact spot on an image that you wish to use to texture your model to a specific point on an object’s surface. Between these points, your software will stretch the image smoothly. This is what is referred to as UV mapping.
So why use UV coordinates instead of standard projections?
Well, once you have made your model, and are ready to texture it, the simplest way to apply your texture map is by using a standard planar, cylindrical, spherical or cubic projection. Here is a brief explanation of each of these, and how they are best used:
Planar is a method whereby an image is projected straight through the object along either the x, y, or z axis. This method is especially useful for items such as sheets of paper, posters, book covers, etc in other words, flat objects. The problem with planar projections is that if the texture is projected along an uneven surface, or if the image reaches a side that curves away from the projection’s plane, it results in unsightly lines such as in Figure A. When this happens, you then have to create lots of alpha-channel enabled images to cover up seams between adjacent planar projections and invariably ends up becoming a huge amount of annoying work. So never project a single image through an entire object if it has depth, like the box in the image, or if it has a very non-planar or irregular surface. Rather, as in the case of this box, create separate projections for the x and y axis as well, making sure that their edges will blend together properly. Alternatively, ensure the image to be used is tileable (seamless), and use a cubic projection (which I will discuss in a moment).
Most software has a bitmap fit/automatic sizing option that will stretch the image to fit the surface properly. Obviously, if your image is not the same shape as the surface onto which you are projecting it, this fit option will stretch it until it does. This usually doesn’t look too fantastic, so ensure that you measure the size of your object before making your image map.
Cylindrical projection is pretty self-explanatory. Basically what happens is your image is wrapped in a cylindrical fashion around your model along one of it’s axis. This is really useful for one kind of object only cylindrical objects. Please don’t try and use this for anything else. When making an image that will be used for cylindrical projection, ensure that it’s sides will meet correctly in other words, where the two sides of the image wrap around and come together, make sure that there is no visible seam, as in Figure B.
:lightbulb A useful way of ensuring that the sides of an image will meet and merge properly is by using the Offset filter in Photoshop (listed under Filters/Other/Offset), and offsetting the image by however many pixels you choose, and using the Wrap Around option.
Spherical projection is when the image is stretched from one pole to the other along the axis you choose, and then wrapped around the sides from the back meridian. Make sense? Basically what I mean, is that, say for instance, you do a spherical projection along the Y axis, then the image goes straight from the top point down to the bottom point, and wraps itself around so that the two sides of the image meet along a straight line down the side of the sphere - this line is known as a meridian. Once again, only ever use spherical projection for spheres. Use it on any other kind of shape, and, well, it’s not going to look very nice
Also, be sure to use the Offset filter (described above) to check that your two end will meet properly along the meridian.
:lightbulb Another useful way of checking whether a spherical map will work nicely is to use the Polar Coordinates filter (listed under Filters/Distort/Polar Coordinates) and use the Rectangular to Polar option. (However ONLY USE THIS FILTER TO CHECK YOUR IMAGE. No NOT save your image that you want to use with this filter applied it is not going to work!). This can give you an idea or whether there will be any seams when the image is wrapped around the sphere. This method is of course extremely popular for newbies to map their images onto the planets they make for those sci-fi scenes that just about everyone makes when they are starting out in 3D. Come on, admit it, you have all made sci-fi scenes, haven’t you? Use the methods I’ve described here to ensure that your planet doesn’t have any unsightly seams tearing across it’s surface.
Cubic projection just repeats a single image on each side of a box model it is applied to. Cubic mapping is basically a planar projection from 6 sides. Once again, ensure that the edges of the image will not form seams. Cubic projection is really only limited to perfectly square models, because if you try and use it on a rectangular shaped box, it will stretch the image on the long sides, and squash it on the shorter sides. Which looks pretty awful.
So, back to the original question why use UV mapping instead of these options? Well, as you have seen, these projection methods are very limited. It’s pretty obvious that they are not going to suffice for extremely complex models. But here is something bizarre these projection techniques are actually, technically speaking, more accurate than UV mapping. This is because texture images will be more accurately mapped using standard projections, which have some exact, continuous values over the entire surface, whereas a UV map has accurate samples of the projection only at specific points (where the polygons join, basically), between which it then uses a linear interpolation on the surface between those points. For non-English speaking people, interpolation is, basically speaking, an estimation of values which go together to form a continuous series this being a series of colour/tonal values being applied to your model, and the interpolation being the application of the parts of the image, which are not “tacked” down at those specific points, to the areas between them. The cool thing about this, however, is that once you have applied to UV coordinates to the model, pulling these points on your UV map around will pull the image with it. Pretty useful, hey?