Complete Guide to the 3D Pipeline #3: UV Unwrapping
This article is for beginners looking to become 3D artists. By the time you finish reading, you will gain knowledge only chosen few understand. Just because you're reading this nearly esoteric stuff, you can already be called a hero. A careful study of the text will take about 10 minutes.
This is the third part of the AAA pipeline series. Here are links to all five. Choose the one you need:
While editing a model, you can apply a material to its elements and select their color. However, you can't put textures on a 3D model as the program just doesn’t understand how to apply a flat image on a dimensional object.
UV unwrapping is flattening a Low poly model into a 2D scheme, similar to a pattern for sewing. Think of it as taking the skin off a 3D model and laying it to be painted. All modeling software has the functionality to do it.
UV map is a 2D representation of a 3D model's surface geometry used to apply textures or images to the model. It is a product of UV unwrapping.
💡I got the “unwrapping”, but what about “UV”?
The letters "U" and "V" represent the 2D texture axes, as "X," "Y," and "Z" are assigned to the 3D object axes in model space. Meanwhile, "W" is used alongside XYZ for quaternion rotations, a frequent operation in computer graphics.
How to create a UV map?
Whoa, hold your horses, hero! Do you think that one does simply unwrap a 3D model?
Before moving forward, you should remember the fundamentals relevant to the mystical realm of UVs.
⦿ UV shells are the 2D representation of a 3D model's surface in the UV space. If you rotate a shell, the texture on the corresponding geometry will also rotate.
⦿ Seams are the edges where the 3D model is cut to create the 2D UV layout. It is better to place seams along natural breaks in the object or in areas that are less visible. Also, you should always cut all sharp angles and right angles.
⦿ Texel is the smallest unit of a texture, equivalent to a pixel in a 2D image. Thus, texel density refers to the relationship between the size of a texture and the size of the 3D model's surface. Consistent texel density is essential to maintain detail and avoid blurry or stretched textures.
⦿ Checker texture consists of a repeated pattern of squares, usually black and white. When applied to the 3D model, the checker texture helps to see distortions or stretching in the UV mapping.
UV Unwrapping Techniques
UV space is an infinite number of squares, where the texture of the first one repeats infinitely on all the others. This is a limitation and a feature at the same time. Depending on the model, you will use one of these techniques:
Tiled mapping allows UV shells to extend beyond the borders of a single square and create seamless repeating patterns on surfaces. For example, if you were texturing a brick wall, placing the UV shells within the first square might result in oversized bricks. Tiled mapping can help to control texture scale and repetition, providing reasonable detail for areas such as terrains or walls.
Similar to tiles, trims repeat but only along one axis. They are useful for long, continuous surfaces like fences, pipes, or staircases. Trims save texture space, maintain detail and avoid visible seams.
A texture atlas is a single image containing textures for various parts of a 3D model. Each material is a separate draw call that demands game engine resources. To avoid creating a unique material for each object, you draw one texture and map all the elements onto it.
Coloring the entire surface of a 3D model within a single UV square. For example, to map a truck, you would need to create a texture with wood, painted metal, and other miscellaneous pieces. In the end, it will be the only texture with one material, which is aid optimization. This method works great for characters or objects with intricate details and patterns.
Overlapping UV shells save texture space when your 3D model has identical or symmetrical elements. For example, you don't need to map each bolt. Just create the map for the first one and overlay the rest. You can also overlap symmetrical objects.
3D MODEL IN ZBRUSH
Understand the essentials of character design in just a week. Explore the interface, learn to sculpt, streamline your work, and start the journey as a 3D Artist.
First, try to auto-unwrap your model. If lucky, you will just get a decent-looking UV map ready for the next pipeline stage. Well done!
1. Prepare your model
a. Ensure your 3D model has a proper grid and no overlapping or intersecting parts. b. Ensure your model scale within the 3D scene.
2. Mark seams
a. Choose the best places for seams to minimize visible texture transitions. b. Mark the seams along the chosen edges, cutting all sharp and right angles.
3. Unwrap the model
a. Perform an automatic unwrap of your model to get a UV map. b. Adjust UV shells' position, scale, and rotation for optimal use of texture space and maintain a consistent texel density. c. Check for stretching using a checker pattern and fix any issues.
4. Optimize the UV Layout
a. Arrange the UV shells efficiently within the UV space, utilizing overlaps, tiles, trims, or atlases if necessary. b. Group UV shells based on the model's parts or materials for better organization c. Reduce the size of less visible parts on the model, as there is no need for high-resolution textures on unseen areas. d. Straighten any distorted polygons in the UV layout.
5. Pack the UV layout
a. Pack the UV shells within the first UV square, leaving a few pixels of padding between them. b. If there is too much empty space in the UV layout, scale up the shells and repack them. If the UV layout is too tight, scale down the largest shells and pack them as densely as possible. c. Move the overlapping shells one square away from the main layout. This is necessary for baking the next pipeline stage — baking.
6. Check for Errors
a. Apply a checker pattern to your model to identify any issues with the UV layout, such as stretching, distortion, or uneven texel density. b. Adjust the UV shells and use tools like Unfold or Relax to fix the issues if necessary.
Once you are done, you will have a UV map ready for texturing. However, you may want to watch a video to look at UV unwrapping more precisely:
Tips and tricks
Cut complex shapes. Unwrapping large irregular surfaces may result in distorted UV maps. If you see artifacts, use the "Cut" function in the UV editor to create cuts on large details. Avoid making too many cuts, which will result in many visible seams on the model.
Add padding around seams. In game engines, textures lose resolution at a distance. When mapping UV shells, do not place them too close to each other, as textures may bleed into adjacent shells when the camera moves away. Always leave a small gap between UV shells, known as padding.
Unwrap cylinders manually. Automatic unwrapping can create unnecessary shells for cylinders. It's better to unwrap them as straight lines, making it easier to pack them together.
Map uneven lines as straight lines in UVs. Uneven lines can take up a lot of space in the UV layout, so it's better to map them as straight lines.
If something went wrong
Mastering the UV unwrapping process might be challenging as each model require a slightly different approach. There is no chance you will find answers to all questions in this guide. However, here are the most common issues, so at least you will know the reason and then google it out.
If the checker squares vary in size, it indicates inconsistent texel density. To fix this, adjust the size of your UV shells to make the checker squares measure evenly.
Excessive free space in the UV layout
If there's too much empty space in your UV layout, resize and repack the UV shells to fill the entire UV square. This ensures optimal texture resolution and efficient use of UV space.
Overlapping UV shells can cause artifacts on your model if it wasn’t your intention. Make sure the overlaps are precise and well-planned.
If overlapping shells are not perfectly aligned, visible seams may appear in the final texture. To avoid this, carefully position the overlapping shells to ensure they align accurately.
You are great if you are still reading about UV unwrapping. Frankly speaking, this topic is extraordinarily complicated, and even experienced 3D artists face issues here from time to time. Remember that thoroughly optimizing the Low poly model is the main secret to successful unwrapping.
Look, you just passed more than half of this guide! It’s clear you really want to master the whole pipeline and learn to model detailed and textured 3D models. Don’t hesitate and move forward: