Monday 17 October 2011

Using UVW map to produce head material bitmap

IMPORTABLE file for photoshop use

In 3ds max - top uvw unwrap - edit mode - in editor tools option - render UVs
This brings up Render uvs options
Firstly make sure the aspect ratio is the same as the aspect ration selected earlier using heght + width tools
Can use "guess aspect ratio" if necessary


With shown settings select render UV template
(Visible edges on - mode none)
With show overlap on you can see if you made any mistakes before you save the file - there should be no red polygons at this point - go back and edit if necessary


Other useful files that can be rendered by changing mode are normal view which shows the chnge in angles of geometry



And shaded which shows change in angles via light source (ie a rendered shot using light to create (shades shadows))



When the desired results are obtained - select save in the top left of picture and save the renders to be used in photoshop



Go into photoshop
Import picture rendered with settings - show vertex edges - mode none



Create new layer
Choose bright colour that won't be used in material i.e. green or blue
Edit - fill - apply (foreground colour)


For result of



In rendered picture (currently background layer)
Ctrl + a = select all
Ctrl + c = copy selected
Return to blue layer
Change to quick mask mode (hotkey q)
Ctrl + v = paste selected
Press q
(if lines  are not highlighted it is possible they need to be made brighter (white on black required))
Image adjustments - brightness contrast can quickly fix this (merge layers afterwards)
(view shows highlight trials (dancing pixels)

Select - modify - boarder - set width to 4 pixels
Highlight selection now thicker allowing for greater visibility



Select add layer mask (icon in bottom right menu (in layers menu))



Selecting apply layer mask turns this from a linked option into the layer
This guide can be left on top as long as any work is done in a layer set below the guide


Open in a separate window the reference pictures
(Turn off any previously made mesh or guides etc to leave the flattened pictures)
Want image reference pictures to be greater size then newly created guide
If not then can scale down guide
Image - image size - scale down by percent


Idea now is using guide to create facial texture that will be wrapped round 3d model
This method involves taking pieces from reference photos - placing them  where required - re-"stitch" the picture back together in its warped state

First go into reference pictures (if necessary select all layers - right click - select merge layers this will allow you to quickly work in one single layer to cut paste pieces from instead of switching between reference picture layers)
Note this should be saved as a separate file for all layer data will be lost and hidden layers are discarded.


Select lasso tool - drag around forehead - copy and paste into new UVW reference picture
Move layer below guide if necessary by let clicking and dragging in layers menu
Press ctrl + t to enter transform mode to edit forehead piece (not other options can be limited whilst in transform mode - import to remember to come out of mode when finished - pressing return will do so)
(Holding shift while editing scale will lock aspect ratio)


Repeat for eye brow + mouth


Add more and more pieces - minimise gaps but they are not problem at this stage
Cover all main areas - discrepancies between pieces will be edited after
Important to name layers with progress otherwise later editing will prove difficult with lots of layers named layer "prefex"


If pieces need to be flipped due to single side of face reference picture
Edit - transform - flip tools



Build up facial features then remove guide



Due to photograph discrepancies and differences with lighting not all surfaces may be of consistent colour
These can be adjusted via
select layer to adjust - image - adjustments - hue + saturation



These controls require finesse as major colour adjustment can occur otherwise


Another tool for editing is warp tool
Edit - transform - warp
this allows the shape to be warped to allow greater adjustability if required



Once all pieces are in place - select all - merge layers
All these pieces are now in a single layer and considered a single picture (despite gaps)
this allows direct editing across images



Use stamp tool to begin blending layers together
Hold alt and then select area to copy
Then simply paint on another area and this will copy the previously selected area over the top
Depending on the opacity settings this can be used to completely cover up something or gradually blend the data together



A quick example of stamp copying at 100% opacity over a portion of the top lip


Using aligned sample will make reference point of copying move with the mouse (position of where alt select was placed) - without aligned sample switched on the reference for copying will be reset with each left click

Patch tool also effective for fixing issues.
Select area for patch - drag and select area to patch into original selection 



Add more layers if necessary...
For my own vanity i remove most of the spots i had during photo being taken
This next shot shows half of the texture map completed



To check that the map is being build correctly we can go back into 3ds max and apply it to the model - even if it is incomplete to check how the material is aligning to the model



Look for any flaws or unwanted results
Below picture shows how bitmap requires adjusting where the geometry for the chin line has split



If necessary, creating an adjusted uvw map - rending - importing into photoshop and placing on top of material as new guide lines is easy to do since all the main work has been done. The material being created does not have to be lost - and the uvw map only requires adjust not recreation
Below picture shows new guidelines under - old guidelines - as long as aspect ratio is kept uniform the bitmap will transfer in same manner just with differences applied



Solution shown below to chin problem




Make sure guide is hidden when transferring to 3ds max otherwise it will appear on the model itself
Method for preventing this is to use actions
Bring up actions menu - select new action - this will start recording - hide the guide (this will be hidden by name therefore name of layer is important - save file - end record - now whenever press play guide will be hidden and file saved.



For this example chin line is too low
Method used to correct this is liquify tool
Select texture map (face painted) - filter - liquify


This tool allows you to literally move the mesh as if it were a liquid - can be used for subtle or large adjustments


In this example the chin line needs to be raised
Below is before and after  (rotated ears to fit with mesh better swell)





Generating bump map

Create new layer - drag below face bitmap
Set to mid tone grey


in blank new layer
Edit fill - foreground colour ok

[for backup] Select face texture - right click on layer - duplicate - hide new layer

Image adjustments desaturate


Image adjustments levels
Move levels into where output begins and ends 


Filter - other - high pass - select pixel radius (approx 2.0)


Remove embossing effect - use  clone tool (stamp) - as before alt select then select.


Bitmap mix 
noise - fractal - tiny size - mix 50/50

SCREEN SHOT

Blemishes can be highlighted or flattened by either making bump map texture lighter/whiter (more bump) darker (less bump)

Specualar maps

Copy bump map - rename
Image adjustments - levels - give picture very high controlled contrast



New layer
Select brush - white - lighten mode - opacity low - paint in specular



Filter - blur - gaussian blur
Blend to point where differences in highlight levels still visible but smooth transition between levels



test in 3ds max and adjust accordingly

Filter - texture - texturizer


Settings used - 54% - 2 relief = very fine texture applied to roughen blurred geometry to be more random / natural at a small level














No comments:

Post a Comment