You are on page 1of 141

Table of Contents

Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Welcome!. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Introduction, what this book is about. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Basic requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Recommended software and hardware setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Color coding in the text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Texturing theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Materials. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Shaders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Textures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Texture coordinates/ Texture Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Texture projection methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Shaders and textures in action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
UV mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Intro. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
UV unwrapping basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
General pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
UV/Image Editor and 3D Viewport functions used in unwrapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
UV/Image editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3D Viewport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Unwrap algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Lightmap pack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Cube projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Cylinder projection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Sphere projection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Project From View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Smart UV Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Follow active quads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Unwrap. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Unwrapping basic shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Sphere (Subdivided cube). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
UV Sphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Cone. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
Cylinder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Torus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Icosphere. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Unwrapping complex shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Manual packing UV islands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Texturing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
How will we texture a model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Image file types and their characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Image sizes (resolution) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Image file attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Image file standards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Baking in theory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
General pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Baking Specular and Colour maps by example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Baking parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
What else can we bake? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Texturing with baked maps and GIMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Texturing full project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Introduction | Welcome! | Introduction, what this book is about

Introduction

Welcome!
Dear reader!
Thank so much for gibting your gelt to me, bla bla bla. You now dumb, when you read, you smart.

Introduction, what this book is about


I’ll safely assume, that you spent enough time learning about 3D, that it brought you to acquiring this book. If
you ever wondered what makes the models look appealing, you will get your answers here. I will cover the most
common and versatile techniques for giving your models some vitality and colour, as well as acquaint you with
some not-so-basic theoretical knowledge.
We will start with explaining some technical topics, I’ll walk you through the concept of the texturing process
and we’ll go well into detail on chosen aspects. After this general section I’ll guide you through your first
project.
Since a lot of specifications are common throughout every environment, main goal of this book will be to learn
the most versatile workflow, allowing you to export finished model along with textures to outside environ-
ments like different render engines or game editors.
Everything on this page is
Basic requirements still a WIP

Since this book we will mostly use specific software, Blender3D, some intermediate knowledge will be required
to follow the chapters. You need to know your way around Blender’s interface, have some knowledge about
working with the mesh as well as being able to use most common tools. I will however undertake quite detailed
method of guiding you through the process, so don’t worry, you don’t have to be a “pro”. The other necessary
knowledge base concerns raster graphics editor, so for the sake of this book I will use GIMP. But again, I will give
detailed description of how and what will be done.
General fluency in working within the specific OS is also advised.

Recommended software and hardware setup


As far as hardware requirements go, optimal setup (you will be fine with less than that too) would be:
•• 64-bit quad core CPU
•• 8 GB RAM
•• Full HD display with 24 bit colour
•• Mouse with three buttons
•• OpenGL-compatible graphics card with 1GB RAM
•• 500 MB of free disk space
•• Graphical tablet
As for the software:
•• Linux, Mac OSX or Windows OS
•• GIMP
•• Blender3D
This wraps up the introductory part of the book, now let’s get to the real stuff!

Color coding in the text


You’ll notice that some words in the text are formatted in certain way.
•• Bold characters highlight the important words an phrases.
•• Blender keyboard short cuts are marked with THIS colour and bold font.
•• Names corresponding to UI elements are marked Orange.
•• Finally numerical input values are marked in Green.

The important sentences, concluding previous paragraphs are framed like this.

2
Texturing theory | Materials | Color coding in the text

Texturing theory
In this section we are going to tackle the basics of texturing. I’ll intorduce you to a lot of new subjecs, it will be
quite a compact part of the book. That’s why at some point we’ll use few simple examples to make it easier to
asimilate. more of that when the con-
tent will settle
All of us can relate to the joyful feeling when we assigned material to our model for the first time. This really is a
huge part of creative process when it comes to 3D graphics and we all have some basic understanding of it.
However below the surface of what we intuitively know there’s whole lot of new, interesting things, that will
help you understand the process in detail.
The content below was shuffled arround in comparisment to the
earlier versions, it seems to make more sense and it’s intorducing
Materials new subjects more consistently
What is Material if we want to discuss it outside Blenders UI? It’s fairly basic, Material is really a container for
everything that happens with the model in terms of its looks.

Materials are placeholders for the Shaders and Textures. They also include instructions for how they
interact with eachother. We can assign them to the whole object, parts of it or invividual faces.

The diagram below shows schematic structure of model. We can assign different Materials Slots to parts of the
mesh (not just three, there can be virtually unlimited number of those). Within those Material Slots, we can
create multiple Shaders. Every Shader can be detailed with Textures, influencing it in various ways. Finally
mixing of different Shaders and Textures can also be influenced by Texture.
how many material slots can you actually
assign?

Shaders
Shader is a set of instructions for the rendering engine that tells it how to draw something. Different shaders will
be used for a fabric (matte), and we will use a different one for a polished metal (shiny) or glass (reflective, trans-
parent with index of refraction).

Shaders define the physical properties of material in terms of its looks. It consists of information about
colour, the way light bounces of the surface (or penetrates it) and visual displacement of the surface.

In Blender Internal, default material is a mix of Specular and Diffuse shaders. You can also enable Transparent,
Mirror, Subsurface Scattering and Strand Shaders.
3
Texturing theory | Shaders | Color coding in the text

Most commonly used shaders, we will focus on for now, are:


•• Diffuse — responsible for the way matte materials reflect light and colour of the reflection
•• Specular — responsible for the way smooth materials reflect light and colour of the reflection

If we want our model to consist of both shiny and matte surfaces, we would need to create a certain mix of Dif-
fuse and Specular shaders. At this point both the shaders affect whole area of the model and we can control
only the ratio in which they are doing so.

What we need in this case is those shaders to affect the selected areas, this can be handled by grayscale image
or procedural texture (in this case it will work as a mask for Specular Shader).

4
Texturing theory | Textures | Color coding in the text

If we now combine all those effects and add texture to Diffuse shader, we will end up with the final material.

Using more than one map (the texture type doesn’t matter) on the final model is referred to as
multitexturing.

Diffuse map

Specular map

Normal map

Rendered image

Base geometry

Textures
Different types of images, that we use to add colour information to the model, are called textures. The process
of adding this information is broadly called texturing. We’ll break down this process for better understanding
of what is really going on and what factors are influencing the outcome. To briefly outline what will be going on,
we’ll have to take under consideration, that the are two types of textures. First type is raster image, and the
other is procedural image. Now that we have those images, we need to establish texture coordinates that we
will use to place them on the 3D model. That part is called texture mapping. We can at last use different pro-
jection types to project the image to those coordinates. It might sound quite complicated, but it will be easier
to understand after we explain each of those in detail.

5
Texturing theory | Textures | Color coding in the text

The process of texturing refers to using raster or generated images to add detail or change mixing
factors of the shaders assigned to material.

Raster and procedural images


Raster image (graphic) is a rectangular matrix of pixels caring colour information. We can differentiate them into
bitmaps and pixmaps. Bitmaps use one bit to assign one of two colors to each pixel, while pixmaps can use
more bits to describe red, green and blue values to each pixel. This would be a highly technical description,
while in real life, term bitmap is reffering to most of raster graphics.
However easy to create in Blender, they are much more convenient to manipulate in external software like Pho-
toshop or GIMP. Later on will use a lot of those images as guidelines, additional effects, textures, bakes etc. I will
also refer to the images that we create (made to match specific UV set) as maps. And so we will create:
•• Colour/Diffuse maps
•• Specular maps
•• Normal and Bump maps
•• Emission maps
•• Alpha maps
•• Ambient Occlusion maps
•• Etc.
Procedural images are basically patterns created by some functions and mathematical equations. There are also
few variables that we can change to affect the way the texture looks. They might be associated with very simple
and artificial looking effects but with a little in depth knowledge they can help a lot during the texturing pro-
cess. Those textures usually cannot be exported to different file formats, but we will pull them out of Blender
using Texture Baking procedure. In Blender we get to choose from different types of procedural textures:
•• Blend
•• Clouds
•• Distorted Noise
•• Magic
•• Musgrave
•• Noise
•• Wood
•• Stucci
•• Varonoi
At default settings they look something like this:

6
Texturing theory | Textures | Texture coordinates

Texture coordinates
As mentioned before, images used for texturing can be either raster/bitmap or procedural. In both cases we
need to tell the software how to place them on the model, the process is called texture mapping. Different
types of texture mapping coordinates are:
•• UV — as for the definition, it’s quite simple: UV map is a 2D representation of the 3D object surface. What
it means from mathematical point of view, is that for every vertex coordinate of the mesh we assign cor-
responding coordinate in the UV space. The name itself, comes from the fact that UV map is a two di-
mensional space, since XY (and Z) are already describing three dimensional space, letters U and V were
used to avoid confusion. There’s also third coordinate that exist. The W dimension describes the vertical
axis when mapping thee dimensional textures (like procedural textures used to texture volumetric ef-
fects). So the actual name should be UVW, but it’s rarely used as that.
Think of it as a 3D paper cut out but a reverse one — you start from the 3D object and end up with 2D
one. For our model to be unwrapped as a flat geometry we need to use seams. Those would be virtual
cut lines that will allow the model to be flattened without major distortions. This is a very good mental
practice, pick some simple object near you and try to flatten it as if you were making the blueprint for 3D
cutout. This process is called UV unwrapping. Using one of the easiest examples, it would look some-
thing like this:

The difference is, we are not actually flattening the model. Rather than that, we operate on duplicates of
its faces, existing in different set of coordinates.

7
Texturing theory | Textures | Texture coordinates

This way, when surface of the model is laid down flat, we know which part is corresponding to which area
of the UV space and we can determine which part of the texture will appear on the surface of the model
(the value for every W coordinate in this case will be 0, singe the bitmap texture is two dimensional).

•• Generated — coordinates are based on the bounding box of the object. That means that the texture
might get either squished or stretched (based on it’s proportions) in order to fit itself into the bounding
box of the model. It happens this way because the coordinates of the bouding box are assigned to tex-
ture like on the following image.

8
Texturing theory | Textures | Texture coordinates

It’s also worth to point out that due to this type of mapping, the texture will scale with an object. In other
words, texture won’t be influenced by objects scale.
•• Object — it’s based on objects local coordinates. UV coordinates (0.5, 0.5) will have the same origin as
object. The whole UV space in this case is treated as 2 Blender Units and if object is larger than that, tex-
ture will tile.

•• Window — coordinates are based on the viewing window. The U and V coordinates of a point on the
surface of the mesh are equal to the coordinates of that point on the view screen/window. With the bot-
tom left corner of the screen being and the top right being. Notice that this way can distort the texture
proportions as well.

9
Texturing theory | Textures | Texture projection methods

•• Global — texture will start mapping in (0,0) global coordinates and (0.5,0.5) UV coordinates. Thole tex-
ture space, no matter it’s resolution, will fit within 2 BU square, it will tile and can be distorted if it’s not
square. This will cause our texture change the mapping as we move the object as well since it’s not using
coordinates of an object to map.

•• Strand/Particle — Uses normalized 1D strand texture coordinate or particle age(X) and trail position (Y).
Use when texture is applied to hair strands or particles.
•• Normal — Uses the direction of the surface’s normal vector as coordinates. This is very useful when cre-
ating certain special effects that depend on viewing angle.
•• Reflection — Uses the direction of the reflection vector as coordinates. This is useful for adding reflection
maps. You will need this input when Environment Mapping.
•• Stress — Uses the difference of edge length compared to original coordinates of the mesh. This is useful,
for example, when a mesh is deformed by modifiers. I’m being lazy with last five, I can’t find
•• Tangent — Uses the optional tangent vector as texture coordinates. any source of information as for the math
behind those so I just copypasted the
Texture projection methods info from Blender documentation
All of the above coordinates can than be projected to the geometry in couple of different ways. That is what we
call projection types. I’ll use different shapes mapped with Generated coordinates to show you the effects. The
fading geometry is representing projection geomerty:

10
Texturing theory | Textures | Texture projection methods

•• Flat — the texture will be projected on XY coordinates, notice that streight verical faces get distorted.

11
Texturing theory | Textures | Texture projection methods

•• Cube — texture will be projected along global XYZ axis, notice that projection on the sphere is a little
different. Those jugged edges are the outcome of algorithm trying to place the texture according to the
instructions but causing peculiar outome due to interfering planes.

12
Texturing theory | Textures | Texture projection methods

•• Tube — texture will be projected from cylinder shape on global XY axis. This will couse significant distor-
tion if the object has faces coplanar to those axis. The whole texture will also be stretched if it’s in 1:1
resolution ratio. There is a way around it if you use 1:3.14159... I think you know why.

13
Texturing theory | Shaders and textures in action | Texture projection methods

•• Sphere — texture is projected from all directions, notice that I had to remove part of the projection
sphere to get more visibility of underlying object.

Shaders and textures in action


Creating some effects would employ cooperation of three elements described above. I will explain it on a sim-
ple example. Lets use Blender Internal render engine since we will be using it almost exclusively in the following
chapters.

14
Texturing theory | Shaders and textures in action | Texture projection methods

First step will be creating a cube and assigning material to it by hitting New in Material tab.

Our newly created material will serve as a container for shader and textures, it will be also used to assign those
to specific faces (right now it’s the whole model). Let’s change the colour, rise the Diffuse Intensity to 1 and drop
Specular Intensity to 0. What we did here is we effectively disabled Specular shader. Now only Diffuse shader
will affect the surface.

15
Texturing theory | Shaders and textures in action | Texture projection methods

Let’s jump into Texture tab and add a New texture in an empty slot.

We are now going to do a couple of steps, you might modify them by using your own image. To create an image
split the Viewport window, change the right window to UV/Image Editor and hit New (1) to create new image.
Choose Colour Grid (2) from the settings popup and leave the rest of settings at their defaults. This step gener-
ates new image which you can save to your local disk (while in UV/Image Editor hit F3 and proceed saving the
image as PNG to the disk). Now that we have our image saved to the local drive we can pull it back to Blender
by Opening the file or choosing it from the drop-down menu (5). Since the image was created in Blender, it’s
already given a name within Blender interface. After saving the image to the local drive Blender remembers the
name we gave it, as well as the location of the newly saved file. In this particular case we can use either drop-
down or Open menu to apply the file as texture.

16
Texturing theory | Shaders and textures in action | Texture projection methods

To see the effect of our hard labour in the viewport, we’ll need to change the shading settings. To do that, you
need to call out the Properties panel by hitting N while hovering coursor over 3D Viewport. In the Shading tab
you need to change shading to GLSL and then hit “ALT+Z” to switch the Viewport from Solid to Shaded mode.
Notice that the colour of the model has changed. This happened due to the fact, that we just switched the col-
our information from the solid shader colour to image input, which affected the way the model is now ren-
dered.

This however looks not at all what we expected. The reason for this is that we left one very important option at
it’s default. That would be the choice of Mapping Coordinates, right now it’s set to UV (or at least it should be in
some Blender distributions. If it’s not, change it now). With the cube selected, go into the Edit mode (by hitting
TAB in Viewport with the object selected), Select All the geometry and hit U, Cube Projection. What you will
immediately notice is that something happened in the UV/Image Editor. With the cursor over UV/Image Editor
window hit CTRL+P. You can take a while to admire the effect of your work.

With those few steps, you just created material with a very simple Diffuse shader that uses Image Texture
(mapped to UV coordinates) as a colour input.

17
Texturing theory | Shaders and textures in action | Texture projection methods

Let’s move forward and put the Specular shader to use. As I mentioned before, specularity can be influenced by
grayscale or BW image. We could create it externally or in Blender compositor, but we are going to use some-
what different method instead. In order to generate that image, we will use Procedural Texture as well as Bak-
ing. Sounds complicated? No worries, it’ll be quite easy.
While in Edit mode, hit the X button in the UV/Image Editor to remove the image from current selection (the
UV’s need to be selected as well). Create a new image just like we did before, it won’t matter if it’s filled with
colour or not, so just use the default settings. Select next free texture slot and create a New texture.

From the Texture Type drop-down menu select Clouds, Mapping Coordinates to UV should be on by default. All
there’s left to do is to uncheck Diffuse Colour influence and check Specular Intensity. If you hit F12 at this point,
you’ll see that specular map already works when you render it, however it doesn’t show in the Viewport. That’s
because Clouds are procedural texture and in order to make things work in GLSL we need to use the image one.
The next steps will cover getting this procedural texture out to the image file.

18
Texturing theory | Shaders and textures in action | Texture projection methods

Let’s move to Rendering tab, in the bake shelf you need to select Specular Intensity and then hit Bake button.
We just baked the procedural texture to the file. All there’s left to do now is to save the image to the file, like we
did before.

Now, go back to the Texture tab and switch the Texture Type from Clouds to Image, open the saved image with
clouds. Lastly, in the Influence shelf, Select RGB to Intensity.

Since Specular shader bounces light off the surface under one angle, you might have to get the right angle to
see the effect. Once you get it right, the highlights will appear less regular than before. That’s because the pres-
ence of Specular shader on the model is now influenced by the cloud image we used. White parts of the image
‘tell’ the shader that it should act with full influence in this area, black ones disable it completely, while everything
in between is changing the factor with which Specular shader mixes with the Diffuse one. That is also why we
used the Specular to Intensity option, we are influencing the mixing factor.
This lesson should help you understand the basic idea of how materials, shaders and textures work. For now, we
barely scratched the surface (see what I did here?) of the subject, but we will be learning by doing as we go.
Coming up next, huge part of this book, that is UV mapping (hold you horses, it’s still mainly theory).

19
UV mapping | Intro | General pipeline

UV mapping

Intro
In the previous chapter we learned what UV’s are, now I’m going to teach you how to use some tools built into
Blender, that make the UV unwrapping process easy as pie.

UV unwrapping basics
You already unwrapped the basic cube in the previous chapter, in order to do that you had to be in the Edit
mode and there were things happening in the UV/Image Editor. As far as working on UV’s go, this is where most
of the process takes place. Notice the square grid in the UV/Image Editor, this is what’s called UV Space. That is
the place where our UV map will be unwrapped to. Let’s start with setting up general pipeline followed by an
example.

General pipeline
•• (Optional) select the geometry in 3D Viewport and add a New Image in UV/Image Editor, add a Colour or
Texture Grid with size of your choice (1-2k [1024x1024 to 2048x2048] square texture is usually enough, it
depends mostly on model size, but the whole point is that it should be visible enough on the mesh to
help you see how the islands are unwrapped). In 3D Viewport Transform panel under shading choose
Texture Solid.
•• Add Seams if necessary (3D Viewport: Ctrl+E, Mark Seam or UV/Image Editor: Ctrl+E)
•• Unwrap by hitting U, Unwrap
•• Hide the geometry in Viewport(H) if it’s in your way, if there’s any that does
•• Rinse and repeat
•• After unwrapping the whole object, Unhide (Alt+H) the parts of mesh, select all of them in UV/Image
Editor by hitting A until they are all highlighted and hit Ctrl+P to Pack Islands. This ensures that Islands
will be the same size and so the resolution of the texture
•• Pack the Islands manually if necessary
In Edit mode select whole geometry and add New Image in UV/Image Editor. We’ll use 1024x1024 UV grid tex-
ture. Create a default cube and jump into the Edit mode. Now select the four vertical edges (you can use edge
ring select to make it faster, Alt+Ctrl+RMB while hovering over vertical edge) and then select three edges from
the bottom face. Hit the Ctrl+E and choose Mark Seam.

Remember when I told you that UV unwrapping is like creating a blueprint for a paper cutout? The Seams in 3D
are virtual cut lines that tell the software where we want our model to split. Now with the geometry selected
(you can also select parts of the geometry and only them will be unwrapped) hit U and this time we are going
to use the Unwrap option.

20
UV mapping | UV unwrapping basics | General pipeline

The shape that appeared in the UV/Image Editor is different than from one I used earlier to illustrate unwrap-
ping process. That is because we introduced the Seams in different places that I did before. We can use a previ-
ous method by Clearing Seams and then selecting the edge ring once again. This time we’ll select opposite
edges of the bottom face (instead of three in a raw like before) and one perpendicular to them on the top.

21
UV mapping | UV unwrapping basics | General pipeline

After unwrapping you can see the more familiar ‘T’ shape. The reason I’m showing this to you is, that the shape
of the unwrapped geometry can sometimes make a lot of difference, when it comes to packing the UV’s tightly.
It might sound a little abstract right now but keep in mind, that you have a lot of influence over UV’s shape. Next
thing we are going to do is we are going to introduce another Seam to an edge at the bottom, unwrap it and
hit Ctrl+P.

Our UV’s are now split into two parts, every part consists of few faces. We will refer to those pieces consisting of
numerous faces as Islands. If you go into selection menu of UV/Image Editor and hit Ctrl+TAB, you’ll be able to
pick Islands from the menu. Right click on one of the faces, this will select the joined faces as well.
Notice, that one of the Islands is rotated, this might cause some problems later on. Since we will be using im-
age files to texture objects, you have to realize something. Bitmaps are made of pixels and pixels are basically
little squares. What happens if you try and run a line at an angle through an array of squares? More or less this:

22
UV mapping | UV unwrapping basics | General pipeline

This issue is called texture bleeding. Don’t get me wrong, it might be handled with different methods, but we
can fix it in the easiest possible way for now. Select the rotated Island and rotate it (R) so it’s aligned as closely
as possible along UV coordinates. After that hit Ctrl+P and immediately after that F6. Ctrl+P calls out the Pack
Islands function, it’s basically a script that draws a smallest possible, rectangular border around every Island
and tries to find a best fit for all of them in the UV space. Let’s do two things here, uncheck the Rotate option
(so it won’t mess with our manual alignment) and put something more than zero in the Margin option (it creates
spacing between the Islands).

We’ll go a little further, Tab out of Edit Mode and hit Ctrl+2 to subdivide the cube than Apply the Subdivision
Surface modifier. Go back to Edit mode and we’ll see what happened. The UV’s are now subdivided too, it’s a
nice feature but it might cause us some problems. Hit N to show Properties Panel, under Display you’ll find
Stretch checkbox, enable it.

23
UV mapping | UV unwrapping basics | General pipeline

What you see now is a colour representation of how much the UV coordinates differ from 3D coordinates. In
other words, it shows how much of the stretching occurs on the faces. Deep blue colour means that the unwrap
is OK, everything shifting from that means potential trouble. It doesn’t mean that we have to unwrap everything
with no stretch at all, sometimes you can accept a little stretching, sometimes you can even use it to your ad-
vantage. While Angle Stretch shows exactly what the name states, Area Stretch is a little more tricky. We’ll check
it out by adding a cube within our current object and unwrap it (make sure that you have only the cube selected
while using Unwrap, we don’t want to mess with sphere UV’s right now). After doing so, Select All UV’s, Pack the
Islands (Ctrl+P) and select Area Stretch.

Look at all the colours, it can’t be good, right? Well, the area option shows you stretch of faces in relation to each
other. What Blender is telling us at this point is that the Islands are out of scale (one is bigger than the other),
let’s hit Ctrl+A to Average Islands Scale and then Pack it again. Average Islands Scale function is quite self ex-
planatory, it fixes the scale of selected Islands according to the size of corresponding polygons of the model. In
the end it let’s you keep the same texture resolution on whole model. Switch back to Angle Stretch and we’ll
look into the UV’s of the sphere.

24
UV mapping | UV unwrapping basics | General pipeline

We’ll start with adding some texture for visual confirmation, with Islands selected add a new UV grid image, 1k
(1024x1024) resolution will do for now. One more thing we are going to do, is joining back the two split Islands.
Hit Ctrl+TAB and pick Edge selection, bottom edges of the T shaped Island and hit V, ENTER. Stitch UV’s option
allows us to connect the previously separated UV Islands. Hide the cubes geometry for now so it won’t get in
our way. If we take a closer look at the texture, we can see that the grid is being distorted. It’s not the perspective
working against us here, what you can see is the stretching in action. This occurs mostly due to the fact that we
didn’t unwrap the sphere yet, if you remember, we unwrapped the cube, subdivided it and left the UV as it
was.

Next step would be checking out how can we fix the unwrap, hover over UV/Image Editor and hit E, that will
work the same as U, Unwrap it in 3D Viewport. It already fixed the problem a little bit, this unwrap would pass
in most cases but let’s go a little further.

25
UV mapping | UV unwrapping basics | General pipeline

What we can do to improve, without completely splitting every single face, is to introduce few cuts minimizing
the stretch. We’ll need to release edges connections occurring next to stretched areas.

At this point it would be easier to do it in UV/Image editor. After selecting the edges hit Ctrl+E, this will do the
same thing as marking the Seams in 3D Viewport.

26
UV mapping | UV unwrapping basics | General pipeline

Notice that the Seams are now marked on the mesh as well. As a final step select the whole Island and hit E to
unwrap it once again.

We could go on and introduce some more Seams up to the point where every angle would be perfect but we
would end up with Island looking like an elephant head and that would be silly and unprofessional.

On the serious note though, very tiny spacing between UV polygons is a tricky thing, and that might cause
some bad looking Seams in the end. As well as inability to align the Island on axis. And finally there’s also the
fact of the Island taking up more space than step before. General rule of thumb would be: be lazy, the fewer
cuts, the better, you want to keep it simple, efficient and “good enough”.

27
UV mapping | UV unwrapping basics | General pipeline

There’s one more thing before we go further with some more theory. For this step Unhide the cube, Select All
Islands, hit Ctrl+A and Ctrl+P to Average Islands Scale and Pack them. As I mentioned before, Pack algorithm
draws a rectangle around the Island and tries to pack those rectangles the best it can. Unfortunately it doesn’t
do a great job. Since it’s important for the Islands to take up as much UV Space as possible, we would need to
pack it manually. Put the Islands close together and scale them up (both of them at the same time) as much as
you can.

That would be it for the basic workflow. Now that I’ve shown you through that exercise, you will be able to get
your head around the vocabulary and the basic tools. With that knowledge we can go into detail on the above
subjects and some more elaborate techniques.

28
UV mapping | UV/Image Editor and 3D Viewport functionality | UV/Image editor

UV/Image Editor and 3D Viewport functionality

We already used some of the options but there’s more to it! Let’s see what other modes and functionalities are
available.

UV/Image editor
•• UV Sculpt (Q) — enters sculpting mode for UV’s. It works like a 2D sculpt with Grab, Pinch and Relax
modes. You can also change basic settings of the brush like Radius, Strength, Curve and such. To be hon-
est I barely use it since I can’t find much difference from it and Proportional Editing. Just letting you know,
it’s there
•• Live Unwrap — similar to Live Unwrap in 3D Viewport, except for… this one doesn’t work in some ver-
sions of Blender
•• Unwrap (E) — unwraps geometry selected in 3D Viewport with Unwrap algorithm. It might speed up
things a little bit, you won’t have to hover over 3D Viewport to unwrap things
•• Pin and Unpin (P) — Locks/Unlocks selected UV vertices to the UV coordinates so if you unwrap them
again, pinned vertices along with islands containing them won’t move. This is however ignored if you
were to Pack Islands
•• Pack Islands (Ctrl+P) — draws a rectangular shape around the selected island and tries to pack them in
the UV space in most efficient way
•• Average Islands Scale (Ctrl+A) — unifies the scale of selected islands
•• Minimise Stretch — algorithm that will try to minimise the stretch on the selected UV’s
•• Stitch (V) — if one geometry is unwrapped into two or more islands, Stitch can stitch their geometry
back together
•• Mark Seams (Ctrl+E) — marks selected edges as Seams so they will be split when next unwrap action
occurs
•• Seams From Islands — will introduce Seams to the mesh according to islands outline. It might be use-
ful if you mess up Seams by accident and want to recreate them with help of UV’s
•• Transform (G/R/S/Shift+Ctrl+Alt+S) — Move/Rotate/Scale/Shear. Transforms UV’s, works as in Object/
Edit modes
•• Mirror (Ctrl+M)— mirrors islands over chosen axis
•• Snap (Shift+S) — snaps cursor and selection
•• Weld (W) — selection of options allowing welding and alignment of UV’s
•• Proportional Editing — works the same as Proportional Editing in mesh Edit mode and in sync with it
•• Show/Hide Faces (H/Alt+H/Shift+H) — hides and unhides selection
•• Keep UV and Edit mode mesh selection in sync — this is actually quite an interesting option. If you
noticed, UV’s are visible only while the mesh corresponding with them is selected. If you unselect mesh,
UV’s disappear. This mode allows you to keep the UV’s visible at all times. Oh, and it also syncs the
selection
•• UV Select Mode (Shift+Tab) — lets you choose between different selection modes (edge, vertex, face
or island). In Mesh Sync mode island selection becomes inactive

3D Viewport
•• Ctrl+E, Mark Seam — marks the edge of the mesh as Seam. Keep in mind that it can be used in every
selection mode (face, vertex, edge) and you have to be smart about using it. For example if you want to
mark 32 edged circle without one edge, you rather select edge loop and deselect one edge than go over
every single edge.
•• U — unwrap the mesh with algorithm of your choice.
•• Mesh Options panel, Options tab, Live Unwrap checkbox — this is quite handy little option. With this
one checked your UV’s will unwrap automatically every time you add a Seam to the mesh (either in 3D
Viewport or UV/Image Editor window). It will however do it in Unwrap algorithm. I find very useful in
situation where it’s difficult to plan the unwrap exactly.
•• Transform panel, Shading shelf — shading mode will be helpful when you want to preview the effect
of unwrapping and texturing. Multitexture with Texture Solid checked will display the texture based on
UV’s and will be helpful in render wise undemanding situations. Like checking your unwrap with UV grid
texture. GLSL can reveal more advanced shading like Specular Intensity, it will however need a source of
light to work properly.
•• Transform panel, Mesh Display shelf while in Edit mode — among others you will find Seams checkbox
that will enable Seams display as red lines on the mesh.

Unwrap algorithms
When we last used the Unwrap shelf, you might noticed that there was a couple of different options there.
Those are the Unwrap algorithms. They are methods that Blender uses to unwrap the object and they work
29
UV mapping | Unwrap algorithms | Lightmap pack

quite differently. They will be your most basic tool in the process so it’s important to get to know them, so you
will be able to pick the best method to unwrap a mesh.
I will however focus on the advanced ones and barely mention the basic. Let’s take on the basic ones first. Don’t
mind me being harsh, I’m sure lots of people would use and are using those. I just can’t see the practical appli-
cation of them, since more accurate effect can be achieved with advanced tools.

Lightmap pack
Splits every face to separate Island.

30
UV mapping | Unwrap algorithms | Cube projection

Cube projection
Splits mesh into six separate Islands, like it would be ripped and projected to cube.

31
UV mapping | Unwrap algorithms | Cylinder projection

Cylinder projection
Projects the UV’s onto cylindrical shape, depends on view or object alignment.

Sphere projection
Almost the same as above, but Uv’s are being projected onto sphere.

Unfortunately those except for Cube Projection are limited in terms of keeping the Island’s correct ratio and
can’t be fixed otherwise than manual correction. Presented screens show the mess those algorithms create.
Now that we got it out of the way, we can focus on the good stuff.
The one basic method I find quite useful in the workflow is Project From View.

32
UV mapping | Unwrap algorithms | Project From View

Project From View


It copies our current 3D Viewport to the UV space. I avoid using the word ‘unwraps’ here, because there’s no
‘wrapping’ or ‘unwrapping’ in this case. However using this method for the whole geometry is a rabbit hole (with
one or two exceptions) it might come in handy in case of unwrapping part of the mesh. Sometimes it helps with
unwrapping n-gons, which tend to distort in some cases when unwrapped.

To fix the above unwrap you can select both n-gons and unwrap them from view, do a regular unwrap on rest
of the mesh and finally stitch the whole thing back to single Island. Don’t try to recreate this example for now,
it presents one more issue that I don’t want to get into right now. As for the n-gons, the unwrap might be easily
fixed by dividing it but in case you want to avoid that, Project From View comes in handy. On the screenshot
below you can see that there are still some issues showing in the UV’s on the bottom part (top was fixed by
breaking the n-gon), it won’t affect the texturing tho.

Now that we are through with the basic methods, you can forget about them. It’s time to move to advanced
ones.

33
UV mapping | Unwrap algorithms | Smart UV Project

Smart UV Project
This method is splitting the Islands, although it takes the angle between faces under consideration. It’s quite
useful if you need to UV unwrap a huge object and you don’t care much about size of the textures nor their size
and you will use external software to texture it. It works best with simple geometrical shapes but in the end it
gets the work done if you don’t want to spend too much time unwrapping. However it’s known to produce
some distortions, mostly in case of larger Islands coming from geometry with different angles. Image below
shows the geometry unwrapped with low angle threshold, the outcome is acceptable, but there are lot of split-
ted Islands.

If we crank up the split angle, distortions appear.

34
UV mapping | Unwrap algorithms | Follow active quads

Still, in cases where we want to produce UV map for large amount of simple geometry, this algorithm can be a
huge time saver.

Follow active quads


This method is very useful if we want to texture the object with a material that can stretch or do a semi-good
unwrap of all kinds of cylindrical shapes. Think of the fabric (mesh will get looser or more dense if we stretch it)
or ribbed tube. The workflow might be tricky if you don’t know how it works. The name states that unwrap pro-
cess ‚follows the active quad’ so we need an unwrapped quad to start with. To achieve a nicely distributed array
of quads we might need to fix things a little. Lets pick one quad and Unwrap it. The shape isn’t regular, so is the
unwrapped face. In UV/Image editor hit Ctrl+Shift+TAB, change to vertex snapping, Ctrl+TAB for vertex selec-
tion and readjust the geometry using axis locking (x,y) to make it square (or don’t if you want an interesting
result).

35
UV mapping | Unwrap algorithms | Follow active quads

In 3D Viewport hit Ctrl+L to select the rest of geometry (leaving the unwrapped quad as active), hit U, Follow
Active Quads. Length Average will be OK for now.

Now we’ll see what happened. Select All Islands in UV/Image Editor and pack them into UV space (Island is
quite large since it scaled to the quad we selected). Both UV/Image Editor and 3D Viewport shows large stretch-
es to the texture, but imagine if it was a fabric that was actually stretched, it’s much easier to stretch the texture
with UV than to make a texture that looks like that on the regular unwrapped mesh.

36
UV mapping | Unwrap algorithms | Follow active quads

My favourite application for it is however everything that has to do with piping and cables. This technique will
give us regular Islands with distortions either very small or just where we want them.

Greebled cylinder unwrapped with Seam and Unwrap (UV above) and Follow Active Quads (below).

Few more important things about this algorithm, it is Seam sensitive so it gives you control over Seams loca-
tion, and it works in three modes:

37
UV mapping | Unwrap algorithms | Follow active quads

•• Length average, we used in examples so far, it takes a measurement of edges length in every loop and
uses the average in unwrap.

•• Length uses the actual length of edges.

•• Even uses active quad as a guideline for the rest, no matter their size and proportions (in most meshes
causing serious distortion).

38
UV mapping | Unwrapping basic shapes | Unwrap

Unwrap
Last, but not least, the one to rule them all, the Unwrap algorithm. This one will be driven mostly by size and
angles of the geometry to return the best approximation of its surface in 2D. When there are too many angled
surface, we need to introduce Seams to avoid stretching, just like in the previous examples where we unwrapped
subdivided cube. This unwrapping technique is most useful when you need to unwrap bent surfaces and want
to avoid texture stretching. It’s also irreplaceable in unwrapping organic models.
Unwrap operates with two different settings:
•• Angle Based, which is best at unwrapping soft, complicated geometry
•• Conformal, that sometimes can better handle simple, geometric shapes.

There’s really a lot of ways you can use Unwrap so I won’t multiply examples in this section, we’ll be learning as
we go.

Unwrapping basic shapes


This is the part in which we will have to start balancing out few things.

39
UV mapping | Unwrapping basic shapes | Cube

•• First of all, we want to keep the object as a single island (or as few as possible). It’s a good practise since
it helps you manage the map of more complex model (by giving you the possibility of selecting whole
islands corresponding to the part of the model). However splitting the object into few islands isn’t a ‘no
go’, you don’t want to do it at all cost, just try to split as little as possible.
•• Second would be keeping as little stretch as you can. Little uniform stretching is OK, but if your test im-
age starts to ‘wave’, you’re in trouble.

There will be more to it, but at this point we’re done with rules.

Cube
We already unwrapped the cube in examples, let’s round it up in one place. For the cube we’ll use Unwrap ex-
clusively, since it gives us cleanest result and maintains the single Island characteristics.

40
UV mapping | Unwrapping basic shapes | Sphere (Subdivided cube)

•• T shape, Seams on all vertical edges, two parallel edges on the base and one perpendicular to them on
the top.

•• Cross shape, Seams on all vertical edges and three edges on the base or top.

Sphere (Subdivided cube)


Almost the same as in case of cube but we need to add some additional cuts to release the stretching.

UV Sphere
Depending on the stretch we can get away with, we could use different approaches.

41
UV mapping | Unwrapping basic shapes | UV Sphere

•• ‘Capped cylinder’ method, what you want to do in this case is you want to unwrap as much of the quad
geometry in the middle of the sphere with Follow Active Quads as you can. ‘As much as you can’ meaning
avoiding non uniform stretching. In case of default, sixteen ring sphere it will be six middle rings, intro-
duce Seams to said loops and a vertical Seam between them. Unwrap one of the quads within the area
and straighten it. In the 3D Viewport, while in face selection mode use Ctrl+L to select linked geometry
(you’ll see it selected the polygons between Seams, due to Limit by Seams option being active by de-
fault), use Follow Active Quads to unwrap the part. Select the whole island in the UV/Image Editor and
pack it.

•• Hit Ctrl+I to invert selection and unwrap, realigning geometry with regular Angle Based Unwrap. Select
all islands, average their scale and pack them. There’s a little stretch occurring on the bottom and top
parts, that can be fixed in UV/Image Editor. Start scaling edge rings, starting from the centre, until they
show nice, deep blue colour.

•• As a final step we could join the islands together to create a single island but this kind of unwrap will be
sufficient (circular islands usually fit nicely in larger maps). If you want to do that, use UV Stitch tool (V)
on the edges you want your island to be connected.
•• There’s also a solution used in projecting maps that’s called interrupted sinusoidal projection. We can
start with hiding the ‘bottom’ half of the sphere, selecting every 4th loop and mark them as seem.
42
UV mapping | Unwrapping basic shapes | UV Sphere

•• Unhide the bottom part and hide the first ring of the top half. Select and mark as seem every 4th edge
loop but shifted by faces in comparison to top half.

•• Unhide everything, mark Seams joining the existing ones on the equator and Unwrap with Angle Based
method.

43
UV mapping | Unwrapping basic shapes | UV Sphere

•• We can also mix the above methods to achieve nicer texture distribution, to do that start with unwrap-
ping the middle part just like in the first method. As for the top and bottom parts, introduce Seams on
every second edge loop and unwrap them with Angle Based method.

•• Go into edge selection mode and select two bottom edges of every triangle, hit V and Stitch them to the
middle part.

44
UV mapping | Unwrapping basic shapes | Cone

Cone
•• Select the edge loop on the circle and single, vertical edge on the cone. Unselect one bottom edge near
the vertical edge and mark them as Seam. Unwrap with Angle Based method. You could mark the whole
circle loop if you want to create two separate islands.

•• If the cone is flat enough, you can try and unwrap it without Seam. Just introduce a cut to the base and
Unwrap the whole thing.

45
UV mapping | Unwrapping basic shapes | Cylinder

Cylinder
•• Select the edge loops along top and bottom caps and one vertical edge, mark them as Seams and Un-
wrap with Angle Based method.

•• If you want to create single island, after selecting edges unselect one near vertical edge on the top and
bottom. Proceed as before.

46
UV mapping | Unwrapping basic shapes | Torus

Torus
•• The easiest way would be approaching the unwrap with Follow Active Quads. It will leave us with some
stretching but we might be able to use them to our advantage. In this case we go with usual workflow,
Unwrap a single face, straighten it, select the rest of geometry and unwrap with Follow Active Quads.

•• For the least distorted unwrap we would need to introduce quite elaborate Seam system. We’ll start with
creating a Seam on every edge ring. To do so, select one edge ring and use Select, Edge Rings from bot-
tom menu of 3D Viewport.

47
UV mapping | Unwrapping basic shapes | Torus

•• Use Alt+Ctrl+Shift+RMB to deselect edges on two middle outside loops. Mark the remaining selection
as Seam.

•• Select the horizontal loop near the Seams ending, use Select, Checker Deselect from 3D Viewport bot-
tom menu and Mark Seams. Do the same thing on bottom loop, making sure that you start selection
from other edge.

48
UV mapping | Unwrapping basic shapes | Icosphere

•• Finally mark two vertical Seams on the middle outside loop as Seams. Hit Unwrap.

Icosphere
No matter the Icosphere resolution, you can distinguish a certain pattern. Add a Subdivision level 3 icosphere
to the scene and enter the Edit mode. If you look at it’s top, you’ll see a certain set of triangles, no matter the
resolution.

49
UV mapping | Unwrapping basic shapes | Icosphere

This geometry flow allows us to Mark five lines through its surface, that can be used as Seams. First, Hide the
south hemisphere, and Mark the edges starting from top set of triangles, going down in the straight line and
changing the flow angle on the second triangle loop from the bottom. Mark the selection as Seam.

50
UV mapping | Unwrapping basic shapes | Icosphere

Unhide the bottom hemisphere, and do the same thing to the remaining geometry (screen shows the sphere
from the low angle).

Go to the side view and Remove Seams from two triangle loops near equator, except from one connection. Hit
U, Unwrap.

51
UV mapping | Unwrapping complex shapes | Icosphere

Unwrapping complex shapes


After I sneaked in a little knowledge we can start playing with some more elaborate examples. For the sake of
presentation I’m going to use part of ‘Perun’ model by Chris Kuhn.

For starters, add a UV grid in the UV/Image Editor and turn on Angle Stretch. Let’s take a look at our model. It’s
pretty much a bunch of cylinders, cones, some cubic shapes and a couple of more complex cubic geometries.
We’ll start with easy ones that is cylinders and cones.
Select all round cylinders and cones and Hide everything except for those (Shift+H). Few of them are just sim-
ple cylinders, some are extruded into different diameters and shapes. We’ll go with the easy ones and Mark one
of their edges as Seam. Notice that the longest one is capped on one side, select edge loop around the circle
and unselect one edge in proximity of the long edge. Also keep in mind, that placing Seams on edges occluded
by other parts of the model will help you hide minor errors in texture. Mark the selection as Seam, hit Ctrl+L and
Unwrap. Notice that while small cylinders are looking more or less OK, the long one shows obvious texture
stretch (it didn’t show on the stretch tool at all but you can see that the Island is off angle).

52
UV mapping | Unwrapping complex shapes | Icosphere

It can sometimes happen in case of very long and thin shapes, that’s why we use UV image for visual confirma-
tion. Luckily there’s an easy way to fix it , select Conformal under unwrap Method (either Transform Panel or F6
right after unwrapping) and unwrap will work nicely.

Since we’re done with those, Hide them. Let’s deal with the main cannon. Differences in diameters of the cylin-
ders, as well as presence of cones, will make the Follow Active Quads method produce too much of distortions
in this case. We will be forced to cut the geometry into few separate Islands. Select four edge loops limiting the
cones and Mark them as Seams.

53
UV mapping | Unwrapping complex shapes | Icosphere

While the ‘back’ cone is flat enough to be unwrapped as it is now, the ‘front’ one has too much of an angle. We’ll
need to cut it horizontally to produce a clean unwrap.

Switch to face selection in 3D Viewport and select both pieces (don’t select the rest of the part just yet). Use
Unwrap and don’t forget to switch back to Angle Based Method or the circular shape will get distorted a little.

54
UV mapping | Unwrapping complex shapes | Icosphere

For part between cones we can easily go with Follow Active Quads. Since the crease in the front is quite small
and partially hidden, even if it gets distorted, it won’t be very visible. Use one of the bigger quads as a matrix for
the unwrap, it’s a regular quad and you won’t need to fix it in UV/Image Editor. After unwrapping, pack it nicely
into UV space to see the UV grid in more appropriate scale. We don’t need to worry about it’s scale in relation
to others just yet.

As for the rest of the piece, use the same Follow Active Quads method to unwrap them. Watch out for the inner
piece, the faces there are not regular quads, so you’ll need to do some fixing in UV/Image Editor before you un-
wrap it.

55
UV mapping | Unwrapping complex shapes | Icosphere

You can now Hide the part. Moving forward to the little pistons on top and bottom of the barrel. If we use Follow
Active Quads, it’ll produce little distortions of the flat pieces.

Since it’s a relatively small part we could get away with that but let’s go ‘by the book’ and fix them. After unwrap-
ping the whole part with Follow Active Quads select the face loops of both circles and use the Unwrap. Notice,
that I didn’t use Seams in this case, since the selection is easy (Seams might make your life easier not only by
marking the Seams but also serve as selection limiting tool) and we are using two different methods to unwrap
the piece, there’s really no justification for using Seams.

56
UV mapping | Unwrapping complex shapes | Icosphere

We still need the second piston done, but let’s make our life easier and just duplicate the unwrapped one, move
it into place of un-unwrapped one (snapping will help you with that),

Hide it and delete the un-unwrapped geometry. This way we reproduced previous workflow without actually
doing it. We’ll cut the corners and just use Follow Active Quads on the bottom two pistons and the top one,
recreate the step above if you want to make it better.

57
UV mapping | Unwrapping complex shapes | Icosphere

We’ll need to cut the last part some more, first Mark the Seams limiting the radiator part and use Follow Active
Quads to Unwrap it, this time we’re not even cutting any corners, since the radius differences are causing almost
no distortions there. Introducing Seams will again serve as more of a selection limit tool here.

Select all the flat circles and Unwrap them.

58
UV mapping | Unwrapping complex shapes | Icosphere

Use either Seam and Unwrap or Follow Active Quads to unwrap remaining cylinders.

Not that we have the cylindrical shapes out of the way let’s move to half cylinders. Starting with one on the top.
You’ll notice that the back wall and the rounded face loop can be easily unwrapped with running Seam along
the edge and skipping one to keep them as one Island. As for the front, angled part, we can do pretty much
same thing but keep two top edges clean of Seam. This way we’ll get a regular Island with almost none distor-
tion. If we wanted to do it in the most clean way possible we would split those parts into separate objects but
again, keeping objects within fewer Islands helps us manage things and makes packing easier later on.

59
UV mapping | Unwrapping complex shapes | Icosphere

Part on the front is pretty much the same.

Do the same thing with part over the barrel, this time you won’t need to worry about the back wall.

60
UV mapping | Unwrapping complex shapes | Icosphere

Hide the unwrapped parts and we’ll move to large oval part in the front. Select the largest quad on the middle
side and Unwrap it. Hit Ctrl+L to select the whole part, unwrap again using Follow Active Quads. We’ll investi-
gate what’s wrong here.

Obviously, oval caps on the front and back didn’t unwrap, select both of them (C for Circle Select works quick in
case of triangulated circles, just click in the middle and you’re done) and use Unwrap.

61
UV mapping | Unwrapping complex shapes | Icosphere

As for the faces in the crease, they show significant distortion, but their placement is barely visible so you might
leave them as they are. Unless you want to be super accurate, than you can unwrap those too.

The front face loop will show quite a lot, let’s unwrap it with Unwrap.

62
UV mapping | Unwrapping complex shapes | Icosphere

Alee there’s left now is the conical shape in the back, since it has quite a big angle, we’ll need to add a Seam to
it, preferably on the bottom edge. Select edge loop and use Unwrap to lay it out.

Just like that the part is done and we can Hide it so it won’t get into our way. The flat rounded panels will go
next. Select the longer one and hit Unwrap. Unfortunately it stretched the Island quite a bit and some weird
angles appeared near the rounded part.

63
UV mapping | Unwrapping complex shapes | Icosphere

We can fix it by adding two Seams where the long side faces are joined with the rounded cap. It still stretches
a little but we can get away with that. If you want to be super correct, Mark every edge on the rounded part as
Seam, this way it’ll Unwrap without any distortion.

Repeat the process with the part on opposite side. For the smaller part in the front, we’ll need to add two addi-
tional Seams in the back.

64
UV mapping | Unwrapping complex shapes | Icosphere

For the next one we are going to use four Seams in every corner plus additional two Seams on the rounded top.
Same goes to the part on the opposite side.

For the base of the barrel we’ll Mark the arch and the edge of the middle of it, than select edge loop around the
inset and two edges in the corner of it.

65
UV mapping | Unwrapping complex shapes | Icosphere

Since we managed to uncover the thickened part of the barrel, select both loops with arches, unselect three
longest edges and select one perpendicular at the end of the arch (next to one remaining long). Mark selection
as Seam and Unwrap.

Select the longest face on the barrel, Unwrap it, Ctrl+L and unwrap as Follow Active Quads. Only the long part
and the inside unwrapped properly so let’s Hide them and take care of the rest.

66
UV mapping | Unwrapping complex shapes | Icosphere

Select the flat edge loops along with a conical one and Unwrap them.

Add Seams at the bottom of remaining face loops, select what’s left and Unwrap.

67
UV mapping | Unwrapping complex shapes | Icosphere

For the main body, we’ll do some planning. Take a closer look at the geometry and try to establish the outer
surface of it. We need to use Seams to cut out everything that might interfere with unwrap. In the front should
look something like that.

Back and bottom.

68
UV mapping | Unwrapping complex shapes | Icosphere

Now we need to exclude the parts that will mess up the unwrap due to their angle. That goes for the large sur-
face in the back, we need to cut it away completely, since there’s almost no way we can keep it within the Island
without causing distortion, even if we did, the final Island would be irregular and might be hard to pack.

Continue cutting out the interfering surfaces in the front and add a Seam on the bottom that will allow the Is-
land to unwrap.

69
UV mapping | Unwrapping complex shapes | Icosphere

We can remove one Seam to join two parts so the Island won’t split.

When that’s done, switch to face selection and use L or Ctrl+L to select the outer shell limited by Seams and
Unwrap it. It should look like that.

70
UV mapping | Unwrapping complex shapes | Icosphere

You can notice some irregularities within the Island, this time we’re going to create best possible unwrap, de-
spite of the fact this one is OK. So what’s causing problems? It must be the crease so let’s get it out of the picture
for now, select the edge loops around the crease and Unwrap the main body again. Everything is nice and
smooth now so the crease was indeed a culprit.

To even it out and be able to stitch Islands back together we need the outer edges of the crease to match outer
edges of geometry it joins with. I f we are going to unwrap it with Follow Active Quads, we need to establish the
proper length of the first quad. You can see that the mesh is a trapezoid so our unwrap must be made a quad
that matches sides with longer edge.

71
UV mapping | Unwrapping complex shapes | Icosphere

After straightening the quad, use Follow Active Quads to unwrap the crease, repeat the process for the second
side.

We’re now ready to stitch the Islands back together, select the remaining main body geometry and Average
Islands Scale. Use Stitch tool to join the pieces together. You will need to do some manual adjusting to straight-
en things up, just move edges around until they stop showing in the stretch preview.

72
UV mapping | Unwrapping complex shapes | Icosphere

This way we can have a straight Island with almost no distortion.

Now that we’re done with that, Hide the unwrapped geometry and we’re going to proceed with the rest of the
part. The inset on the front is quite easy, just use Unwrap, ignore the distortion and get it out of the way.

73
UV mapping | Unwrapping complex shapes | Icosphere

With the top part, marks Seams along the crease edge, we won’t be able to use previous trick in this case since
the crease has some sharp angles to it. Add more Seams so the crease is joined just with the middle face. We
also need two Seams to unwrap the large part properly.

Back section will be easy, just use Unwrap.

74
UV mapping | Unwrapping complex shapes | Icosphere

With the inset just add two Seams in the sharp corners and use Unwrap.

Use following Seams to Unwrap the bottom part.

75
UV mapping | Unwrapping complex shapes | Icosphere

The back round shape will unfortunately need three Islands to create a semi decent unwrap. Create Seams
outside the flat ring and single cuts on the cones.

With the panels on the side we’ll need edge loop Seams in every corner.

76
UV mapping | Unwrapping complex shapes | Icosphere

Similar method applies to the smaller panel, this time we’ll need to cut it a little different, so the Islands won’t
overlap. We could separate the ring of faces on the side or a single face, but the part is small enough to ignore
close proximity between Islands and act in favour of having single Island unwrap.

To take care of another one we need to cut out the panel sitting inside our panel.

77
UV mapping | Unwrapping complex shapes | Icosphere

After doing so, select the corner loops as well and Mark all of them as Seams.

For the next panel we need those marked as Seam.

78
UV mapping | Unwrapping complex shapes | Icosphere

And the simple Unwrap will take care of the rest. Or will it, nope there’s some nasty distortion in the cutout
area.

We’ll need to trick it into working. First Mark the selected edges as Seams, then Remove two Seams from longest
edges.

79
UV mapping | Unwrapping complex shapes | Icosphere

This way those little parts that overlap no matter what you try, will stay connected to some Island. For some
reason the faces got distorted in the process, you’ll have to manually adjust vertices to remove the distortion.
Try to use both Stretch view and test texture to get the best result.

Now we have to take care of that bottom cylinder with array of insets running under angle. Honestly it’s one of
the most annoying things to unwrap here. We can either run a Seam on every single sharp angle and end up
with loads of Islands that are hard to fit or just ignore some distortions. So option one would be this.

80
UV mapping | Unwrapping complex shapes | Icosphere

And since I hate it so much I’m going to suggest option two. Distorted but still better than crapload of Islands.

We’ll get rid of the easy stuff first, Mark the outer edges and Unwrap them.

81
UV mapping | Unwrapping complex shapes | Icosphere

The top part will be a little trickier, but it gets obvious if you think of it as a cube. Remember how we unwrapped
a cube? Four vertical edges, two parallel on the bottom and one perpendicular to them on the top, if you ignore
global dimensions and just use whatever you choose, you’ll all set. It should look something like this.

Unfortunately after unwrapping you’ll notice that the lovely n-gon went AWOL and looks nothing like the ge-
ometry would imply.

82
UV mapping | Unwrapping complex shapes | Icosphere

The easy way of fixing it would be adding the additional edges, like in the opposite one already has. After doing
so, the problem disappears. If you’re ambitious and handy with Blender, you can try and solve this problem us-
ing Project From View and Stitch techniques, it will however require some deeper knowledge of 3D Viewport
navigation.

If you are, for some reason, bound to use the n-gon, you can also Dissolve the edges after the unwrap. Moving
to the easier girder, the easiest approach will be running a Seam through all the sharp, outside edges. This will
leave us with three Islands, the middle part will be unwrapped nice and clean, other two parts will show some
distortions due to the creasing on them.

83
UV mapping | Unwrapping complex shapes | Icosphere

I’m going to show you a handy approach in dealing with problems like that. Since we generally want to keep the
unwrap within lowest possible amount of Islands and avoid stretching, we’ll have to join UV’s together be-
tween current Islands so they won’t overlap as shown on the screen below.

In order to do that we need to introduce Seams according to following screen.

84
UV mapping | Unwrapping complex shapes | Icosphere

Now the face are not overlapping, however they are quite close together. If we were to texture this model with
relatively higher resolution texture, the minimal size of the gap should not cause any problems. If any errors
appear, they will be also hidden in the crease and the size of the potentially troublesome area will also work in
our favour. All and all, I rather solve it like that than have some tiny pieces of geometry roaming around my UV
space. As a final step we’re going to remove the Seams from four edges, as a result we’ll get the whole part as
a single Island.

Now that we’re done with that, Hide the part and proceed to second girder. It’s little similar to previous one, we
can start by separating ‘sides’ with creases on them. Remember to place the Seams around the cutout too.

85
UV mapping | Unwrapping complex shapes | Icosphere

We’ll need to properly unwrap inside walls of those cutout, single Seam would suffice. Try to place it in the
sharpest corner where it will be least visible.

Only distortions left now are those caused by the insets on the sides. Unfortunately due to the cyclic geometry
we won’t be able to ‘release’ the stretching by introducing seems like we did with the previous part. Again, we
could probably get away with what we have now, due to the size and location of the part, but let’s do it the hard
way. Live Unwrap along with Sync Mode will come in handy here so enable them. We’ll add the Seams around
the bottom of the creases as well as every inside edge perpendicular to them. Technically we don’t need every
edge, just the ones on sharp corners, but it will be much easier to select them with Alt+Ctrl+RMB.

86
UV mapping | Unwrapping complex shapes | Icosphere

Things start to look better stretch wise, but we have a ton of overlapping faces in the UV. To fix that we need to
cut every other one and join it with different Island, where it won’t collide. With Live Unwrap and Sync we can
do the whole thing in the UV/Image Editor and see exactly what we need to see. Now remove the intersections
using Ctrl+E (Mark Seam) and V (Stitch) to other Islands so that they don’t overlap.

Repeat and rinse for every issue, you should end up with something looking more or less like this.

87
UV mapping | Manual packing UV islands | Icosphere

Let’s see if we can limit the number of Islands here.

It won’t be much but still it’s a little better. This way we have all parts of the mesh unwrapped, you can Unhide
everything and take a close look at the mess going on in the UV/Image Editor. Don’t worry too much about it,
for now just hit Ctrl+A to apply uniform scale to all the parts, and pack them with Ctrl+P.

Everything looks nice and tidy now, but we are still one step away from being done with the UV’s.
We’ll end this part right here and tackle quite a new subject in the next section.

Manual packing UV islands


Packing UV Islands refers to manually moving them around and scaling them up so they take as much of UV
space as possible. Since packing the UV Islands works so nice with automation why would we even bother with
that tedious and time consuming process? The explanation is quite straightforward, the tighter fit of the UV’s
means better usage of texture resolution. In cases of limited computation space like in games or very large
scenes, the amount and resolution of textures make a huge difference. Below you can compare how does the
same texture (resolution wise) look with automatically and manually packed UV’s. Just by eye-balling it you can
tell that we could get almost two times better use of texture by doing it.
88
UV mapping | Manual packing UV islands | Icosphere

The above is still true for the time I’m writing this, current version is Blender 2.77. This however
might change, there are proposals, for improved packing, presented to Blenders dev team. So, fin-
gers crossed, we might not have the pleasure of manual packing in the future.

Unfortunately I won’t be able to give you some ‘golden rule’ on how to do that, it really depends on one’s expe-
rience and patience. I will however be able to tell you some tips and tricks along with very basic workflow (since
there’s no advanced one). We’ll use the previously unwrapped canon for the sake of presentation. For better
visibility remove whatever image you have in the background of your UV space, leaving Stretch view on also
helps. I usually start by filling the empty spots within the larger Islands with smaller ones, just remember to
leave little spaces between each Island, the larger texture you plan to use, the smaller the gap can be.

89
UV mapping | Manual packing UV islands | Icosphere

If you stumble upon parts that you cut out and they fit too tight in it’s previous place, you can scale the Island
a little. Be careful with that tho, it can make your work a lot harder if you plan on texturing decals like lines run-
ning through both scales and unscaled polygons. If you’re not sure what the implications are, better don’t do
it.

Start hoarding the larger blocks in bottom left corner of the UV Space and building around them constantly
trying to maintain square shape of it. I’ll keep on making little adjustments, moving and rotating the Islands to
find the best fit.

90
UV mapping | Manual packing UV islands | Icosphere

Somewhere at this point you want to bring your cursor to 0, 0 coordinates and scale every Island away from the
cursor, so the main block you created fits the largest possible UV area. Don’t worry if loose parts go over the
space, just keep in mind that you’ll have to fit them back to it.

Finally fit the loose parts in and just like that you’re done!

This is how fairly well packed UV’s look like, sometimes it’s hard to get such a small model. The more Islands you
have to pack, the easier it gets.
After going through all above chapters you should be able to handle most of the work concerning unwrapping
and packing the UV’s. From this point we’ll proceed with baking, texturing and setting up some simple shaders.
Since we worked with the canon model and it’s a nice example in terms of being nor too simple nor too compli-
cated, we’ll continue working with it.

91
Texturing | How will we texture a model | Image sizes (resolution)

Texturing

How will we texture a model


The approach we’ll undertake will be quite versatile and give you a starting point that can be adapted. Meaning
that we’ll rasterize all the maps.
In my experience, it’s best to establish and test the target environment you will be creating the final product for,
before you start work. It might be game engine, rendering engine, other 3D software and pretty much each and
every one of those will work a bit different in terms of using textures. I won’t mention the native format, Blender
in our case, just because whatever works for you is the way to go.
As far as other parties go, there are barely any rules. They will determine what kind of maps will be used, you
might be required to provide separate files for each map, some maps can be joined with other as Alpha or trans-
parency, so on so forth. Whatever it will be, you need to establish what will you be working with.

Image file types and their characteristics


We’ll go over most commonly used image files formats so you can get the idea what are you working with. As I
mentioned above you might be required to provide files in certain format or you need to figure out what to use
to meet the specifications.

Image sizes (resolution)


Most likely you will be required to use certain image resolution for your texturing work. In case of game engines,
designers are trying to limit file sizes for better hardware efficiency (and the fact you have limited space in the
VRAM), it might also be unnecessary to produce huge texture when it won’t be possible to see the models that
close. In most cases textures sizes are varying between 512x512 and 2048x2048 with 1024x1024 being most
popular in my experience. Larger textures can be found in animations or still images (as opposed to previous
ones, rendered in real time), they can go as high as 8k (8192x8192) or 16k (16384x 16384) for CG in blockbuster
productions. In practise, for down to earth artists, working with resolutions higher than 4k (4096x4096) will be
troublesome due to hardware and software limitations. It might get choppy to edit, RAM and V RAM amount
might be a concern too.
You might have noticed that I used only square textures as examples, that is because square textures that are
sized with squares of 2 are easier to render. Textures that are not of a square shape are sometimes used, mostly
as atlas textures, that is textures shared by more than one object.

92
Texturing | Image file types and their characteristics | Image file attributes

Image file attributes


•• Colour Depth — also referred to as Bit Depth, tells us how many bits are being used to indicate colour
of a single pixel. For example 8bit image it’s 28=256 colours, B&W image uses 21=2 colours (black and
white) and so on. While some file formats can handle 8bit information (256 colours for each Red, Green
and Blue channels) other can go as high as 16 or 32bits (float). What it means in practise, is that more
colours mean better quality of the image (not to be confused with resolution, this quality concerns the
ability to include and display more colours). That can help, for example, better handling of transitions in
the image, preventing issues like banding.

•• Alpha channel/Transparency — are pretty much the same thing, they use Alpha channel to store infor-
mation (in form of grayscale mask) on the areas of the image that are transparent (they have no back-
ground at all).

Grey grid represents transparent parts of the image, black and white mask shows the visible parts of the
selected layer.
•• Layers — allow storing multiple information like different images, masks and colour mixing within one
file non destructive way. It’s almost obligatory for the source files and sometimes it can be used as the
final output.

93
Texturing | Image file types and their characteristics | Image file standards

The above image is composited from three different pictures placed on three layers (shaded cube, out-
line and coloured shape). This allows for easy modification, removal, hiding and many more actions to be
performed on chosen layer.
•• Lossless/Lossy compression — some file formats can “pack” the information with certain algorithms,
sort of like zip file (or exactly like it in some cases). The difference between them is that in case of lossy
compression, some of the colour information are being lost in the process and cannot be recovered.
Lossless compression allows to decrease file size too, but in the way that information can be fully
recovered.
•• Multi-part image files — can contain a number of separate images in one file. Access to required image
is independent of the others unlike in case of layered file.

Image file standards


•• BMP — can store up to 32bit RGBA in both lossless and lossy compression.
•• JPEG (Joint Photographic Experts Group) — is most commonly used throughout the web, JPEG for-
mat has the advantage of reducing the file size by reducing its quality. It can however optionally save in
lossless mode. Huge downside of the format is that it only works with RGB channels, it cannot save Alpha
Channel.
•• TIFF (Tagged Image File Format) — is one of the “richest” formats in terms of information that it can
carry while preserving open standard. It can maintain layers in the file structure, supports Alpha Channel
and offers both lossless and lossy compression.
•• PNG (Portable Network Graphics) — was introduced in the 1990’s as a open source alternative to GIF
standard. It offers lossless compression along with Alpha Channel support.
•• Targa and Targa (Truevision Advanced Raster Graphics Adapter) — was written as a format for IBM
graphic cards that supports truecolor. It can storage RGB data in wide range of Bit Depth with additional
8bit Alpha Channel.
•• DDS (DirectDraw Surface) — is a container file format written by Microsoft, it uses S3TC compression
algorithm that can be decompressed by GPU hardware. It supports wide range of Bit Rate for RGB and up
to 32bit Alpha Channel.
•• OpenEXR — is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for
use in computer imaging applications. It can store 16 and 32bit RGBA, both lossless and lossy compres-
sion and multi-part files.

94
Texturing | Baking in theory | General pipeline

8bit 16bit 15bit 24bit 32 bit Alpha Layers Lossless Lossy Multi-part
BMP
JPG
TIFF
PNG
TGA
DDS
EXR

Baking in theory
The term baking refers to creating image file from rendered effect. This short definition technically tackles the
subject but it’s very vague. I’ll elaborate on it, since it’s crucial for texturing process. Basically most of the effects
rendered by the engine of our 3D software can be saved as an image file. If we add couple of different coloured
materials to our object along with some procedural texturing, they will be there, but as materials that can only
be rendered in Blender. The most we could do with that is to them as solid colours, that is if relation between
exporter and importer allows that. In most cases the only thing that is readable to the importer will be just ma-
terial name assigned to certain polygons of the model. In order to make our textured model readable to exter-
nal engines we need to transfer some information to image file that will map the effects to UV’s of the model.

General pipeline
•• Unwrap the model and assign materials
•• Create necessary effects that you want to bake (sculpt, procedural and image textures, diffuse or specu-
lar influences, intensities etc.)
•• With all UV’s selected add New Image in UV/Image Editor
•• Hit Bake

Baking Specular and Colour maps by example

95
Texturing | Baking Specular and Colour maps by example | General pipeline

I unwrapped the UV’s of the cube and assigned different colour materials to each face. For the white material I
added Specular Intensity, driven by generated cloud texture.

Notice, that I had to show you the screenshot with 3D Viewport in render mode, since only this way I can make
the generated specularity work. At this point diffuse colours exist in material slots and in case of .obj file, can be
exported since they are simple RBG values supported by the file format. If I was to export it, I will end up two
files, .obj and .mtl (material). .obj format will handle mesh data, such as geometry, assigned materials etc. while
mtl will take care of some material settings like colour, assigned texture maps. However our generated cloud
Specular Intensity won’t be exported, since it’s not supported by the .mtl file. Unfortunately this applies to all
popular exchange file formats. What we can do in this case, is we can bake our procedural texture as texture
map.
We need to create the image we want to bake to. To do so (I already did that) go into Edit mode and with UV’s
selected add a new image in UV/Image Editor. Then we are going to jump to the Render tab and go down to
Bake shelf.

96
Texturing | Baking Specular and Colour maps by example | General pipeline

Our cloud texture is assigned to the Specular Intensity slot so that’s what we need to bake. Select Specular In-
tensity from the drop-down menu and hit Bake.

This way we can externally save baked map and no longer be limited to using it in Blender alone. Save your map
with F3 and we are going to bake the material colours as well. Select the Textures from Bake drop-down menu
and hit Bake again. Save the map as a different file and we’ll link them back to our model. Let’s delete all the
materials except for the white one, we won’t need them anymore.

97
Texturing | Baking Specular and Colour maps by example | General pipeline

Now jump to Textures tab, change Texture Type to Image or Movie and open the previously baked specular
map. Since the rest of the setting are going to be the same as in case of generated texture, we won’t need to
change them.

You will already notice, that we no longer need to use the render preview to see the Specular Intensity working,
it’s now displayed in GLSL mode as well. As a next step add a new texture and link the colours bake to it.

98
Texturing | Baking Specular and Colour maps by example | General pipeline

Our material and shaders now reference external files and along with model will be readable by external appli-
cations. I want to show you one more thing. Let’s swap one of the solid colours with something fancy! There are
couple of ways we can do that, but for now editing it with GIMP would be easiest solution. Open GIMP and pull
our colour map into it.

Now, let’s import some grunge texture like this one.

99
Texturing | Baking Specular and Colour maps by example | General pipeline

And place it in GIMP. You might want to scale it down so it fits nicely with the colour texture range.

I want only the teal’ish face to be textured so let’s mask the grunge layer by selecting its colour range with fuzzy
select tool from the colour map and applying mask by selection to the texture. You should end up with some-
thing like this.

100
Texturing | Baking Specular and Colour maps by example | General pipeline

I know this is already looking spectacular, but we’ll take it one step further. Pull the specular map into gimp,
duplicate the texture layer and move it over the specular.

Than desaturate the texture over the specular, lightness mode will do.

101
Texturing | Baking Specular and Colour maps by example | General pipeline

The specular maps works in quite obvious way. The grayscale is a representation on specular shader influence
over the mesh with black marking no influence and white marking full specularity. The texture is a photo of a
painted metal with dots of rust popping through the paint. Is rust specular? Close to nothing, meaning that we
need to make the rust dots black or close to black. And the paint? Well, it might be something in the dark grey
tone.

That would imply out desaturated texture is almost done, we just need to mess with the levels a little bit.

102
Texturing | Baking Specular and Colour maps by example | General pipeline

Now we can save our composite file as GIMP native format and by switching off the layers visibility save both
specular and diffuse maps. They will look like this.

Finally we can refresh link to the files in both texture slots and enjoy the final result.

The Specular shader on the textured wall is working quite subtle, you might need to move a light source around
it to fully appreciate the effect.
Finally, baking can be executed in three modes, self baking, selected to active and multiresolution bake. We’ll
use self baking for every effect that is defined within the model by its materials, textures or modifiers. Selected
to active will be necessary if we want to bake information from one model to the other. Multiresolution bake is
used for baking information from multiresolution modifier, it’s used mostly for normal baking.

103
Texturing | Texturing with baked maps and GIMP | Baking parameters

Baking parameters
•• Bake from Multires — baking information from Multiresolution modifier. Used to Bake normal maps
•• Normalized — for Ambient Occlusion it’s ignoring material settings (like colour), for Displace Modifier it
normalizes the grayscale of the distance
•• Bake to vertex colours — vertex colours being alternative method to display colour information on the
mesh. It will usually need quite dense geometry to achieve nice results
•• Clear — resets target bake image to its default
•• Margin — adds a bleed to the island equal to the value in pixels. It can fix the issue of texture bleeding
as well as allow downsizing textures (for example in mipmapping) without having to worry about it. It is
also used to fix issues in with texture filtering, that is if no anti aliasing is used by the engine.
•• Split — different methods of splitting polygons into triangles that is being forced by the rendering en-
gine while baking.
•• Selected to Active — switch to the above mode to bake from one object to another. It is used for nor-
mals baking mostly, but comes in handy in some more creative cases
•• Distance — defines how far can object be from each other for the bake to work (you can clip it if you
don’t want some parts to be baked)
•• Bias — it works like a ramp of influence for the Distance

What else can we bake?


•• Specular Colours — bakes colour of Specular reflections
•• Specular Intensity — bakes Specular Intensity map
•• Mirror Colours — bakes mirrored colours
•• Mirror Intensity — bakes the intensity of mirroring
•• Alpha — bakes transparency
•• Emission — bakes emission to B&W map
•• Vertex Colours — bakes colours of vertices
•• Derivative — alternative to Normal map
•• Displacement — bakes Displacement to grayscale map
•• Textures — bakes material colours and Diffuse texture maps
•• Normals — bakes Normal maps
•• Shadow — bakes shadows
•• Ambient Occlusion — bakes Ambient Occlusion

Texturing with baked maps and GIMP


Now that you know everything about texturing, lets finish the canon we unwrapped. Things will look much
nicer, if we use more than one material and texture on it. Just like we did with previous example, in order to
make things easier, we’ll use different material colours to differentiate them. I ended up with this.

104
Texturing | Texturing with baked maps and GIMP | What else can we bake?

In the next step we’ll bake some maps that will help us with texturing in GIMP. Go into Edit mode and with all
Uv’s selected add New image to the UV space. This time we’ll use 2048x2048 blank texture, it’ll provide us with
more than enough resolution for this model.

Jump into Bake shelf and select Textures from drop-down menu. This will bake currently selected material col-
ours. We’ll use one more setting right away, that is Margin. If we’re creating model for the game that will use
mipmapping and filtering, we’ll need to include Edge padding. This is done to ensure, that our Seams won’t be
visible while rendering. The safe size of this border should be as wide as:

105
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Texture size (px) Padding (px)


128 2
256 2
512 4
1024 8
2048 16
4096 32
With the modern age engines, using anti-aliasing, we don’t need to go as far as that. Values for the 512 textures
and larger can be cut in half. And so we’ll use 8 pixel Margin for our texture. If you notice that some of the baked
colours overlap significantly now would be the time to fix that. Simply move them around hitting bake every
time you want to confirm the distance.

Save the file when you’re happy with the result. Next bake will be Ambient Occlusion. Keep in mind, that if you
don’t check Normalized box, you’ll end up with this.

106
Texturing | Texturing with baked maps and GIMP | What else can we bake?

It looks nice, but it’s not at all useful for us in this case. What we need is this.

Now we have nice grayscale image however it is quite grainy. That is because Ambient Occlusion bake is sensi-
tive to the rendering engine settings. We will go into World tab and enable Ambient Occlusion box, and change
some settings under Gather shelf. First of all we need to up the Samples to something decent, 16 should do the
job. I also want the shadows to be tighter, to achieve that I’ll change Attenuation to 1. Lets bake with the new
Ambient Occlusion settings, 0 Margin and save the image.

107
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Now that we’re done with baking for now, jump into GIMP and create new 2048x2048 image. We need to create
some grunge map for the metal base of the surface. We’ll start by generating clouds on solid white layer. Use X
and Y size at 16, check Tillable and generate the render.

We’ll add another layer beneath it and fill it middle grey (HSV 0, 0, 80), it won’t matter that much for now, we just
need to have some RGB values so we can use different colour mixing types on the layers. Once you’re done with
that, change the clouds layer Opacity to about 25.

108
Texturing | Texturing with baked maps and GIMP | What else can we bake?

For now we lack fine detail, we’ll create another cloud layer with detail of 3 and rest at the same settings. This
time tho, we’ll run it through Filters, Map, Small tiles at 4 segments. When done, change layers blend mode to
Overlay and turn down Opacity to 25.

We’ll proceed adding fine detail using couple of white brush strokes on the transparent background.

109
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Now Tile it 4 times, switch to Overlay mode and turn down Opacity to 60.

The large clouds detail seems too strong, let’s turn the Opacity down to 15.

You might be asking yourself why won’t I use photo instead of going through all the trouble (it would most
likely give a better effect too). It is for two reasons, one is that I want to show you that most of those things can
be done procedurally and two is that photo textures might sometimes cause trouble. In case of larger objects
you rarely have the large enough photo to get a real time scale and if you tile it, tiling might become very obvi-
ous. Don’t worry tho, we’ll use those later on.

110
Texturing | Texturing with baked maps and GIMP | What else can we bake?

With this part done, we can create new file in GIMP and import previously created texture and bakes. We can
composite Ambient Occlusion bake to our base metal texture. To do that we’ll simply switch its Colour Mixing
mode to Multiply.

Since we texture a metal object, surely some rusting will appear, as well as general dirt. Ambient Occlusion, also
called ‘dirt render’ is a good base to establish where dirt and rust will appear, let’s use it to make our job easier.
First of all we’ll need a layer that resembles rust. We’ll add a new layer and fill it with Slate Pattern. The shading
on it works well, but we need to give it a proper colour. Use Colourize from Colours tab and use HSL settings 13,
40, 4.

111
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Since we want it to work within the influence of Ambient Occlusion bake, we need to extract a mask based on
it. We’ll add a mask based on grayscale to Ambient Occlusion layer.

Now, we’re going to add the Mask to Selection.

112
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Add a mask based on the selection to the rust layer.

Invert the colours of the mask.

113
Texturing | Texturing with baked maps and GIMP | What else can we bake?

And finally you can disable or remove the mask from Ambient Occlusion layer.

At this point we can export the image and check how things look in Blender.

Once you exported the image from GIMP and pulled it to Blender you can quite quickly refresh both by hitting
Ctrl+E in GIMP and Alt+R in Blender UV/Image Editor.

114
Texturing | Texturing with baked maps and GIMP | What else can we bake?

I’m happy with how the colours work so far. We can move to adding some different materials to the texture. I’ll
start by enabling visibility of baked colour layer and adding layer group under the Rust layer and moving the
base metal layer into it. I’ll also rename the layer to something more descriptive.

First we’ll take care of the parts marked with green colour. I want to use the base metal as a basic texture and
modify its colour. We’ll duplicate the layer first and rename it, then use Colourize to adjust the colour.

115
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Next thing we need to do is to map it limit its influence to areas previously marked with materials. With colour
layer active use Select by Colour tool to select green parts.

When done, add a mask based on the selection to green colour layer.

116
Texturing | Texturing with baked maps and GIMP | What else can we bake?

We’ll do the same to the parts marked as dark grey but using Brightness and Contrast values to change the col-
our.

For the parts colour coded as blue I want to use clean metal.

117
Texturing | Texturing with baked maps and GIMP | What else can we bake?

I also want the clean metal not to be affected by rust. To do this we’ll select the parts with light metal on them,
go into rust mask and fill the selection with solid black colour (we can use Ctrl+, to do so if we choose black as
foreground in Colour Picker).

At this point our model will look something like this.

118
Texturing | Texturing with baked maps and GIMP | What else can we bake?

The colours are about right, but still things are not very impressive. We’ll go on and proceed with adding further
detail. Metals and painted metals tend to wear on the edges, let’s quickly generate effect like that. Duplicate
(SHIFT+D) your model to layer 2, go into Vertex Paint mode and uncheck Texture solid in Shading shelf.

We’ll simple Subdivide the mesh 2 or 3 times (things might get slow from now but vertex colouring needs some
mesh resolution to work).

119
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Apply the Subdivision modifier, choose Dirty Vertex Colour from Paint menu and hit F6. Using trial and error I
managed to set the colours just so they resemble edge wears.

Finally we are going to Bake the vertex colours and save the baked file.

120
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Pull the baked image to GIMP and place it over rust layer.

I want to use it as a mask for the metal texture to stick out. What I need to do know is to ensure, that all the areas
that will be covered in paint, will be solid black. This way the mask will influence only the light parts. I’ll use the
Colour Levels black picker on the ‘darkest’ part of the bake.

121
Texturing | Texturing with baked maps and GIMP | What else can we bake?

We could stop there, but I don’t want the wear lines to be continuous. I’ll first disable Ambient Occlusion layer
for better visibility, than we’ll new layer, fill it with Clouds (16x16, Tillable, Detail set to 5), Small Tile it 8 times,
Blur (10x10px) and set it in Dodge mixing mode over the edges layer.

Make a final Curves adjustment to the clouds layer.

122
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Merge the visible layers to join the two images (remember to toggle the visibility of everything else). Now we
can duplicate the light metal layer, place it above the rust and use previously presented method to mask it with
the edges layer. In the end you should end up with something like this.

This looks OK on the model, we’ll go in and tune the effect with Texture Paint later on, but for now it makes a
good base. If you want the effect to be more distinctive, you can adjust the layer Brightness.

123
Texturing | Texturing with baked maps and GIMP | What else can we bake?

I also want to add some hand painted fine detail in Blender. In order to do this we’ll have to change our Blender
scene setup. First of all we won’t be using Texture Solid for this so we need to adjust our lighting and materials.
We’ll use at least two Hemi lights in GLSL Textured mode. Position the lights so the model will be fully light from
above.

If you still have multiple material slots in your model, delete every one of them and create a new one. Than in
Textures tab add a new image texture and use the composited image we’re working on.

124
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Then we are going to create a new 2048x2048 texture with settings shown below. Remember to turn Alpha
down to 0 in colour picker.

We’ll use a newly created image as an additional Diffuse (mapped to colour) texture.

125
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Once you’re done with it, go to texture paint mode. If you’re using older Blender release, you might need to as-
sign the alpha texture to the model I Edit mode. Otherwise, select the alpha filled image in Slots tab.

We are ready to paint the edges. If you have a graphical tablet, now would be the time to use it, it helps a little
but the process can be done with a mouse too. I won’t be able to give you exact guideline for painting this ef-
fect, just use common sense and experiment with the settings. Since we’ll use this image as a mask, you don’t
need to worry about texturing the strokes. It might however improve the effect, so it’s up to you whether you
use one or not. What I usually go with is a solid white colour with a standard curvature and brush Strength of
0.7, I also use pressure sensitivity with my tablet. Jitter might also help with achieving more realistic effect.

126
Texturing | Texturing with baked maps and GIMP | What else can we bake?

I went with painting edges on sections covered with colour and I left the bare metal parts alone. At this point
we can save the image and bring it into GIMP. We’ll create the mask based on the grayscale and apply it on the
lighten metal image that we used for the procedural scratches.

The final effect will become more subtle and blend nicely with the procedural scratches.

127
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Let’s create a new folder in GIMP and move the rust and scratches layers into it.

As a next step I want to make the painted metal parts even more damaged. I’ll create a new layer and fill it quite
randomly with Sponge brush. Than I’ll make it seamless using Filters, Maps, Make Seamless.

128
Texturing | Texturing with baked maps and GIMP | What else can we bake?

I’ll also tile it four times with Filters, Map, Small Tiles using 3 segments.

Right now the effect would be very strong, we’ll modify it using Curves.

129
Texturing | Texturing with baked maps and GIMP | What else can we bake?

By creating grayscale based mask and using it on once again copied light metal base, we can place it on top of
painted elements.

All that’s left to do is to Invert the mask colours to make it affect the right area.

130
Texturing | Texturing with baked maps and GIMP | What else can we bake?

This is what we end up with. I can now see that the scratched paint effect is too strong, I’m going to select the
layers mask and use Curves to adjust it.

Right now I’m fairly happy with my diffuse map.

131
Texturing | Texturing with baked maps and GIMP | What else can we bake?

To make the model really shine (literally), we need to composite the Specular map. In some cases you can get
away with just desaturating the Diffuse map and tinkering with levels and curves but we’ll take on some more
conscious approach. Let’s move groups of our layers to a new folder in the correct order. We’ll then duplicate it
and give it a proper name.

In the next step we’ll Desaturate the rust and green paint layers (rest are grayscale so no need to desaturate
them)and remove the Ambient Occlusion layer.

132
Texturing | Texturing with baked maps and GIMP | What else can we bake?

In the previous exercise I explained that Specular map will make the white parts shine the most and the black
parts — not at all. In our model the most shiny parts will be clean metal and scratches. We don’t want to lose the
slight colour variation from the texture so we’ll use Curves to lighten or darken parts. The painted parts are go-
ing to have more or less the same specularity since, you know, it’s still a paint. Let’s fill them with same solid dark
grey colour.

133
Texturing | Texturing with baked maps and GIMP | What else can we bake?

For the light metal parts, we’re going to create curve preset and apply it on each layer containing the light metal
as a base.

134
Texturing | Texturing with baked maps and GIMP | What else can we bake?

We also need to take care of the rust layer with Brightness and Contrast sliders.

Things are still too bright and too smooth for the rust to look good. I’m going to use Mask to Selection and mod-
ify it with Curves.

135
Texturing | Texturing with baked maps and GIMP | What else can we bake?

And use Hurl noise filter to give it a little grain.

I’ll finally need to bring the base metal layer down with Curves a bit.

136
Texturing | Texturing with baked maps and GIMP | What else can we bake?

Let’s check out how things are looking in Blender. We’ll use the texture slot previously occupied by edge mask
and change some settings or create a new one. Pull the file into Blender, enable the texture slot if it’s disabled,
uncheck the Diffuse Colour Influence, check Specular Intensity and RGB to Intensity. Let’s use the single point
light to inspect the model.

137
Texturing | Texturing with baked maps and GIMP | What else can we bake?

This particular setup will also allow us to cheaply achieve bumping effect. We’ll duplicate the Specular group
and rename it. For the record, Bump map will artificially add detail to the surface of the model by modifying the
way the lighting works. It’s quite similar to the Normal map but it doesn’t contain the information about the
direction of deformations. It’s simply light areas that are being seen as higher and dark ones as lower (this can
of course be inverted). We’ll take a look at the file and see what we can harvest from it. First of all we’ll fill some
of the maps with solid middle grey and black colours. We’ll also have to disable the procedural scratches.

The rust is acting really strong here, we’re going to modify mask it with Curves and fill the layer with grey colour
(slightly darker than the middle grey).

138
Texturing | Texturing with baked maps and GIMP | What else can we bake?

We’ll create a new texture slot, use the saved file and map it to Normal with value of 0.05. This is what the out-
come will look.

139
Texturing | Texturing with baked maps and GIMP | What else can we bake?

We can also use Bump map to bake Normal map if necessary.

With this we’ll wrap up the part of the book covering theory as well as a little practise. In the next part we’ll cre-
ate a larger project from the scratch.

140
Texturing full project | Texturing with baked maps and GIMP | What else can we bake?

Texturing full project

141

You might also like