VR Academy

VR Academy Part 3: Be Bold, Unfold UV Mapping

Posted on 16 October 2015

We are excited to release the third instalment of our VR Academy blog series. This post will cover the basics of UV mapping for those who want to know what the heck their crazy Computer Graphics friends are talking about.  This tutorial assumes the reader knows what Autodesk Maya is, what a texture is, and that we?re discussing virtual 3D objects.

When asking what UV mapping is, think back to the paper cubes of Kindergarten or Grade 1. This tutorial will use a paper cube to show how the default cube is laid out in Autodesk Maya (with tabs for easier taping).  

You may be wondering what UV stands for.  Remember those x,y charts in math class? When using 3D software, x,y,z already have a meaning because they describe 3D space. Therefore, we use u,v to say where something is located in 2D texture space. 

The texture from the paper cube´s UVs were copied to the 3D model´s UVs and the edges that don´t touch another face of the cube (the border)were highlighted in pink (below).

The above image shows that only what is drawn within the border of the paper will show up on the cube.  If something was drawn on the wood, it wouldn´t be on the final paper cube. This is the same for a 3D object. A little technical advice: when UV-mapping a surface (also known as unfolding), like this cube, it´s important to reduce the number of seams and empty space. What are seams? Below is a more ideal version of a cube´s UVs: the thick blue lines are the seams, and the blue represents the cube´s texturable area. 

Now we get to the cube!  This demonstrates the whole purpose of UV mapping - to get a texture nicely placed onto a 3D object.  The paper cube is a little worse for wear: that long part on top makes it flimsy. The only benefit of structuring a cube this way is that it makes wrapping text across seams a lot simpler. Making the words 'UV Tutorial Cube' wrap nicely on the paper cube was easy! That translates to CG as well. We now have a fully textured cube! Yay!

As you can imagine, there´s a lot more to UV mapping. 

This ring´s UV is designed to allow the texture to be panned across the UV space.  This is called a "scrolling texture"(below).

This is the wave´s texture. Notice how it´s scrolling outwards to the edge of the ring. The UVs are laid out so it was easy to set the texture´s direction and movement (below).

The UVs below are a little more abstract and would be covered in a more advanced tutorial.  One thing to note is how they fill the entire square (from 0 to 1, the top left to bottom right). That makes a modeller happy since it means no wasted texture space or holes.

Good UV layouts help manipulate textures in unique ways, or simply allow them to display correctly on a model. Distorted UVs look something like the image below. 

Notice how the star-eyed smiley face is partially cut-off on both the UV grid and the cube.  This is because it is going outside of the lines determined by the UV layout.

Hopefully this paper cube demonstration has helped you understand the way UVs work!  They are a fairly low-profile part of Computer Graphics, but they have a huge impact on every aspect of a 3D model. That star-eyed smiley up there is a lot more sinister with distorted UV mapping: animated movies would look pretty weird if everyone set up their UVs like that!

Enjoy some paper folding for me! If you would like to see more VR Academy posts, check out our blog or follow us on social media. 

Category: