Monday, 27 January 2014

PPP2: Chapter 1 - Walls, Ceilings and Floors Part 2

Project: Creating a Brick Wall
During this second part to the tutorial we will be looking at how we can add texture onto the brick wall, or any different surface for that matter and it is difficult to get your head around, as I have found in the past, but with the tutorial that I am going through it has really helped me to be able to get an understanding on everything now.

Generating a Texture Source
When creating a texture for a model on Maya there are a few different stages to get through which involves creating 3 different types of texture (or maps): including diffuse, normal and specular. When combining all of these together we can create a beautiful looking texture that works well with the scene. The basics of creating a texture involve first creating the UV Map in Maya and the basic start to it before taking it into any 2D image programs, in which I will be using Adobe Photoshop as this is available to me and also it is one of the best.

Generating a Diffuse Source
To begin with we'll be first editing the bricks so that they are ready for the texture to be placed on. I first started by grouping them all together and calling then 'Hi_Bricks' and the background cube 'Background'. This meant that I could then easily keep them in order together and access them all with one simple click. I quickly deleted the history on my subject and  I then moved onto creating the texture.


I first changed the colour of the bricks to a white Lambert and then repeated the process with the background cube but changed it to a black Lambert. This was the starting point to adding the colour.



I then added in a polygon plane, which will be renamed to 'Low_Poly_Wall'. We made the width and height 100 and then turned UV Normalisation off, this meant that we've prevented any future problems with tiling the textures.


I then moved back the plane so that from the front it was behind the bricks and changed the menu type to Rendering so that I could access new menus. I used the Lighting/Shading menu to drop down to the Transfer Maps option. At this stage there were a lot of different options to pick from so I moved the menu out of the way so that I could see the scene as well. We used the Transfer Maps menu to create the next stages of the project. I selected the Low-Poly_Wall and under Target Meshes added it to the selection. I then took the Hi_Bricks and the Background  and under the Source Meshes section I added them there.


I then clicked on the diffuse button in the Output Maps section and saved the diffuse image as a Targa in my images folder of the project as this was a place it can be assessed easily. Then under Connect Output Maps I unchecked connect maps to shader, and under the Maya Common Outputs section I changed the setting so that it generated a 1024x1024 image in a medium quality. To finish off back up at the top, under the Target Meshes section we changed the Display drop down menu to Both and changed the Search Envelope up so that the red plane sat just in front of the bricks before clicking on bake which left me with a black and white texture.



Adding a Little Colour
Now I have my black and white image I went onto adding colour onto it. I actually had a lot of problems just before this stage of locating my file. I could not locate it in the original folder I had place it, it was only when I did a complete search for it on my computer that I found it, where I had put it originally but still it did not actually show as being there. I eventually managed to get it onto my desktop after some time but this was not fun to find. Moving on from this complication I placed it back in the folder were I needed it and then took it into Photoshop to begin adding in the colour.

When I put my image into Photoshop for reasons I am not aware of it had been rotated so I had to change this round and then re-rotate it when I was done so that I could work from it normally and then ensure that it still worked at the end when I took it back to Maya.


To begin manipulating the image I first selected the image and copied it before going into the Alpha 1 channel and pasting it in there so that it was repeated. I then created a new layer with just those bricks selected and changed the foreground to white before deselecting everything. I then went back onto the background layer and filled it black.


I then create a new layer above the rest and filled it red, this is the going to be the colour layer above the bricks. Once the new layer was then created I then indented it above the brick layer so that once they were connect you could see the colour on the bricks but this left the background black still were the mortar would be. I then saved it and took it back into Maya to see how it looked when sat on my Low_Poly_Wall.



Generating a Normal Source
The next step is generating a starting point for my normal map and will include using the Transfer Maps in Maya, but first I had to do a little house keeping by putting objects into different layers so that there are neat and tidy. I created 2 layers and renamed them 'high' and 'low' so that I can toggle the visibility of the objects in a better way that's more efficient.


I then hide the high layer and selected the Low_Poly_Wall and went onto Transfer Maps again, selecting the Low_Poly_Wall as the Target Mesh and then the other two objects as the Source Mesh as before. At this stage I then removed the Output Map from the diffuse settings and changed it to the Normal Button instead to create my normal map. I then ensured that it was being saved as a Targa to the correct location and ensured that the Map Space was set to Tangent Space. This means that the objects are going to look better if they are going to be rotated, deformed or anti-mated, otherwise if this was not selected when the object was manipulated it would look incorrect to the user.


I then took this map into Photoshop to edit it and create my normal map. I brought in the file and the only thing that I did to it was change the Brightness to +10 and then the Contrast to +30. This gives the normal map a little bit of a 'pop' and makes it look that little bit more of a reflective look. I then applied this to the materials bump map to see how it can give my brick wall a better and more appealing texture.



Using an Alternative Method: The Light Array
The process that I just carried out will be used 99% of the time but there is an alternate method of being able to do this. It will only work for this kind of project but will create an accurate and high quality result which is carried out the 'high' layer.

I started off by selecting both the Hi_Bricks and Background and adding a new material and making the colour white and increased the diffuse section so it was on full (1.00). I then created a directional light which was shining on the wall. I then changed the colour of the light so that it was red and pointed it on the wall so that it shone red.


I then duplicated the light and moved it to the right and angled it towards the other one so that shadow was softer against the wall. I then changed the intensity to -1 so that it produced a shadow against the wall instead. I then duplicated the first light again and angled it downwards instead and changed the colour so that it was green. I then did the same but this time moved it below pointing upwards. I then duplicated the first light again and coloured it blue instead. The last light I created was an Ambient Light that again pointed at the wall.




Generating an Ambient Occlusion
The last source texture that I wanted to create is an Ambient Occlusion map or an AO map. An ambient occlusion is used as an adjustment layer and its used to add to your other maps to create a more realistic looking texture in the end by adding in additional details.

To begin with I selected the Low_Poly_Wall and again opened the Transfer Maps window before again adding the Hi_Wall and Background onto the Source Meshes section like before. Then using the ambient icon, under the Outputs Maps section I added this to my wall. I deselected the normal map check box and saved the folder to a suitable location.

No comments:

Post a Comment