1 / 19

Computer Graphics Imaging

Computer Graphics Imaging. Lecture 13 and 14 UV Mapping. Why UV mapping. The procedural texture mapping is good for simple shaped objects The image-object mapping is automatically calculated Simple, but users have very limited control over which vertex is mapped to which point on the image

noek
Download Presentation

Computer Graphics Imaging

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Graphics Imaging Lecture 13 and 14 UV Mapping

  2. Why UV mapping • The procedural texture mapping is good for simple shaped objects • The image-object mapping is automatically calculated • Simple, but users have very limited control over which vertex is mapped to which point on the image • UV mapping is do-it-yourself texture mapping • Users can specify which vertex is mapping to which point on the image • Most characters in 3D games and movies are UV mapped

  3. UV mapping • The basic idea is to cut the 3D mesh model and “flatten it” • The flattened mesh is called a “UV map”, “UV texture”, or “UV layout” • You can superimpose the UV layout on an image and adjust the UV layout so that each vertex is mapped to the appropriate point on the image • Then you use the UV layout to guide the texture mapping

  4. New in Blender 2.46+ • The user’s manual and some old UV mapping tutorials refer to a “UV Face Select” mode • Since Blender version 2.46, the “UV Face Select” mode is merged into the “Edit” mode • When reading these documents, replace “UV Face Select” mode with “Edit” mode, and the rest should still apply

  5. UV mapping process • Step 1: create UV layout • Split the window into two • Left: 3D view • Right: UV/Image editor • In the 3D view window, enter “Edit” mode • Select the faces you want to unwrap • Press U, and select “unwrap” (or other unwrapping methods) • You will see the flattened mesh appear in the UV/Image editor window

  6. UV mapping process • Step 2: adjust UV layout • In the “UV/Image” window, select “Image” and open an image • You may replace this image later • Adjust the UV layout to match the image • Can move individual vertex or face • Can rotate or scale the faces in UV layout • In the 3D view, change Draw Type to “Textured” • You can preview how the image is mapped to the object • But you are not able to render it yet. • To render the result, you need to add material

  7. UV mapping process • Go to “Editing” (F9) panel • Under “Mesh”, take a note of the name of the UV Texture • By default, it’s “UVTex”

  8. UV mapping process • Step 3: apply the UV layout in texture mapping • In 3D view, switch to Object mode • Select the object, and create a new material for it • Create a new texture channel • Add a texture image • Load the texture image you used for adjusting the UV layout

  9. UV mapping process • Under “Map Input”, press “UV” button and type in the name of the UV layout (e.g. UVTex) • Render the scene and now you can see the result of UV mapping

  10. UV unwrapping method • Press U to open the “UV Calculation” menu • You can unwrap the mesh in different ways • (Standard) unwrap • Cube • Cylinder from view • Sphere from view • And some other unwrapping methods • For “Cylinder from view” and “Sphere from view”, the object’s axis should be perpendicular to the current line of sight • Usually you want to switch to the front view

  11. Mark seam • You may mark seams on the 3D mesh model to tell Blender where to cut the mesh open • So the mesh is unwrapped the way you want • In Edit mode, select edges, press Ctrl + E, and select “Mark seam” • When you unwrap this mesh, Blender will cut along the seams

  12. Different UV mapping for different faces • You may want to UV map different images to different faces (or face groups) • First, select and unwrap different faces independently • And adjust the UV layout for different faces independently • To apply the UV map, you need to assign different materials to different faces • See http://wiki.blender.org/index.php/Doc:Manual/Materials/Multiple_Materials

  13. Different UV mapping for different faces • Suppose you want UV map image A to a group of faces (group 1), and map image B to another group of faces (group 2) • In Edit mode, select face group 1, in Editing (F9) panel, under “Link and Materials”, create a new material and press “Assign” button to assign the material to group 1 • In “Material Buttons” panel, you may give the new material a more meaningful name • Don’t forget to assign the new material to the faces

  14. Different UV mapping for different faces • Create a new texture channel for the new material • Load image A as a texture • In “Map Input”, press “UV” button and type in the name of the UV layout

  15. Different UV mapping for different faces • In Edit mode, select face group 2, in Editing (F9) panel, under “Link and Materials”, create a new material and press “Assign” button to assign the material to group 2 • Create a new texture channel for the new material • Load image B as a texture • In “Map Input”, press “UV” button and type in the name of the UV layout

  16. Export UV layout • You can export your UV layout to an image file • In “UV/Image editor” window, select “UV”  Scripts  “Save UV Face Layout”. • You can open this UV layout image in Photoshop or GIMP to guide the creation or painting of your texture image • E.g. use the UV layout as a layer in Photoshop or GIMP to guide • Then you can use that image for texture mapping

  17. Texture painting • You can paint directly on the image in “UV/Image Editor” window • You need to open an image first • Select Image  “Texture painting” • Press C to bring out the “Paint Tool” window • See http://wiki.blender.org/index.php/Doc:Manual/Textures/UV/Painting_the_Texture for details

  18. Pin • Sometimes you may want to keep part of the UV layout and “re-unwrap” the rest • You can pin certain vertices (or faces) in the UV layout so that they won’t be changed if you unwrap the mesh again • A useful feature if you want to progressively refine the UV layout

  19. Pack image • In “UV/Image editor” window, select Image  “Pack image” • The current image is packed into the Blender file. • The next time you open the “UV/Image editor” window, the image will be automatically loaded. • This is useful if you need to share the Blender file with someone else.

More Related