Monday 17 October 2011

UVW Mapping

UVW mapping is a method being used in this example to turn a 3 dimensional object and flattening it out to allow for a material to be applied to the 2 dimension mesh and wrapped back around the 3 dimensional object as desired


Unhide reference planes to check for allignment
Small discrepancy on neck (right side)
Small discrepancy to be adjusted if possible
Large discrepancy on neck + jaw (left side) 
Left side discrepancy put down to angle in photograph




Highlight head - go to bottom of modifier stack (editable poly) - select Unwrap UVW
This will place UVW map below symmetry and turbosmooth modifiers as desired
Return to editable poly modifier stack - select yes to warnings if necesssary


Select polygon mode - select every polygon except ear polygons


Select uvw map drop down box in modifier stack - select face - in scroll down menu select cylindrical - align to z (or axis which gives shown result - reposition, size and rotate using main tool
(only edges are highlighted red instead of polygons due to driver issues and will not appear as such normally)




Come out of cylindrical mode
Select material editor - create new material - apply diffuse layer bitmap of checkard pattern
(http://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Checkerboard_pattern.svg/220px-Checkerboard_pattern.svg.png) - LINK TO WHERE CHECKER PATTERN USED WAS FOUND
Pattern was then cropped to be able to be tiled to required size



Highlight show material in viewport
This will allow for visual confirmation of adjustments and possible material skewing (deformation)


Select edit in uvw map drop down (directly under parameters)
In new dialog box select "filter selected faces" to hide all geometry not highlighted (not mapped)



Settings to change
turn off tile map
Turn on constant update
These are found by opening options tab



open "select" drop down box
choose select inverted faces
if nearly all are selected this means map is wrong way round
if this happens select all geometry - select mirror (just below "select" drop down box
If only a few are highlighted as in this example they will be sorted at a later stage




CLEANING UP PROCESS

Goal is to clean up this UVW map so all geometry is:
Skewed (deformed) as little as possible - make all quads as square as possible without losing effectivness of mesh
No over lapping geometry so material can be applied to individual quads independantly and clearly
All quads facing same direction so material is applied to same side of all quads

On modifier stack change face selection to vertex selection
select forehead vertices (in this example)
Tools - relax opens relax tool dialog box - this is design to automatically un-skew geometry to effectivily 
relax the amount of pull which is misshaping to polygon/quad
Make sure [relax by edge angles] is the mode selected to make sure this is the method used to relax the geometry


Showing results of applying relax to highlighted vertices



Can use tool repeatedly by applying multiple times until desired result is obtained
Fine tuning can be made by selected vertices individually and manually positioning them
Select troubled areas of mesh and repeat process


Alternative methods for different situations

To neaten eye geometry alternate method can be used
In relax tool simply change [relax by edge angles] to [relax by centres]


Showing results of applying [relax by centres] to highlighted vertices



If still too close together - change to edge mode - ring select inner edges - scale tool - shrink inner eye



After editing go into face mode
Go to "Select" drop down box
Use select inverted faces and select over lapping faces
If any faces turn red they need to be address and edited (reshaped)
This process needs to be repeated until the point where when these tools are selected no polygons are highlighted

CREATING UVW MAP FOR EAR

Highlight entire uvw map - close edit mode (window for editing uvw map)


Press Ctrl + I to invert selection which will highlight all geometry not mapped (the ear)


Select planar - fit
3ds max 2011 on my cpu could not perform this action - however the default mapping carried the same result

A cut or seam needs to created to define where the geometry will be separated to spread out the 3d geometry to 2d e.g. where a cardboard boxes geometry separates to be flattened out
Select point to point seam - click start and end point for cut
blue line will indicate cut - use edit seam if necessary to adjust line (alt to deselect ctrl to select edges)


Select pelt - This brings up screen as shown below
Apply pelt to stretch out geometry




Apply relax if necessary


Applied [relax by centres] to obtain result shown below


Adjust edge co-ordinates manually



First attempt of pelt offered better layout result



However intertwined geometry led the mesh to be unusable



Overlapping geometry could not be untangled and new result without seam cut was produced
This is a harder mesh to apply a material to however a cleaner layout will incur less error


Turn symmetry modifier on in stack
Remove turbosmooth modifier if sitll exsists
On top of modifier stack have symmetry selected (modifier at top of stack) add another UVW unwrap
select edit mode to bring up editor
Turn on select element
Highlight left side of face geometry (opposite to uvw map been editing)
[Since this is a duplicate it will be placed directly over the old map - if the wrong one is selected simply move it slightly to reveal the correct side underneath]


Mirror this geometry using mirror tool as highlighted
Align with previous geometry mesh


In vertex mode highlight vertices next to each other as show and press Ctrl +w to weld together
If weld does not work vertices must be put closer together or weld threshold increased




After "stitching" into single mesh select head left ear -Turn on select element - move across and mirror as previously done with facial geometry



With "tile bitmap" off it is possible to see the area the bitmap will be created in. Make sure the mesh data fits within this area (with space around the edge)
This can be done via scaling and moving using tools in upper left of editor window


Alternativily the space can be expanded via the bottom left hand controls in the options window to the required size (make not of the size resolution selected)
This will stretch/compress the geometry dynamically however and resizing and scaling may be required





No comments:

Post a Comment