UNIT 69 UV’S

 

 

UV’s are a two dimensional representation of a three dimensional object. In essence, when you UV an object the program takes a representation of the topology of the object and projects it into the UV editor. This is a skin containing all of the contours of the model at a ration of 1:1. Capturing all of the light detail, from every source, so when you texture it  the model textures reflect light in a true manner.

Despite the complexity of the actual process, Maya has simplified it greatly. In order to attain a UV you must accurately project all of its elevations into their own sub-categories, x, y, and z.

On a complex model this can be done simply by projecting the axis of one section at a time. In the case of my shotgun I UV’d each layer respectively. Projecting all faces along each axis individually. Though this was simpler than trying to UV the entire model it was still awkward on some of the pieces. This was mainly down to Maya’s inability to just select the desired highlighted faces. Many times I would select a face, only for Maya to either deselect an already selected face, or to select another, undesired, face, many frustrated attempts were made for me to discover I had UV’d an erroneous face, or several, much patience and vigilance is required. A secondary reason was more of a judgement issue. Some of the faces encountered were of an oblique angle to the default (horizontal to the desired axis). These ranged from slight angles to large. The only way of deciding which UV set they belonged to was by judging if they were excess to forty five degrees from the axis I was working on. If they were larger then I would assign them to the other axis, if not they would be included in that axis.

For a simple example I decided to show how to UV on a cube.

UV_Tutorial2.5

When any mesh is created a default UV is projected automatically. This is the most basic representation of that shape. This may be suitable for simple shapes but not complicated, in fact it would be better to make fresh UV’s for any mesh created. So the default should be deleted before continuing. To delete any selected UV, in the UV editor, select the desired UV, click on polygons, scroll to the bottom and click on ‘Delete UV’s.

UV_Tutorial2.6

Now we have a clean UV grid and we can create our UV’s. To do this, in the viewport, change to ‘Face’ mode. Shift click two opposing faces, making note of their orientation, located at the bottom left. When done check the model to ensure no other faces have been highlighted. Next, in the modelling menu, click ‘UV’, move down to ‘Planar’ and click the box at the end. This will open up a planar choice box, giving the options for the x, y, or z axis. Select the appropriate one, in this case ‘x’.

UV_Tutorial3

UV_Tutorial4UV_Tutorial5

Once set, click the project button. This will apply the UV to all highlighted faces along the ‘x’ axis onto the grid.

UV_Tutorial6

Because we have projected both, opposing, faces simultaneously they are now stacked upon each other still facing the same orientation as on the model. To correct this we need to separate them and flip the far one to face the same way as the front or the information gained in our UV projection will not be seen correctly. To achieve this, in the UV grid right click and select ‘Shell’, this selects the UV’s as a collected face (in more complicated models any axis could have multiple faces which can me moved/modified individually, shell allows you to select the entire face and move it as one object). Once done select the move tool, w on keyboard, and select the UV. You can now drag one face from the other, making them easier to see, on a more complex model you will have to drag multiple faces from the stack.

UV_Tutorial7

Now you have two identical looking faces but which is which? The answer is simple, Maya has added a tool to help you quickly define the correct and inverted faces. On the top row of icons, in the UV editor, there is a solid blue square hovering over a white lined square, next to the magnet looking icon (Pixel Snap on/off). This is a colour filter that shows the orientation of the faces, blue is correct, red is incorrect. Click on it and the faces will highlight correspondingly.

UV_Tutorial8

Now that we have our faces aligned correctly we must re-size them to fit into the grid space. For the moment we will use the allotted, upper right, portion of the UV grid.For ease of accuracy, ensuring all of our pieces are of equal size, giving a more accurate display of light displacement, Maya have given us a grid to reference from. This grid is found on the second row of commands at the top of the page, it looks like a chequered grid, located underneath the same magnet looking icon. This grid is made up of tiny squares. The object of it is to make all of the squares as uniform as possible across all faces that have been UV’d. To use it simply select one, or all, of the faces, select the re-size tool, and re-size them. Some tweaking may be necessary to achieve uniform squareness across all faces, so don’t be afraid to tweak from face to face, individually, until all is equal, or thereabouts.

When done with the first projection move on to the next elevation, repeating the above process, until all of the faces of the model have been UV’d and equalised in the grid. For ease I found it better to form the UV’s into a square outside of the grid. When all faces were equal i resized all of them to fit into the grid, having already positioned my faces to fit best within the square. As this example is just a cube there is lots of room and finding a place for all my faces is easy.

 

As you can see in the above pictures all six of my cubes faces fit neatly into the grid ( this is a must if you want pure UV’s for texturing), aswell as the squares on each face being equal, which should give us a more even texture to the model when used in an engine.

In addition to this UV set I have just been made aware of a secondary set required for a better application of texture, this set is labelled ‘Lightmap’. The lightmap is important as it is a pure source for the program to reference the models lighting information. Again this is simple to create.

Under the ‘UV Sets’ menu, at the top of the UV editor, you will notice you only have one set of UV’s, the ones you just made. These contain all of the relevant lighting data required to successfully texture a model. All that is required is a copied set of these. On the UV editor grid right click and select UV. Drag select all of the UV’s in the grid, go to ‘polygons’, then ‘copy UV’s to UV set’. A drop-down will appear, ‘Copy into new UV set’, click on the box next to this and rename the map to ‘Lightmap’. Now any maps you create will have a permanent reference to the objects lighting protocols. Be sure to select your default map again as this is your work-source, Lightmap’s are for reference by the program.