Documente Academic
Documente Profesional
Documente Cultură
Up to this point, we have only talked about half of UV Textures; the UV map and layout. The
layout is the arrangement of all the UV maps. Each UV map 'maps' image pixels to a mesh face.
There is one UV map for each seam or sub-mesh. The entire layout is colored by an image. Blender
provides several features that help you when working with the image part of the UV Texture.
Blender also includes a built-in texture painting program. This section discusses how to use images
effectively.
Goals
Texture images take up precious memory space, often being loaded into a special video memory
bank that is very fast and very expensive, so it is often very small. So, keep the images as small as
possible. A 64x64 image takes up only one fourth the memory of a 128x128 image. For photo-
realistic rendering of objects in animations, often larger image textures are used, because the object
might be zoomed in on in camera moves. In general, you want to use a texture sized proportionally
to the number of pixels that it will occupy in the final render. Ultimately, you only have a certain
amount of physical RAM to hold an image texture and the model and to provide work space when
rendering your image.
If you can re-use images across different meshes, this greatly reduces memory requirements. You
can re-use images if you map those areas of the meshes that "look alike" to a layout that uses the
common image. In the overview below, the left image is re-used for both the sphere and a portion of
the monkey. The monkey uses two layouts, one which has one UV map of a few faces, and another
that has three maps.
You don't have to UV map the entire mesh. The sphere above on the left has some faces mapped,
but other faces use procedural materials and textures. Only use UV Textures for those portions of
your mesh where you want very graphic, precise detail. For example, a model of a vase only needs
UV Texture for the rim where decorative artwork is incorporated. A throw pillow does not need a
different image for the back as the front; in fact many throw pillows have a fabric (procedural
material) back.
As another example, you should UV map both eyes of a head to the same image (unless you want
one bloodshot and the other clear). Mapping both sides of a face to the same image might not be
advisable, because the location of freckles and skin defects are not symmetrical. You could of
course change the UV map for one side of the face to slightly offset, but it might be noticeable. Ears
are another example where images or section of an images can be mapped to similar faces.
Workflow
If you want to start off by creating an image using an external paint program, you will want to save
an outline of your UV faces by using the script Save UV Face Layout located in the UVs menu.
This script was discussed here.
To create an image within Blender, you have to first create a New Blank Image with a uniform
color or test grid. After that, you can color the image using the:
After you have created your image, you can modify it using Blender's built-in Texture Paint or any
external image painting program.
Once you have unwrapped, use the UV/Image Editor Image->New to create a new image that will
be the UV Texture.
Name
Give your image a more descriptive name
Width and Height
If you are texturing an item for a game, it is best to use image sizes that are powers of two
(16, 32, 64, 128 ...) for both width and height, so they can be drawn properly in real-time
using OpenGL. Most 3D cards don't support images larger than 2048x2048 pixels.
For rendered artwork, textures can be any size. Images do not have to be square; they can be
any size that you want, provided you have the memory and graphics display capability. Size
should be based on the amount of detail that you need.
Base Color
Click on the color swatch (default is black) to bring up the color picker applet, and choose
the starting base color.
Alpha
Choosing an alpha less than 1 will allow other layers of UV textures to show through. The
key to realistic looking skin, for example, is many layers that can be individually controlled.
UV Test Grid
Click this to use the UV Test grid discussed below.
Of course, this simplest of new images will be blank. You will have to start texture painting to get
some color into those cheeks. Esc aborts the new image creation.
When you render, the mesh will have the test grid as its colors, and the UV Texture will be the size
image you specified. You can save the UV image using the Image->Save menu.
The first three options, (UV Painter, Render Bake, and Texture Baker) replace the image with an
image that they create. Texture paint and outside packages merely add or enhance the image.
Regardless of which method you use, ultimately you must:
Save your texture in a separate image file (for example JPG for colors, PNG with RGBA for
alpha)
(optionally) Pack the image inside the blend file (UV/Image Editor Image->Pack as PNG)
The advantage to saving as a separate file is that you can easily switch textures just by copying
other image files over it, and you can use external editing programs to work on it. The advantage to
packing is that your whole project is kept in the .blend file, and that you only have to manage one
file.
The UV Painter script is located in the UV/Image Editor UVs menu. This nifty script takes the
vertex colors from the selected faces and colors in your UV layout. The line button draws an outline
of your UV map, and the Scale button scales up or down the image. When you Save your image, a
targa-format image file is created for your editing pleasure. UV Painter is an easy way to start
painting your mesh, once you have finished your layout.
The Redraw button updates the painting based on any UV layout changes or vertex painting done
since the last time the cursor visited the window, although updates may occur automatically.
A small (bug?) Note: After saving the targa image, you must edit it with an external program
(Gimp) as it saves dead space off to the side, and you want to scale it in pixels.
The Render Bake feature provides several tools to replace the current image based on a render of:
Click on the hyperlink above for more info. The Render Bake produces an image, already mapped
to your UV layout, shown in the UV/Image Editor.
The Texture Baker script, available from the UV/Image Editor UVs menu, saves a UV texture
layout of the chosen mesh, that can be used as a UV map for it. It is a way to export procedural
textures from Blender as normal image textures that can be edited with a 2d graphical image
manipulation program or used with the mesh in games and other 3d applications.
Select your faces in the 3D View Face Select mode; run the script by selecting the menu item. A
pop-up panel will appear, allowing you to change the image name or leave it be. The first time you
run the script, supply the filename. Choose a reasonable resolution, and an image is rendered. The
image depends on your Material settings:
If you do not have either VCol Paint or TexFace enabled in your material buttons, you will
get the UV Layout colored with the procedural (base) material and textures that are current;
for example a shadeless purple that is marbled.
With VCol Paint enabled, the rendered image includes the procedural materials and textures,
modulated by the vertex paint job.
Selecting both VCol Paint and TexFace incorporates procedurals, vertex, and current UV
image, melding them all into one beautiful render.
Save the image using Blender's File->Save Image dialog, and the image will be saved in the format
specified in the render settings. You can then load it as discussed below.
Broken in 2.44
In 2.43 and before, if the script does not run completely perfectly with you answering all questions, it
may leave all Layers unselected, with your 3D View thus blank. Don't know why, it just does.
Using your favorite image painting program, draw something that matches your UV layout. Then
save your changes, and back in Blender, use the Image->Open menu command to load it as your
UV image for the mesh in Face Select Mode for the desired (and active) UV Texture layer.
Use the UV/Image Editor menu Image->New. Then start painting your mesh with Texture Paint.
Use Image->Open to search for and use images in any popular format as the UV Texture. It will be
opened and placed as a background to the layout. More often than not, use an image that follows
your UV layout. Recall that you saved an outline of your layout and used that to guide the painting
of your UV texture image.
If you open an avi file, the first frame of the animation will be used. You can not open an image
sequence or use a frame in the middle of a file.
Finding Images
When you open the .blend file, Blender goes out and loads in the most recent image from its
location on your hard drive.
In a team environment, or if you are using an external paint program to edit the image while the
.blend file is active, and the file is updated and re-saved, use the UV/Image Editor to Image-
>Reload it and see the latest and greatest in Blender. Also, use Reload if you have mapped more
faces to an image, and the 3D View will be updated with the latest image mapping back to faces.
If you move the image file, Blender may not be able to find it, and you will have to Image->Replace
it. Use this option to map a UV layout to a different image altogether.
Organize your images
In any scale project, there quickly becomes hundreds of images that are used as UV Textures. Set up a
//tex/UV/ directory to hold your UV Textures. Practice good directory and change management.
Unfortunately, Blender does not support the Windows shortcut links.
Blender contains a Find Image Target Paths script in the UVs menu in the UV/Image Editor
window. Starting from a specified root directory for your project, this script will search down and,
based on filename, reload images automatically. Use this script if you have renamed a subdirectory
or moved a few images around inside your project.
The other way to locate images is to change one of your Blender UI panes to an Image Browser
window. This file browser showns you thumbnails and image information (size, format, etc.) of
only image files in a directory.
You then have to create a new Material for the mesh. Then you have two ways of applying that
texture to the material:
The proper way is to map the image using the UV texture, and to load that image as an
image texture.
The quick way is to enable TexFace in the Material panel. This tells Blender to use the
UVTexture as the base material color (alpha is ignored). Any other textures are layered on
top of that base from the top texture channel to the bottom according to their mix method.
For example, a wood texture mapped to Alpha on top of a TexFace image makes streaks of
the material transparent.
To map the image as a Texture channel (usually the top channel), in the Map Input sub-panel enable
UV, and enter the name of the UV Texture (by default UVTex). The advantage is many more
options in the Texture's Map Image panel, such as UseAlpha and repeat/mirror. You can also
control how multiple textures are layered onto one another by their order in the Texture channels, as
well as how they mix with each other, animate their color influence, etc.
The previous pages explained how to create a set of UV Layouts for different portions of the mesh.
For example, there may be one UV Layout for the face of a character, and another for their clothes.
Now, to texture the clothes, you need to create an image at least for the Color of the clothes, and
possible a "bump" texture to give the fabric the appearance of some weave by creating a different
image for the Normal of the clothes. Where the fabric is worn, for example at the elbows and knees,
the sheen, or Specularity, of the fabric will vary and you will want a different image that tells
Blender how to vary the Specularity. Where the fabric is folded over or creased, you want another
image that maps Displacement to the mesh to physically deform the mesh. Each of these are
examples of applying an image as a texture to the mesh.
As another example, the face is the subject of many questions and tutorials. In general, you will
want to create a Material that has the basic skin color, appropriate shaders, and sub-surface
scattering. Then you will want to layer on additional UV Textures for:
Each image is mapped by using another Texture Channel. Each of these maps are images which are
applied to the different aspects (Color, Normal, Specularity) of the image. Tileable images can be
repeated to give a smaller, denser pattern by using the Texture controls for repeat or size.
The File->Append function automatically goes into .blend files and shows you the image textures
packed in it. The public domain Blender Texture CD is also a great resource, and there are many
other sources of public domain (and licensed) textures. All textures on the Elephant's Dream CD are
public domain. And if it looks like a duck and quacks like a duck...
Layering UV Textures
Base UV Texture
Layered UV Texture
Great textures are formed by layering images on top of one another. You start with a base layer,
which is the base paint. Each successive layer on top of that is somewhat transparent to let the
bottom layers show through, but opaque where you want to add on to details.
To avoid massive confusion, all image textures for a mesh usually use the same UV map. If you do,
each image will line up with the one below it, and they will layer on top of one another like the
examples shown to the right. To do this, just create one UV Texture (map) as described in this
section. Then, create material image textures as described in the procedural materials section.
Instead of mapping to Original Coordinates (OrCo), map to UV. Use that map name repeatedly in
the Material->Textures->Map Input panel by selecting UV and typing the name in the text field. In
the example to the right, our UV Texture is called "Head" (you may have to expand the image to
see the panel settings). Then, the image texture shown will be mapped using the UV coordinates. In
the "Base UV Texture" example to the right, the face has two textures UV mapped; one for a base
color, and another for spots, blemishes and makeup. Both textures use the same UV Texture map as
their Map Input, and both affect Color. The Makeup texture is transparent except where there is
color, so that the base color texture shows through. Note that the colors were too strong on the
image, so they amount of Col affects is turned down to 60% in the second layer (the blemish layer).
Normally, we think of image textures affecting the color of a mesh. Realism and photo-realistic
rendering is a combination of many different ways that light interacts with the surface of the mesh.
The image texture can be Mapped To not only color, but also Normal (bumpiness) or Reflection or
any of the other attributes specified in the Map To panel. If you paint a grey-scale image (laid out
according to the UV Layout) with white where the skin is oily and shiny, and dark where it is not,
you would map that input image according to the UV Layout, but have it affect Specularity (not
color). To make portions of a mesh transparent and thus reveal another mesh surface underneath,
you would paint a grey-scale image with black where you want the texture transparent, map input to
UV, and map it to Alpha (not color). To make portions of a mesh, like a piece of hot metal, appear
to glow, you would use a grey-scale image mapped to Emit.
Believe it or not, this is only "the tip of the iceberg!" If everything that's been described here just
isn't enough for you, the texture nodes feature, introduced in recent versions of Blender, enables
you to layer and combine textures in almost any way you can imagine.
You can mix and match procedural materials and textures, vertex paint, and UV textures onto the
same mesh.
The image to the right has a world with a red ambient light. The material has both VCol Paint and
TexFace enabled, and receives half of ambient light. A weak cloud texture affects color, mixing in a
tan color. The right vertices are vertex painted yellow and the left is unpainted procedural gray. The
UV Texture is a stock arrow image from the public domain texture CD. Scene lighting is a white
light off to the right. From this information and the User Manual thus far, you should now be able to
recreate this image. In other words, I have taught you all that I know, my young padawan. May the
Force be with you. Oh wait, there's more...
You can also assign multiple materials to the mesh based on which faces you want to be procedural
and which you want to be texture-mapped. Just don't UV map the faces you want to be procedural.
You can use UV Textures and VertexPaint (V in the 3D View window) simultaneously, if both are
enabled in the Material settings. The vertex colors are used to modulate the brightness or color of
the UV image texture:
A UV Layout can only have one image, although you can tile and animate the image. Since a layout
is a bunch of arranged UV Maps, and a UV Map maps many mesh faces, a face can therefore only
have one UV Texture image, and the UV coordinates for that face must fit entirely on the image. If
you want a face to have multiple images, split the face into parts, and assign each part its own
image. (Or you can get fancy with Nodes, but that's another story ...)
Alpha UV Textures
Alpha 0.0 (transparent) areas of a UV Image render as black. Unlike a procedural texture, they do
not make the base material transparent, since UV Textures do not operate on the base procedural
material. The UV texture overrides any procedural color underneath. Procedural Textures are
applied on top of UV Textures, so a procedural image texture would override any UV Texture.
Transparent (black) areas of a procedural texture mapped to alpha operate on top of anything else,
making the object transparent in those places. The only thing that modulates visible parts of a UV
Texture are the Vertex Colors. In the example to the right, the finger image is transparent at the cuff
and top of the finger and is used as a UV Texture. All three balls have a base material of blue and a
marbling texture. The base material color is not used whenever TexFace is enabled.
The top left ball has not had any vertex painting, and the finger is mapped to the middle band, and
the texture is mapped to a pink color. As you can see, the base material has VCol Paint and TexFace
enabled; the base color blue is not used, but the texture is. With no vertex painting, there is nothing
to modulate the UV Texture colors, so the finger shows as white. Transparent areas of the UV
Image show as black.
The top right ball has had a pink vertex color applied to the vertical band of faces (in the 3D View
window, select the faces in UV Paint mode, switch to Vertex Paint mode, pick a pink color, and
Paint->Set Vertex Colors). The finger is mapped to the middle vertical band of faces, and VCol and
TexFace are enabled. The texture is mapped to Alpha black and multiplies the base material alpha
value which is 1.0. Thus, white areas of the texture are 1.0, and 1.0 times 1.0 is 1.0 (last time I
checked, at least), so that area is opaque and shows. Black areas of the procedural texture, 0.0,
multiply the base material to be transparent. As you can see, the unmapped faces (left and right
sides of the ball) show the vertex paint (none, which is gray) and the painted ones show pink, and
the middle stripe that is both painted and mapped change the white UV Texture areas to pink.
Where the procedural texture says to make the object transparent, the green background shows
through. Transparent areas of the UV Texture insist on rendering black.
The bottom ball uses multiple materials. Most of the ball (all faces except the middle band) is a base
material that does not have TexFace (nor Vertex Color Paint - VCol Paint) enabled. Without it
enabled, the base blue material color shows and the pink color texture is mixed on top. The middle
band is assigned a new material (2 Mat 2) that does have vertex paint and TexFace enabled. The
middle band of faces were vertex painted yellow, so the white parts of the finger are yellow. Where
the pink texture runs over the UV texture, the mixed color changes to green, since pink and yellow
make a green.
If you want the two images to show through one another, and mix together, you need to use Alpha.
The base material can have an image texture with an Alpha setting, allowing the underlying UV
Texture to show through.
Create multiple UV Textures which map the same, and then use different images (with
Alpha) and blender will overlay them automatically.
Use the Composite Nodes to combine the two images via the AlphaOver node, creating and
saving the composite image. Open that composited image as the UV Texture.
Use an external paint program to alpha overlay the images and save the file, and load it as
the face's UV Texture
Define two objects, one just inside the other. The inner object would have the base image,
and the outer image the overlaid image with a material alpha less than one (1.0).
Use the Material nodes to combine the two images via the AlphaOver or Mix node, thus
creating a third noded material that you use as the material for the face. Using this approach,
you will not have to UV map; simply assign the material to the face using the Multiple
Materials
A Material Texture, that has a Map Input of UV, and is an image texture that is mapped to Color, is
equivalent to a UV Texture. It provides much more flexibility, because it can be sized and offset,
and the degree to which it affects the color of your object can be controlled in the Map To panel. In
addition, you can have different images for each texture channel; one for color, one for alpha, one
for normals, one for specularity, one for reflectivity, etc. Procedural textures, like Clouds, are
INCREDIBLY simple and useful for adding realism and details to an image.
UV Texture Procedural Texture
Image is mapped once to Size XYZ in the MapInput allows tiling the texture many times
faces. across faces. Number of times depends on size of mesh
So, in a sense, a single UV texture for a mesh is simpler but more limited than using multiple
textures (mapped to UV coordinates), because they do one specific thing very well: adding image
details to a range of faces of a mesh. They work together if the procedural texture maps to the UV
coordinates specified in your layout. As discussed earlier, you can map multiple UV textures to
different images using the UV Coordinate mapping system in the Map Input panel.
Pack
The button that looks like a little package automatically puts a copy of the image file inside
your .blend file when you use Image->Open, automatically packing them all together. Use
this option to transport only one file (instead of the .blend and all the .png's used), or to
isolate your .blend from any changes that may be happening.
Rotation/Scaling Pivot
2D Cursor; , : As analogous to the Object Mode/ Edit Mode 3D Cursor pivot. This will
rotate the current UV selection around the 2D cursor position. LMB click to position the
2D cursor at desired location.
Median Point; ⇧ Shift, : As analogous to the Edit Mode Median Point pivot. Enabling the
Median Point pivot will calculate a rotation point for a UV selection accordingly to the
vertice count or weight of objects. Blender supposes every vertex has the same weight.
Bounding Box Center; . : As analogous to the Edit Mode Bounding Box Center pivot.
Blender will encompass your UV selection as tightly as possible with a 2D rectangle or box,
and then use it's center as a rotation point.
Shared Vertex ; CtrlC : When welding or stitching, you want to be sure that you sew the UV
maps together correctly. At a seam, when unwrapping, two UV coordinates were created,
one for each side of the seam. With Stick UVs enabled, a RMB click will not only select
the UV vertex closest to the mouse cursor, but also all the other UV vertices that correspond
to the same mesh vertex (but who are now shown on the 'other' side of the seam in another
UV map).
Shared Location ; AltC : Works in the same way, but only on the UVs that are 'connected',
meaning they are within a 5 pixel range of the first selected UV.
Disable ; ⇧ ShiftC : Disables sticky selection.
Median : Move the median of the selection to the snap target (mouse pointer).
Center : Move the current transformation center to the snap target. Can be used in
conjunction with 2D Cursor to snap with offset.
Closest : Move the closest point of the selection to the snap target.
Texture Painting
The magic pencil button changes your mouse and keyboard into a mini-paint program. Paint
using the LMB . See Doc:Manual/Textures/UV/Painting_the_Texture
Draw With Alpha
UV Textures do not have to be totally opaque; they can be *partially transparent, like a
partial reflection on a window. Turning on this button makes the display show only the
opaque parts of the image.
Draw Alpha Only
The dot button disregards colors and shows the alpha channel of the image as a BW
gradient, with white being Alpha of 1.0 which is totally opaque and black, which is totally
transparent. Use this option to see what parts of the object will be transparent based on the
UV Texture.
Lock
When changes happen in this window (UV/Image Editor), other affected windows are
updated in real time.
Full Screen
When working on details, remember that you can expand any window to full-screen by pressing ⇧
ShiftSpace to toggle the active window between a pane and full-screen. You can also use Ctrl↑ and Ctrl↓
Image Menu
This menu gives you options when working with the image that is mapped to the mesh.
Thumbnails
Blender has a built-in picture window, the Image Browser window type, that allows you to scroll
through directories on your hard disk, and shows you thumbnails only of image files in the directory.
When you hover over a file, the header shows you the size and format of the file. Very Handy...even
better than the Windoze file browser.
Sometimes it is necessary to move image files to a new location on your hard disk. Use the Find
Image Target Paths script to update the image links. You can fill in the top level root directory
name, and Blender will search down from there to find a similar file.