The Wonderful World of UV Mapping – 8/2/12
I’m James McCarthy and I attend RPI and this summer I work for 80HD Games on their award-winning game, Nanoswarm. Some of my work on Nanoswarm included UV mapping the 3D models. UV mapping is one of those jobs most people underestimate and tend to dislike, and while I admit it’s not my favorite part of the 3D process, it’s an important part nonetheless. UV mapping is essentially taking a 3D model and unfolding its sides, then laying it flat on a 2D plane, like opposite of origami or papercraft. The names come from the variables, U and V, which represent X and Y on a 2D texture plane. X, Y, and Z are already variables used in 3D space, so we use U and V to store this texture information as separate variables. On average, it takes as long to UV map an object as it does to model it; the more complex the model, the longer it takes to map.
The first thing I did before UVing was look at what type of game we were making, what the player will be able to see, and the game’s art style. For this particular project the camera is high above the nanoswarm and the art style is simple and stylized, which means the resolution of the textures doesn’t need to be large. Having the camera high up also means a model can have subtle seams (two parts of a texture that don’t transition nicely).
After planning the UV maps, I started unfolding the 3D models onto a 2D plane. Here’s an example of an unfolded crate.
I then added a placeholder texture, so that I could identify which side corresponds to which location in 2D. This texture also helps identify any stretching and shows how much resolution each side has assigned to it (the smaller the squares, the more resolution).
As you can see, most of the shapes on the model and 2D plane are identical, which means tiling wouldn’t really be noticeable, given the camera height and art style. When you lay two of these sides on top of each other on the 2d texture plane, they both hold identical information and have no variation between them. The model also showed some texture stretching (most visible on the flat corner at the center of the image) which I quickly remedied by changing the shape on the 2D plane slightly.
You can now see that the identical sides on the object are the same color, and that a lot of space has been freed up on the texture sheet. This free space was used for other objects’ UV maps, so that multiple objects use the same texture, saving even more space. You can also see the seams I mentioned earlier where the triangle meets the edges, but once a texture is painted on the crate it will not be very noticeable. Now that the model is successfully UV mapped, I exported the 2D image you see and gave it to the texture artist, so that he can make the model look nice and pretty. - Jim McCarthy