Sunday, 18 October 2009

Week 4-Beginning the Material Map

As I have completed the modelling stage of the task I went on to prepare my model for applying a material. To start I applied an Unwrap UVW modifier to the object. As instructed I placed this below the symmetry modifier so I could identify any problem areas, such as inverted or overlapping faces, only once. Next I selected faces in the UVW dropdown menu and used the paint selection marquee tool to select the polygons on the head. I left out the ear and the quadrants around it in the selection as there are many overlapping sections here which need to be separated and this will need to be done using a different map parameter shape. Once I had selected the necessary quadrants I chose cylinder as the map parameter in the Unwrap UVW menu and set it along the Y axis. I then used the scale tool to make sure the cylinder covered the whole of the head. Finally I used the move tool to position the modifier so the object was central and the seam only ran down the centre of the face.

Before I went any further I selected the preset bitmap checkerboard in the material editor and applied it to my head. Then I made it visible in the viewports. I will be able to use this as a guide when working in the unwrap modifier as this will be a clear indication as to whether the material will be stretched or squashed in one segment in comparison to the rest.

Afterwards I opened the UVW edit window and viewed all the inverted faces by going to ‘select inverted faces’ from the select menu as these would cause a problem when applying a material later. This highlighted the majority of the faces and so the easiest way to resolve this was to select them all and mirror them.

Next I tried to correct any areas which would be a problem when a material was applied due to stretching. I selected vertexes in the areas where there was this problem, firstly the top of the head.

I then opened the relax window, set it to 'relax by edged angles' and repeatedly clicked apply until the problem was resolved.

Once I was happy with the vertex spacing of the head I identified other areas where the material was stretched. I felt that the neck and chin would benefit from some alterations.

So, I repeated the relax process for the neck and chin. I found that I needed to return to the neck to make some more alterations after working on the chin as this impacted on the spacing of these segments slightly.

This method worked well for many areas, but there were some problems which the relax tool was unable to solve. Instead I found editing the position of these vertexes separately was much simpler. I did this around and above the ear and along the neck line. Also, I used the technique at the corner of the mouth as it was in this area where I noticed there were a couple of overlapping vertexes.

I was pleased with how it had gone so far and decided to work on the eye. Currently the vertexes were very close together, which I thought may have caused a problem when applying a material later. So, with the paintbrush selection tool in the edit window I selected all the vertexes around the eye which I believed would benefit from being moved. Then, in the relax window I changed the method to ‘relax by centers’ and clicked apply. This did result in some of the rings being closer together than others. To resolve this I moved into edge mode, clicked on one of the edges in the central ring and back in the Unwrap UVW rollout in the main window selected loop, before using the scale tool to position that row in between the two either side.

Next I went to polygon mode, to the select menu and chose ‘select overlapping faces.’ This highlighted the nose to be a problem area, somewhere I had forgotten to check so far. Due to the structure of the nose and nostril area I used the same technique as I did for the eye.

To begin I went back to paint selection mode and used this to highlight the vertexes which were overlapping. I was careful to highlight all the vertexes which made up the ring. Next I opened the relax window, chose the relax method of ‘relax by centers’ and clicked apply. Finally I used the scale tool to reposition the central ring and make the quadrant more evenly sized.

The last thing I checked was that there were no inverted quadrants and did this by going to ‘select inverted faces.’ One segment was highlighted, but I eventually managed to get rid of this by repositioning the polygon with the move tool.

Below is how my head looks with a material on it now I have made these alteration to the unwrap UVW.

Completing the unwrap UVW on the head had gone well and so I went on to do the same to the ear. To start I went into face mode in the unwrap drop down list and selected all the quadrants which were not included in the initial unwrap and for this I used the paint selection marquee. I then went to the map parameters section of the rollout where I selected the type as planar, set it along the X axis and applied fit so it would cover just the area which I had selected.

Next I changed the map parameter to pelt as this is what I will be using in the UVW edit view. However, before going into edit view I marked on the point where I wanted the seam to be using the point to point seam tool in the Unwrap UVW rollout. For this I started on the outer edge and worked in to a vertex on the edge of the ear. I chose to place the seam behind the ear as this is the place where it will be less likely to be seen. I also tried out a few different start and end points to try to find the shortest as this will also make it less noticeable.

Next I opened the edit window in the unwrap rollout where I was faced with an obscure looking shape which threw me slightly as it was not what I was expecting. However, when I referred to the instructional video I did gain an understanding of what each part was, especially the ring around the outside. The first thing I did was to scale and rotate the blue ring so it was positioned ready for when the mesh was stretched out. When doing this I made sure that as many of the lines as possible between the vertexes of the ear and the pelt ring were as straight as possible without overlapping.

Afterwards I used the controls in the pelt map parameters window to scale out the mesh of the ear by clicking on 'stimulate pelt pulling.'

Following this I checked that there were no polygons which overlapped by clicking on 'select overlapping polygons' from the menu. There were a couple which were overlapping and so I went into vertex mode and repositioned these until this was no longer a problem. I also did this for inverted polygon in which there was one, but once again rearranging the affected vertexes solved this.

The next step was to position the unwrap of the ear in a suitable place in the window. I placed it inside the ear and scaled the object down so that it did not overlap with the head mesh, but this was too small in comparison to the rest of the head as the material on this area was much larger.

Instead I placed it underneath the head and increased its size using the scale tool to make it proportional to the rest of the mesh.

At this point I had finished the editing of the unwrap UVW for the right side of the head but still needed to complete one for the opposite side. For this I applied a second Unwrap UVW modifier, but this time placed it above symmetry in the modifier stack.

Next I opened the edit window in the Unwrap UVW rollout and selected the mesh of the left side of the head. This was quite difficult as it was positioned at the exact same place as the mesh for the right, but eventually I selected the side I wanted. Then I used the mirror button to flip it horizontally. Finally I positioned it so that there was no gap between the left and right meshes and that the vertexes were aligned at the centre.

I then selected the vertexes along the join of the meshes for the main head and using the weld shortcut (control and W keys) welded all the ones which touched or nearly touched together.

After I repeated the above process to separate the two ear meshes. Once again I made sure the ear on the left of the head was selected and with the mirror and move tools I repositioned it on the opposite side of the unwrap edit window, at the base of the neck and in a similar position to the ear on the right.

Currently the meshes did not all fit onto the template canvas. As the meshes were longer in width than height I increased the bitmap width to 512 and left the height at 256. I then selected all of the unwrapped UVWs and with the scale tool reduced the size so it fitted on the canvas correctly.

I then rendered two of the maps from the edit UVW window, one was an outline map and the other a normal map. On the normal map I noticed there were some overlapping vertexes on the ears which I must have missed previously when I was editing the mesh. Also there was one quadrant which was a completely different colour to the surrounding area.

I resolved this by going into vertex mode and repositioning the vertexes until this error disappeared. This took some time on the first ear as I needed to identify the problem, however repeating the process on the second ear was much simpler. Whilst in vertex mode I tried to reposition the vertexes around the quadrant which was a different colour to the surrounding area. I checked to see if it was an overlapping or inverted polygon using these selection tools but it was not highlighted in either case. However, this was unsuccessful as it remained the same colour; the only difference was the size of the quadrant. I also tried to correct the error in polygon mode by moving it slightly, but once again there was no change. As this is the back of the head and a less important area and I am unable to find a solution I will leave this how it is.

Below are the final rendered UVW maps.

The next step was to take the guideline map into Photoshop. I then created a new layer and set the foreground colour to blue using the fill window.

I went back to the original layer and selected and copied it all before going to the new layer and pasting the guide into quick mask mode. The blue lines, which were the part which would remain once quick mask mode was removed, were very fine and difficult to see.

To resolve this I left quick mask mode and in the select dropdown menu went to modify and selected border. In the border window I increased the width value to 4. This made the selection area slightly wider and to a point where it was much clearer to identify. I was happy with the width and so added a layer mask which kept the selection and ignored the remaining area of the image. Finally I right clicked on the layer and selected apply layer mask to finalise its appearance. The outcome was a layer which just contained the outlines on an invisible background so I will be able to use this easily when I build up the material later.

The guide was now prepared and so I opened the two original photographs which I used as an aid to building my face in 3Ds max. I compared the size of the guide to the original images and found they were quite similar. In the instructional video it stated that the reference photos should have a higher resolution, and so I scaled down the guide by 25% in the image size window.

After this I transferred parts of the original images into a new layer on the guide file. I started with the forehead and in the front reference photograph I used the lasso tool to select part of the forehead before copying it. Then I moved across to the guide image and pasted it onto a layer beneath the guide. Then, with the transform tool I scaled the forehead down until it was in proportion with the guide and moved it into position.

Next I used the same process for other areas of the face. Firstly I copied the eyebrow across and reduced the size with the transform tool. When scaling I tried to get it in proportion with the other elements of the face by using the top layer as a guide. I was careful to keep the dimensions of the eyebrow the same throughout and so when using the transform tool I also held down the shift key.

I used the same technique to get the material for the cheek, lips and area below the nose. However, there was a slight problem when doing this due to the order in which I worked. The area below the nose covered part of the lip which left the top lip an uneven, unrealistic shape. This was quite easy to correct as just reordering these two layers and making sure the lips were on top quickly solved the error.

Afterwards I applied textures from my photographs to the nose, around the eye and the chin. All of these areas went well and the material fitted well with only a few alterations.

Next I moved onto the hair as quite a lot of the face had been completed at this point. For this I was initially going to use the front facing image, but after some comparison with the side image felt this would be the most suitable as the area of hair was larger and consequently would be easier to work with. Also, when I thought about it, this part of the map would have been the side of the head and so it made more sense to work from this image. So, once again with the lasso tool I selected this part of the image, copied it and pasted it on a new layer beneath the guide. I also found I needed to flip it horizontally as the resource image faced the opposite way to the side of the head I was working on. Then with the transform tool I scaled it down and rotated it so it followed the shape of the back of the head. I did this in two parts, firstly the top of the head and then behind the ear.

I continued to use the lasso tool to select an area, copy and paste it into a new layer on the texture map file before moving the part to the exact location required and use the transform tool to scale and rotate it until it was exactly how I wanted it for the remaining elements of the face. In some cases I did need to reorder the layers so that the transition between two parts was not too obvious, such as around the hairline.

I repeated this process until the right side of the face was virtually complete.

I was pleased with how it had gone so far, but was wary of merging the layers at this point as I was not sure how it would look on the model. So, in 3Ds max I opened the material editor and applied the Photoshop file I was currently working on as a bitmap material. I then dragged it to the surface and clicked on the icon which makes a material visible in the viewport.

In the viewports I was quite pleased with the appearance of the material, but felt some slight alterations were needed.

Firstly I felt my eyebrow was too long in comparison to the photos of myself. Due to this I returned to this layer and with the transform tool I scaled it down whilst holding the shift key to keep it in proportion. I then moved the eyebrow further away from the centre of the face as I felt its positioning was also a problem. At this point I also scaled down and moved the part above the eyelid as this was wider than the guidelines and consequently there was a blank area between that and the edge of the surface.

At this point I set up an action in photoshop. I recorded this to hide the top guide layer each time it was run before saving it. This will make it easier to prepare it for checking in 3Ds max.

I was now much happier with the eyebrow area and so went on to look at other areas which I felt needed alterations. One area I identified was the hair as currently at the front the hairline was too high and it did not go up to the seam at the back of the head. So in turn I worked on each section of the hair. In both cases I used the warp tool to make the material spread across the section I wanted it to cover. When I looked at the result in 3Ds max I was pleased as I felt the outcome gave my model a more realistic appearance.

Next I made some alterations to the bottom eyelid. This had a white gap between the material and the edge of the surface, once again due to me not paying full attention to the guidelines when initially positioning the section. With the transform and move tools I made the necessary changes.

I then went on to finish off the hair. I had initially left the hair as the area just around the hairline as I felt adding the ponytail down the back would look unrealistic and stuck to the back of the neck, but leaving it as it is would also not look quite right. So I decided the best thing to do would be to add the strand on.

I was disappointed when I looked at the material in 3Ds max as at the base of the neck the hair shot out diagonally. Due to this I went back to Photoshop where I used the warp tool to resolve this. When I was happy with this I placed more of the neck texture at the back and underneath the hair.

Next I looked at my model as a whole and felt the forehead would benefit from further work. I selected the material on the forehead and with the warp tool I shaped it around the side of the forehead as well as the front.

I also used the warp tool to edit the section under the eye further. This is because I felt the red area was too large as it went too far down from the eye.

Afterwards I used the rubber to make the joins between the two materials invisible. For this I selected the eraser, set the opacity to 50% and worked around the edges of all of the joins. I felt this worked quite well on some areas, for example around the nose, mouth and eyebrow, but not so on others. However, all the joins which I have worked on are a lot less obvious than before.

The final thing I did this week was to a few minor alterations to different points on the face. Firstly I used the arrow keys to nudge the eyebrow slightly lower to a position I felt was much more realistic.

Secondly I felt the tone of one section of the neck was too different to the one beside it. So in the hue/saturation window I altered the settings to try to match the two. This took a bit of time to get exactly what I wanted, but eventually I got what I was looking for.

Finally I looked at how the changes look on the model of my face.

This is everything I have done towards the project for week 4. Next week I will continue with the material creation.

No comments:

Post a Comment