# Blender 3D: Noob to Pro/UV Map Basics

|previous=Image Editor
|previousText=The UV/Image Editor
}}
```
UV mapping is a technique used to \"wrap\" a 2D image texture onto a 3D
mesh. \"U\" and \"V\" are the names of the axes of a plane, since \"X\",
\"Y\" and \"Z\" are used for the coordinates in the 3D space. For
example: increasing your \"V\" on a sphere might move you along a
longitude line (north or south), while increasing your \"U\" might move
you along a line of latitude (east or west).

Another explanation can be gleaned from the Blender manual. Imagine a
paper 3D model of an object, e.g. a sphere, that is to be laid flat on a
table. Each of the 3D coordinates of the sphere can be mapped to the 2D
coordinate on the flat piece of paper. Blender provides another view of
the vertices (coordinates) in the UV/Image Editor. You can select and
edit these 2D vertices just like in the 3D Editor window. The purpose of
this unwrapping of the coordinates is just to map these coordinates to
images/pictures so that the 3D image can have a realistic looking
surface with textures derived from these images.

## The Basics of UV Mapping

##### Add a sphere

We\'ll use a sphere for this demonstration. Delete the initial cube
( + X ). Then, create a new model, a
sphere (**** → Add → Mesh → UV
Sphere). Leave the settings at default for now.

![](UV_sphere.png "UV_sphere.png"){width="300"}

##### Mark a UV seam

In edit mode, select a ring of vertices around the widest part of the
sphere (the equator, if you will). This can be done easily by holding
down  and left-clicking on the
\'equator\'.

Press  and select *Mark Seam*, or
select *Mesh* → *Edges* → *Mark Seam*. This tells the UV unwrapper to
cut the mesh along these edges.

![](Sphere_with_marked_seams.png "Sphere_with_marked_seams.png"){width="300"}

##### Unwrap the mesh

Next, create a window for the UV mapping: click and drag left the small
lined area in the top right corner of the 3D window, a new window will
be created. Set its window type to \"UV/Image Editor\" with the drop
down box at the bottom left corner of the new window or with
.

![](Blender_icosphere_and_UV_Image_Editor.png "Blender_icosphere_and_UV_Image_Editor.png"){width="600"}

In the 3D View window, select all your vertices by pressing
, and press
 → *Unwrap*. In the UV/Image editor you
should see all the vertices/faces/edges of the model represented, or
\'mapped\', in 2D space.

If you don\'t see anything, you need to select UV Editing from the
Screen Layout dropdown in the UV/Image editor window.

![](UV_unwrapped_sphere.png "UV_unwrapped_sphere.png"){width="400"}

##### Apply an image

Now we\'re going to actually use this UV map. Save the following image
(click to view in full high resolution (4,096 × 2,048 pixels)):

![](BlueMarble-2001-2002.jpg "BlueMarble-2001-2002.jpg"){width="500"}

Load it in the UV/Image Editor window by clicking *Image* → *Open Image*
or by pressing . Then with the grab,
rotate and scale tools, adjust the UV islands (the UV groups that
aren\'t connected to each other) so that it fits nicely on top of the
image as shown. To select a UV island, hover the mouse over the island
and press a vertex and .

*Note: Since the aspect ratio of the image will warp the UV\'s, it may
be easier to simply re-unwrap the mesh exactly the same way you did
before. You can then adjust the UV\'s as needed.*

If you have issues fitting to the image use X and Y letters after
pressing S. This will adjust the shape to fit the image.

\[S\]cale, \[R\]otate, \[G\]rab, \[B\]order selection, \[A\]
Select/Deselect all

![](Blender_icosphere_textured.png "Blender_icosphere_textured.png"){width="600"}

##### Admire your new creation

Back in the 3D View window, go into Object mode. The next drop-down menu
to the right of the mode menu is the Viewport Shading (Draw Type) menu;
use it to set the Viewport Shading to Texture. Note that parts of the
model will be shadowed and other parts illuminated based on the location
of the lights in your scene. Try adding more lights and moving them
around so you see the model more clearly, and try to use this lighting
preview to \'Rough\' your lights. (you can add more lights Shift-A-Lamp
and right click lamp to move to where light is needed)

To make the texture visible in renderings, you also need to add the
texture to the sphere as a new material. In the Properties window,
switch to the Material context by clicking the small shaded-sphere
button. Create a new material by pressing the *New* button, leave the
settings as they are for now; then switch to the Texture context. Create
a new texture and select the type to be \'Image or Movie\'. Select the
globe texture from the dropdown menu.

![](Texture_select2.jpg "Texture_select2.jpg"){width="150"}\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
Then go to the mapping menu and set the Coordinates to \'UV\' and the
\'Map\' to \'UVMap\', leave the projection at \'Flat\'. This will make
use of the UV\'s we unwrapped earlier. To make the globe a bit smoother,
switch to the Modifier context in the Properties window and add a
subsurf modifier; set the number of subdivisions to 2. Then press
, if you had no Tool-shelf, in the 3D
viewport and select \'Smooth\' under the shading options. This will make
the globe far smoother and more realistic.

Now, simply press  to render your scene!

![](Blender_Blue_Marble.jpg "Blender_Blue_Marble.jpg")

Note that in the above render I\'ve changed the lighting and the camera
position to make the image more interesting. I also added a star
background, you can find the settings for this in the World context (a
pretty relevant coincidence) in the Properties window and the texture
settings for the World.

Go to the **World** properties and check both **Blend Sky** and **Real
Sky**, set all 3 colours (Horizon, Zenith, Ambient) to **black**. Go to
**Texture** settings and if you weren\'t already there, click on the
**World** texture settings (upper left globe icon) and set the type to
**Voronoi**. Scroll down to **Colors** panel and check **Ramp** and give
Color Stop 0 a white color and an alpha of 1 and Color Stop 1 a black
color and alpha of 0. Now some will happen magic: set **Distance
Metric** to **Minkowski 1/2**, in **Noise** section set size to **.002**
and set 2 of Feature Weights at around .5. Finally, in **Influence**
panel, check **Horizon**, **Zenith Up** and **Zenith Down**. That will
do the trick. In some older versions there was a standard option for
this but it has \"disappeared\".

![](World_star_settings_1.jpg "World_star_settings_1.jpg"){width="150"}\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
![](World_star_settings_2.jpg "World_star_settings_2.jpg"){width="150"}\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\

## Alternative method

If you looked around the textured globe we just made, you would have
noticed that around the \'equator\' there were lines, or \'seams\',
where the two UV islands met. This is a common problem with UV mapping
and there are a couple of ways to avoid it. In our case, since we\'re
using a sphere, the best way to remove the seams is to use spherical
mapping.

First download one of the textures from this link:
<http://earthobservatory.nasa.gov/Features/BlueMarble/BlueMarble_2002.php>.
Then use this texture for your globe instead of the one we first
downloaded.

Go into edit mode, and select all the vertices of sphere. Press
 → *Sphere Projection*. If you\'ve got the
UV/Image editor open you should see a very different UV map, as shown
below. Note that only the \'Unwrap\' option will use the seams we just
made, all of the other options completely ignore it.

You can also try, especially handy when you use a more detailed map in
the place of the seam: First unwrap with cube projection and then with
sphere projection. It\'s now a square like UV.

![](Sphere_projection.png "Sphere_projection.png"){width="450"}

Now lets make the UVs fit more evenly over the texture. In the UV/Image
editor, press *UVs* → *Constrain to Image Bounds*. This will make sure
that during editing none of the UVs will go over the bounds of the
texture; if they did, it would cause the texture to repeat itself in the
area of the UVs outside the bounds.

Now select all the UVs with  and scale
them up till it is stopped by the image bounds. In my case, there is one
vertex in the top-right corner, and a few in the bottom-right corner
that are quite distant from the rest of the UVs; to fix this, I simply
selected those vertices and moved them closer to the rest of the UVs.

![](Sphere_UVs_edited.png "Sphere_UVs_edited.png"){width="400"}

Now simply scale all the UVs by the X axis until the UVs stretch over
all of the image. Doing this is exactly the same as scaling in the 3D
viewport, press  and
, then drag the mouse.

Now rerender your model, and you will see that there are no seams! You
can also use an image with clouds. if you render this you will see
seams. you can fake this away a bit by making the diffuse at material
sea-blue by using the color picker after rendering the first render (If
it looks good it is good).

![](_Sphere_spherical_mapped_render.png "_Sphere_spherical_mapped_render.png"){width="450"}

