UV unwrapping our game asset

UV mapping can be a difficult process, but understanding some best practices can help make the process easier:

UV unwrapping our game asset

A UV grid texture map

  1. Use a colored UV grid texture during the process: This can be easily found using an online image search, and can be applied to your object in Blender as a material. Be sure to find one the same size as the texture you wish to create, such as 1024 x 1024 or 2048 x 2048. I used a 2048 x 2048 image.
  2. Minimize seams and stretching: It is important to hide the seams of your UV map along hard edges or in hidden areas not seen by the player. Luckily for us, hard surface objects such as our crate are easier to unwrap than objects with more organic curves such as cars, plants, or animals.
  3. Be consistent with the orientation of your UV elements: When laying out your UV map, keeping everything oriented in the same direction will make laying out and creating your texture map that much easier. This is even more important if the texture artist is another member on the team.
  4. Be careful not to waste space: Less wasted space in your texture map translates directly to increased pixel density in your texture and better quality overall.
  5. Remember that all these things take practice to master.

Now let's UV unwrap our crate:

UV unwrapping our game asset

Changing the viewports to the UV Editing preset using the Scene Layout dropdown

  1. Select our crate and enter Edit mode, if you are not already there. Also make sure you are in polygon selection mode. Press A twice to select all the polygons of the crate.
  2. In the Menu Bar, go to the Scene Layout dropdown and select UV Editing. This will split the viewport into two halves. The left side is your UV layout and will be blank for the time being. The right half is your object. You can still move and rotate it so you can grab different polygons.
  3. In the 3D viewport (right side), you will notice that the Tools panel has changed to the Shading/UV tools. Under the UVs heading there is the UV Mapping option drop-down menu. These options are where we begin UV unwrapping an object. With all of the polygons selected, open the menu and select the Smart UV Project option:
    UV unwrapping our game asset

    A basic UV layout using Smart UV Project

  4. Smart UV Project is Blender's auto unwrap tool. Most 3D creation suites have one and their output can vary depending on how complicated your object is. For a simple crate like ours we will get fairly good results. For something more organic or for machines or architecture that are complicated, it might be hard to get a good result. At the Smart UV Project menu, we are going to use the default settings. Click Ok and it will unwrap your object.
  5. Smart UV Project has mashed our object flat and flat and separated it into UV islands. A UV island is a piece of your object. For our purposes, the way Blender has separated out our object will work just fine. If we were making a more complicated object, we could separate out each piece, group them to make more sense, and even stitch some of the pieces back together. This step will be necessary later in the book, when we create a more complicated object.
  6. To improve the quality of our map, we can use the Pack Islands option found in the UVs menu at the bottom of the UV Layout viewport. Selecting this option will resize all of your UV islands to take up as much space as possible without causing stretching.
  7. Since we are working in a game engine, we will need a second UV channel, or set of coordinates, for lighting information. To add another UV channel, we need to head back to the Scene Layout dropdown and select Default:
    UV unwrapping our game asset

    Creating our second UV map channel

    In the Properties panel, click on the icon for Object Data. Under the UV Maps heading, click the plus button to create another UV channel.

  8. On this second UV channel, we are going to add our lightmap UVs. These differ from our UV layout for texturing in that we don't care about making sure all the pieces are scaled to the same value. We only care that they take up as much space as possible to store light and shadow info. Blender's Lightmap Pack tool can easily do that for us. Head back to the UV Layout option in the Scene Layout drop-down menu. In the lower-right corner of the UV Layout viewport is the active UV channel. It will say UVMap. Click it and select UVMap.001. This is our new channel:
    UV unwrapping our game asset

    Using the Lightmap Pack tool to create a lightmap that Unreal 4 can use

  9. Head over to the Tools panel on the 3D viewport side and select Lightmap Pack from the UV Mapping menu. The default options are OK here as well. Click Ok. Now that we are done unwrapping. Head back to the Default screen layout:
    UV unwrapping our game asset

    Adding the UV texture grid as a texture map to our crate

  10. To test our UV layout, we can add the colored UV texture grid we downloaded earlier. This will easily show us if there is any stretching of our texture. If we were unwrapping this by hand, this texture map would help us put together a UV map and ensure all of our elements are facing one direction and minimize stretching. Click on the Textures button on the Properties panel toolbar. In the first section of the menu, go to the Type dropdown and select Image or Movie. This will open up the Image section of the menu and allow you to click the Open button. Navigate to where you stored your image and select it.
  11. Click the icon in the Properties panel toolbar next to the Texture icon. This is the Materials panel. All that is left to do is to Assign the material to your object. Click the Select option to select all your polygons, then click Assign. This adds the material to our object. It is stretched around the object according to our UV map.
  12. Obviously, we don't want a super colorful box in our Unreal environment. In the next section we will talk about adding our own basic material to the box and about other techniques for creating detailed textures.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.127.37