Blender 3D: Noob to Pro/UV Map Basics

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

[edit] Intro

In case you're wondering, UV mapping stands for the technique used to "wrap" a 2D image texture onto a 3D mesh. "U" and "V" are the name of the axes of a plane, since "X", "Y" and "Z" are used for the coordinates in the 3D space. For example: increasing your "U" on a sphere might move you along a longitude line (north or south), while increasing your "V" might move you along a line of latitude (east or west).

You can watch a good video tutorial from the main Blender site. It is called LSCM UV Mapping or (Least Squares Conformal Map UV Mapping) and it is located on this page: http://www.blender.org/education-help/video-tutorials/modelmateriallight/

[edit] The Basics of UV Mapping

[edit] Add an icosphere

We'll use a sphere for this demonstration. So, create a new model, delete the initial cube, and create an icosphere. (SPACE → Add → Mesh → Icosphere) Leave the settings at default: subdivisions 2, radius 1.0

Make sure you are in top view like in the picture before you create it. Otherwise the equator of the sphere is probably not parallel to the x/y-plane and unwrapping will give strange results.

Image:Blender_icosphere.png

[edit] Mark a seam

In side view, select a ring of vertices on the icosphere. (Like an equator). This can be done easily by going to a side on view (NUM1 or NUM3) and drawing a selection box around the middle row of vertices (BKEY + click&drag). Make sure Limit Selection to Visible is NOT enabled first.

(Limit Selection to Visible appears to be labelled "Occlude Background Geometry" in 2.48. It is the cube button that appears toward the right of the 3V View header)

Press CTRL+EKEY and select Mark Seam, or select Mesh menu → EdgesMark Seam. This tells the UV unwrapper to cut the mesh along these edges.

Image:Blender_icosphere_with_marked_seams.png

[edit] Unwrap the mesh

Next, create a window for the UV mapping: click the MMB (RMB works as well) near the top border of the 3D View window and select "Split Area". Set its window type to "UV/Image Editor" with the drop down box at the bottom left corner of the new window or with SHIFT + F10.

Image:Blender icosphere and UV Image Editor.png

In the 3D View window, select all your vertices, and hit UKEY and then LSCM. For Blender 2.42 or later select all the faces, and use UKEYunwrap or Face menu → Unwrap UVsUnwrap to use LSCM.

Noob Note: I use Blender 2.45 and UKEY doesn't work for this. It seems to be an undo key. Is there another way to bring up the Unwrap menu? Same Noob: The tutorial doesn't say, but you have to be in UV Face Select mode for UKEY to work for this. Yoshi: For Blender 2.48a there is no LSCM but you can use Unwrap. Image:Blender icosphere LSCM.png

NOTE: Make sure you switch to the UV Face Select Mode in 3D window. Then "UKEY" does not works as a shortcut for Undo, rather it serves the purpose.

LSCM is one of the algorithms for unwrapping a mesh onto the 2-dimensional UV space, acronym for Least Squares Conforming Map. It is a very useful unwrapping method because it attempts to preserve the shape of each face, much like unwrapping the cloth of a garment.

[edit] Make a template image

When you have tweaked a nice layout and intend to make the texture image yourself, you may ease the texture drawing by saving an image of the UV layout. This image can then be opened in your image editing program of choice to make a basis for the UV texture by showing where each surface goes. In the UV/Image Editor window, select UVs menu → ScriptsSave UV Face Layout... (User note: for pre 2.43 versions, use UVs menu → Save UV Face Layout). '<<Noob note: I use Blender 2.48. UVs menu → Scripts is empty. There's no Save UV Face Layout... option... What to do?>>'Yoshi: I also use 2.48, make sure all the vertices are selected then hit UVs -> Scripts -> Save UV Face Layout. New Blender User: This is because you don't have the proper Python software installed. It is this software that provides all the scripts for Blender, so it is important to have the proper software. Note: Blender 2.48 requires Python 2.5.2, which is NOT the newest version. Python 2.6, the newest version, doesn't work with Blender, so make sure to get Python 2.5.2 (2.5.4 that is available at the Python site works too). There is another way to export the images, however, that does not require scripts. Go to Image -> New, and this will create an image of the net. Then go to Image -> Save As, and save the image to where you want it.

With Wrap selected, the layout will maintain its proportions, which is best for general purposes. Not selecting it will scale your layout into square proportions which is mostly useful for Blender's game engine where textures should preferably be square. Choose the location of the image file as desired (the default name is the name of the object to be textured) and press Export. Tip: if your image painting program supports layers, try putting the UV layout in a locked, transparent layer above the actual painting. If you do not alter the dimensions of the exported UV image in any way it will fit perfectly with your UV layout when the image is loaded back into Blender.

[edit] Apply an image

Save the following image:

Image:BlueMarble-2001-2002.jpg

Load it in the UV/Image Editor window by clicking Image menu → Open... (or Image menu → Load image in older Blender versions). Then with the very basic operations, grab, rotate and scale, adjust the unwrapped mesh so that it fits nicely on top of the image.

[noob note: when i downloaded this image it did not load correctly, try copying it into paint if you have this problem -> or better click in the link and it's send you to the correct link]

Image:Blender icosphere textured.png

[edit] Admire your new creation

Back in the 3D View window, select Object mode. The next drop-down menu to the right is the Draw Type menu; use it to set the Draw Type to Textured. (Greybeard calls it "potato mode" because of the icon that the menu shows.) Hit TAB a couple of times to refresh your object, and admire your new picture mapped onto your object!

To make the texture visible in renderings, you also need to add the texture to the icosphere as a new material. In the Buttons window, switch to the Shading buttons by clicking the small shaded-sphere button or by pressing F5. Create a new material by pressing Add New in the Links and Pipelines mini-window, then turn on TexFace in the Material mini-window:

Image:Blender icosphere TexFace.png

To finish your work, switch to Edit Mode and select all vertices. In the Buttons window, switch to the Editing buttons by clicking the small four-vertices-in-a-square button or by pressing F9, and then click Set Smooth in the Links and Materials mini-window. In the Modifiers mini-window, click Add Modifier → Subsurf and set Render Levels to 3. Switch back to the Shading buttons (F5) and activate the World buttons by clicking the small "Earth" button in the second button group. Enable Stars in the Mist/Stars/Physics mini-window. The scene is ready! Render it by selecting Render menu → Render Current Frame.

Image:Blender Blue Marble.jpg

[edit] Some notes

All this relates to the UV/Image window.
If you are going to edit the layout of your unwrapping (so you can make a better picture), make sure Select->Stick Local UVs to Mesh Vertex is on. You can "pin" vertices when they have been unwrapped with PKEY. If you do, make sure you put at least one pin on every island. You can remove all pins with alt-p. LSCM works by trying to maintain the angles between each vertex. If an unwrapping should be symmetrical and it's not, try putting one pin in the middle of the outside edge of the big side and one on the small side, and unwrapping again with EKEY.

IMPORTANT:

  • Remember to set your map input with the UV and Flat buttons enabled.
  • As said before, to make the texture visible in renderings, too, you also need to toggle on TexFace from the Material buttons.

Image:Blender map input.png

[edit] Questions

  1. Question: I can't get the image to load in blender v.2.44, thought I did everything you said. What to do?
    • Answer: In v.2.44: click 'Image' button on the bottom of the UV/Image Editor view port. There is the 'Open' option for loading an image file.
    • Answer 2: There appears to be a bug in Blender. If you still don't see an image, try cropping your image to dimension that are power-of-2, like 256x256, or 512x512, or 1024x1024.
    • Answer 3:Make sure to select the image in the file browser with both the right AND the left mouse button
    • Answer 4:Undo (Ctrl + Z) one step also helps to refresh the window and makes the image visible again.
  2. Question: Whenever I press U in the step above everything is deselected and nothing appears in the UV window. What to do?
    • Answer: First you select the circle on the icosphere (the 'equator'), ctrl-E, mark seam. Then where it usually says Edit Mode or Object Mode, click that and select UV Face Select, THEN Press U.
    • Elaboration: I'm experiencing the same thing even if I hit ctrl+E and mark seam. And AFAIK on 2.48a there's no UV Face Select mode. Well after hitting UKEY->Unwrap there's no projection of the sphere on the UV window. Update: I found the problem. In the 3d window you have to select all vertices in edit mode. Then the projection will show up.
  3. Question: My image won't load and is there a way to load images other than typing in it's entire address? (I.E. is there a 'browse' button?)
    • Answer: While there is no visual list of common shortcuts, if you type in the crude location of your file and double click on directories to get to the fine one containing your file.
  4. Comment: I selected "Save target as.." instead of "Save picture as.." in my browser, so tried loading a saved HTML file instead of the jpeg. Also it seems you need to reload the directory listing in the "Open" dialog box in Blender else it won't find the newly saved file. You can do this by going to the parent directory and back into the child directory.
    • Response: Normally the image file used by the html file will be downloaded along with the html file. Loading an html file as your texture is not recommended.
  5. Comment There does not seem to be a "UV Face Select" mode in blender 2.46 - There is a face select mode in 2.46+, but, first go to edit mode, than find the small triangle icon in your window's toolbar, hovering over it will give you the tooltip: "Face Select Mode". you can also use the shortcut CTRL+TAB+3KEY in edit mode. (The default mode is vertex mode, the four dots icon)
  6. Question: Because 2.46 has no UV face select mode, how do I apply something like "two-sided" to a whole group of faces instead of just one at a time? - See the tip above on how to get in face-select mode
  7. Question: when i press u it does not show the menu you have on your screen shot it has unwrap and some other things but does not say LCSM
    • Response: "LSCM" has been renamed to just "Unwrap"

[edit] Source

Greybeard's LSCM Mapping video tutorial: http://www.ibiblio.org/bvidtute/mytut/uvtut.avi

[edit] Extra

This YouTube tutorial might also help: http://www.youtube.com/watch?v=mVhhZ2KRr4Q


Personal tools
Create a book