Você está na página 1de 17

The Almost Complete Idiots Guide to UV Mapping in Blender 2.

42+
UV Mapping in a can.

0 !""""""""""""""""!#!""""""""""""""""!$0

B% &hantomgraph '()

Introduction

I hope the title o* this little tutorial doesn+t put too man% *ol,s o**- .ut as I spent man% an hour *uddling o/er other UV tutorials out there *or Blender I de0ided to ma,e one that 1as step .% step 2ust in 0ase someone out there is ha/ing trou.le li,e I 1as. This tutorial ma% seem o/erl% /er.ose- .ut I *ind that e3plaining all the steps sometimes helps *ol,s *ind tri0,s and tips that ma% not seem o./ious to the student. '() This tutorial 1as designed using Blender 2.42 on a 4inu3 ma0hine. It should 1or, *ine on the Ma0 and 5indo1s /ersions as 1ell- less the *ile naming 0on/ention di**eren0es o* 0ourse. 6ou 1ill also need some ,ind o* image manipulation program 7I.8. Gimp or &hotoshop9 to a0tuall% ma,e the te3tures *or an% ,ind o* produ0tion usealthough %ou 0an use the .uilt in paint tools to do the tri0, *or o.2e0ts that don+t need that +per*e0t+ loo,. I 1ill not .e del/ing into the a0tual dra1ing o* the te3ture map- I+ll lea/e that up to the e3perts in the art department- .ut I 1ill in0lude some help*ul hints on ho1 to 0reate .lan, and template UV te3tures *or later modi*i0ation. I am assuming that %ou ,no1 enough a.out Blender to .e a.le to model o.2e0ts- sele0t /erti0es and so on- .ut other1ise this tutorial assumes this is the *irst thing %ou ha/e e/er tried to UV te3ture.

Are 1e read%: Good; 4ets get started;

Part I - Setting up the scene

The pro0ess o* 0reating a UV map is something a,in to ta,ing a <= o.2e0t and 0utting it up so that it la%s *lat. >or this tutorial 1e are going to ma,e a tin 0an .e0ause it+s eas% to /isuali?e ho1 to 0ut it apart. @tart Blender 1ith a ne1 s0ene and delete the de*ault 0u.e. 7&ress A- then 8nter9 Ma,e sure %ou+re in top do1n /ie1 .% pressing the B Ce% on the num.er pad and add a 0%linder .% pressing spa0e and under the +mesh+ menu that appears sele0t +C%linder+. Blender 1ill prompt %ou *or the num.er o* /erti0es 1hi0h de*aults to <2. Change the num.er to DE and 0li0, FC . The *inal produ0t 1ill loo, a little rough- .ut it 1ill do *or our tutorial here. 5hile still in 8dit mode press >G to s1it0h the panel o/er to the editing .uttons and 0li0, the +@et @mooth+ .utton in +4in, and Materials+ This 1ill ma,e our 0an ni0e and smooth. Ho1 press Ta. to e3it editing mode and sele0t the lamp .% 0li0,ing on it. 76ou ma% ha/e to ?oom out to see it9 &ress G and mo/e the lamp o/er ne3t to the 0amera. 5hen %ou are *inished %ou should ha/e something that loo,s li,e *igure D. I* %ou 1ant do a Iui0, render- press >D2. 6ou should see a ne1 1indo1 pop up that loo,s li,e *igure 2.

Figure 1 Our scene (in 3D window)

Figure 2 A quick Render of the scene

Part II Seaming

The ne3t step is to determine ho1 to 0ut a o.2e0t up so that it 1ill la% as *lat as possi.le. F* 0ourse a 0omple3 <= o.2e0t su0h as a human head has 1a% too man% /aria.les to .e a.le to trul% ma,e it *lat- so a 0ompromise has to .e rea0hed. The general idea is to 0ut the o.2e0t up in 1a%s that allo1 similar parts to ha/e as *e1 seams as possi.le. Fne 0an sometimes loo, at arti0les o* 0lothing or pa0,ing .o3es as a re*eren0e *or 1here seams should .e. In the 0ase o* a human head it 1ould pro.a.l% .e .est not to di/ide the *a0e 1ith seam- 0hoosing the less 0onspi0uous parts o* the head 7@u0h as the hair line9 so that %ou+re te3ture maps don+t end up sho1ing the seams 1e are a.out to ma,e. >or our e3ample- A tin 0an- the 0hoi0e should .e immediatel% o./ious. The top and the .ottom 1ill *latten outand i* 1e 0ut the 0%linder along /erti0all%- it 1ill la% *lat as 1ell. 5e al1a%s 1ant to put our seams in the least o./ious pla0es possi.le 7@u0h as along sharp edges9. This assists in .lending the 0uts smoothl% to ma,e a more realisti0 o.2e0t. 5e 1ant to resele0t the C%linder o.2e0t and s1it0h the <= /ie1 to the .a0, o* the 0an so press $shi*t D 7The D on the num.er pad9 Joom .a0, in on the 0an and press the Ta. ,e% to enter 8dit mode. B% de*ault all the /erti0es 1ill .e sele0ted. &ress the A ,e% to unsele0ted them. 5e no1 1ant to enter 8dge @ele0t mode so press Ctrl- Ta. then 2 or 0li0, the edge mode .utton on the <= 1indo1+s tool .ar. 7>ig <9 6ou ma% 1ant to 0li0, the +4imit @ele0tion to Visi.le+ .utton as 1ell *or this ne3t step. 7>ig <9 I li,e to thin, o* this .utton as the .lo0,- 7as in the i0on9 as it .lo0,s %ou *rom sele0ting /erti0es- *a0es and edges that 1ould not .e /isi.le i* the o.2e0t 1ere real and solid.

Figure 3 3D View Tool Bar

Ho1 1e 1ant to sele0t the 0enter edge that runs do1n the .a0, o* the 0an. As 1e are alread% loo,ing at the rear o* the 0an- 1e should sele0t the 0enter /erti0al edge. 5ith the edge sele0ted press Ctrl 8 to .ring up the edge spe0ials menu and sele0t +Mar, @eam+ *rom the menu. =epending on %ou+re Blender settings %ou should see the edge 0hange 0olor to indi0ate that the seam has .een mar,ed. 7>ig 49

Figure 4 Back of the can seam

Ho1 1e are going to mar, the seam *or the .ottom o* the 0an. &ress A to 0lear all sele0ted edges. 7Hote the seam is still /isi.le9. I* %ou a0ti/ated the +.lo0,+ .utton desele0t it no1 and using the .ounding .o3 tool sele0t the entire .ottom o* the 0an. &ress B and .o3 in the 1hole lo1er edge o* the 0an. Ho1 press the 2 on the num.er pad to tilt the 0an up slightl% so 1e 0an see the *a0es on the .ottom. 7>ig K9

Figure 5 The bottom of the can selected.

To ma,e things simple 1e no1 need to s1it0h to /erte3 sele0t mode 7The .utton to the immediate le*t o* the edge sele0t in >ig < or press Ctrl Ta. D9 and 1hile holding do1n the @hi*t ,e% 0li0, the 0enter /erte3 o* the 0an+s lid. 5hen %ou+re *inished %ou should see something li,e 1hat+s in >ig E.

Figure 6 The outer ring of the can selected

Figure 7 The edges selected for the bottom seam

Go .a0, to edge sele0t mode 7>ig <9- and this time unsele0t the edge o* the .ottom o* the 0an to the immediate right o* the /erti0al seam. 76ou 1ill see 1h% later.9 5hen %ou are read% %ou should see something li,e >ig B. &ress Ctrl 8 and sele0t +Mar, @eam+ *rom the menu to mar, the seam. Hote ho1 the seam is no1 indi0ated in a di**erent 0olor. &ress A to unsele0t all elements. Ho1 1e are going to 1or, on the top o* the 0an. The *irst thing 1e need to do is s1it0h our /ie1 to the *ront 0enter o* the 0an .% pressing D on the num.er pad. Ho1 1e repeat the steps o* .order sele0ting the top part o* the 0an- tip the 0an up 1ith the ) on the num.er pad- s1it0h to /erte3 mode- unsele0ted the 0enter /erte3. @1it0h .a0, to edge mode. 5e are going to unsele0t one edge *rom the top o* the 0an li,e 1e did on the .ottom. To ma,e li*e easier 0hoose the edge to the immediate right o* the 0enter o* the 0an. &ress Ctrl 8 and again sele0t +Mar, @eamL *rom the menu then press A to unsele0t all elements. 5hen %ou+re *inished %ou should see something li,e >ig ).

Figure 8 Our can with all the seams marked

Part III Building the UV Map


Ho1 1e are going to 0reate the UV map that Blender 1ill use to paint a te3ture on the 0an. The map itsel* is internal to .lender and is not an image- .ut 1e 1ill ma,e a /isual representation o* the map using some s0ript tools Blender has so 1e 0an paint a ni0e te3ture *or our 0an. The *irst step is to split the main <= s0reen into t1o parts. 7Mo/er %ou+re mouse o/er the top edge o* the <= /ie1 until the Up =o1n 0ursor appears. Night mouse 0li0, and sele0t +@plit Area+ *rom the menu that appears. A /erti0al line 1ill appear. Cli0, in the middle o* the s0reen to di/ide it into t1o <= /ie1s. >loat the mouse In the right hand /ie1 and sele0t UVOimage 8ditor *rom the 1indo1 t%pe options. 7>ig G9 6ou should end up 1ith something that loo,s li,e >ig D0.

Figure 9 View selector

Fig 10 Blender with 3D and UV/Image editor

Ho1 1e mo/e o/er to the le*t hand /ie1- press Ta. to go .a0, to +F.2e0t Mode+- then Alt > to s1it0h to the +UV >a0e @ele0t+ editor or 0hoose the mode *rom the mode tool .ar menu. 7>ig DD9 In the UV >a0e @ele0t 1indo1 press A to sele0t all *a0es. 6ou ma% noti0e the UV 1indo1 0hanges slightl%. &ress Ctrl 8 and sele0t +Mar, Boarder @eam *rom the @eams menu. 7>ig D29

Fig 11 Mode Menu

Fig 12 Marking the Seams for the UV

Ho1 1e are going to 0reate the UV Map. 5hile still in the UV >a0e @ele0t 1indo1 press U and sele0t +Un1rap+ *rom the +UV Cal0ulation Menu+.7>ig D<9 I* e/er%thing 1or,ed 0orre0tl% %ou should see the UVOImage editor 5indo1 update 1ith something that loo,s li,e >ig D4.

Figure 13 The UV Calculation Menu

Figure 14 The UV Map

Ho1 I+m going to ta,e a moment to e3plain 1hat 1e are seeing and 1h%. 'P) F./iousl% the t1o 0ir0les are the tops and the .ottom o* the 0an- and the strip .et1een them is the *a0e 1here the la.el 1ould go. But 1hat+s 1hat: 5hat dire0tion is up:

This is the reason 1e didn+t 0reate 0omplete seams around the top and .ottom. I* %ou re0all- 1e didn+t ma,e a seam on one edge o* the .ottom o* the 0an right at the .a0, seam. 4i,e1ise 1hen 1e 1or,ed on the top- 1e le*t a single edge 0onne0ting the top to the la.el or *ront. Be0ause the 0onne0tion o* the top 1ill .e in the middle o* the la.el 1e 0an loo, at the map and instantl% tell 1hi0h dire0tion is 1hi0h. @imilarl% 1e 0an tell the e3a0t orientation o* the lids to the la.el *or pla0ing pri0e tags and su0h. QTri0,% eah: 'P) Although 1e 0an not al1a%s 0ut an o.2e0t to la% per*e0tl% *lat 1ith no o/erlapping parts 1e 0an sometimes lea/e a single edge 0onne0ted to another part to help our minds /isuali?e e3a0tl% 1here on the o.2e0t the te3ture 1ill appear. In the 0ase o* our 0an- 2ust .% loo,ing at the map 1e 0an tell 1hat side is the top and it+s e3a0t orientation to the la.el. Nemem.er i* %ou ma,e a mista,e in ma,ing the seams %ou 0an al1a%s go .a0, and tr% other *ormats. The UV mapper 1ill store the pre/ious map- .ut on0e %ou+re *inished 1ith %ou+re seam 0hanges %ou 0an al1a%s s1it0h .a0, to the UV >a0e sele0t mode- and sele0t +Neset+ *rom the UV Cal0ulation Menu. 7>ig D<9 6ou 0an then mar, the .oarder seams again 7>ig D29 and Un1rap the F.2e0t again. 7>ig D<9

Part IV Building a 'Default' texture map and painting the texture.


Ho1 that 1e ha/e the UV map set up in Blender- 1e 0an .uild the te3ture *or Blender to +1rap+ on the *a0es o* the o.2e0t. 5e are going to use a ni0e little s0ript that ships 1ith Blender to automati0all% 0reate a rough te3ture. >irst mo/e o/er to the UVOImage 8ditor 1indo1. and 0li0, on the UV Menu *rom the tool .ar. @ele0t +@0ripts+ *rom the top and then the @a/e UV >a0e 4a%outL s0ript. 7>ig DK9

Figure 15 The UV Script Menu


A prompt .o3 1ill appear 7>ig DE9 *or our e3ample 1e 0an use a si?e o* D024. >or more 0omple3 o.2e0ts %ou might 1ant to use a larger *igure as this 1ill .e the resolution o* the te3ture. Cli0, the FC .utton. Ho1 one o* %ou+re /ie1 1indo1s 1ill 0hange to a *ile .ro1ser. 7Fn mine it+s the .ottom one9 @a/e %ou+re *ile somepla0e. it should .e a .tga *ile t%pe. I* 1e ta,e a loo, at the 0ontent o* the *ile 1e+ll see something li,e >ig DB. A 0ouple o* things I+/e noti0ed and some hints and tipsP D. >or some reason on m% 4inu3 .o3 using the sa/e UV *a0e la%out s0ript 0reates a .tga *ile that appears to .e 0orrupt. Fpening it 1ith Gimp and sa/ing it again repairs this issue. 2. I usuall% al1a%s ,eep the .tga *iles that the s0ript generates. This 1a% i* I 1ant to 0hange te3ture sometime in the *uture I 0an al1a%s reload this .lan, +de*ault+ to ma,e a ne1 *ile. This is help*ul i* %ou end up +re0%0ling+ an o.2e0t in other .lend *iles or pro2e0ts. <. 6ou don+t ha/e to use a .tga *ile t%pes *or te3tures. Rust a.out an% *ile *ormat %ou+re 0omputer supports

1ill pro.a.l% 1or,- in0luding Rpeg 'P)

Figure 16 The Script Prompt Box

Figure 17 Contents of the Texture file.

Part V Setting the texture up and endering.


>or this part I+/e ta,en the li.ert% o* 0reating a te3ture *or our 0an using Gimp. 7>ig D)9 &lease don+t laugh too hard at the e3ample. '() I+/e sa/ed the *ile as 0anSte3ture.2pg in the same dire0tor% as I sa/ed m% ..lend *ile. Ho1 1e are going to appl% the te3ture so that it renders 0orre0tl% and gi/es us a ni0e pre/ie1 1hen 1e use te3tured shading in the <= 1indo1.

Figure 18 The completed texture file


>irst lets set up our te3ture *or the <= 1indo1. 5hile in the UVOImage editor- 0li0, the +Image+ menu and sele0t open *rom the menu and open our *ile. 7>ig DG9 BFFM; 6ou should .e seeing the *ile in the UVOImage editor and 1rapped around our 0an in the UV >a0e sele0t 1indo1; 7>ig 209 In the UV >a0e sele0t 1indo1 %ou 0an mo/e %ou+re /ie1 around to ma,e sure the pri0e tag and e3piration date is on the top- and the made in Blender stamp is on the .ottom.

Figure 19 The open image menu

Figure 20 Blender with the texture applied

Ho1 %ou might thin, 1e are done- .ut not Iuite. 5e ha/e to add the te3ture to the o.2e0t *or the render engine. >irst lets 0lean up a little. Night 0li0, on the di/iding line .et1een the UV >a0e sele0t and the UVOImage 8ditor. @ele0t +Roin Area+ *rom the menu that appears. Ho1 *loat o/er the UVOImage editor hal*. 6ou+ll pro.a.l% noti0e part o* the 1indo1 dimming 1ith a large arro1 indi0ating that the UV >a0e @ele0t 1indo1 1ill slide o/er. Cli0, the UVOImage editor 1indo1 to 0lose it. Ho1 in the <= 1indo1 press Ta. to s1it0h .a0, to 8dit mode. 7>ig DD9 Ho1 sele0t the @hading .utton in the .uttons 1indo1 or press >K 7>ig 2D9. A ne1 panel 1ill open 0alled +4in,s and &ipeline+ Cli0, the +Add He1+ .utton to add a ne1 material to our 0an.

Figure 21 - Shading and Pipeline Buttons

Figure 22 Add New Texture

A /ariet% o* panels should appear. >ind the one la.eled Te3ture and 0li0, the +Add He1+ .utton. 7>ig 229 A ne1 Te3ture 1ill appear named Te3L in the top .utton and t1o more ta.s 1ill appear on the panel. Mo/e to the +Map Input+ ta. and ena.le UV mapping. 7>ig 2<9 then s1it0h o/er to the +Te3ture+ panels .% pressing >E or .% 0li0,ing the i0on on the menu .ar. 7>ig 2D9

Figure 23 Map texture to the UV map

Figure 24 Define the Texture as a Image

Change the te3ture t%pe to +Image+ *rom the list 7>ig 249 and 0li0, the +load+ .utton on the panel that appears. 7>ig 2K9 Blenders >ile na/igator 1ill appear and sele0t our te3ture *ile. A thum.nail 1ill appear in the pre/ie1 panel i* it+s open.

Figure 25 Load Image for Texture


Ho1 all their is le*t to do is render- so mash the >D2 ,e%; Although I added a *e1 more lights to our s0ene and t1ea,ed the 0amera angle %ou should see something li,e >ig 2E. Mapp% Mapping; &hantomgraph 'P)

Figure 26 The Final Render

Você também pode gostar