That Old Chestnut
Texturing in Maya, for me, is one of the most difficult parts, as you can fully texture a model, and then have the look of the model change on render due to outside influences such as lighting or environment issues, such as the EnviroFog. I imagine it is completely controllable and makes sense if you where to master Maya and get to the point of knowing what everything did in it, however, I am not at that stage! For these reasons I like to think of texturing as mostly guesswork, which is one reason I don’t often finish models as I like to be able to fully control what I am working on.
As this title suggests, today I am going to be experimenting with textures. For this, I will need a model, so I am going to be using the half-finished jet engine model that I created in my Modelling with Maya 1 post, some time ago. I am also going to set Maya to one of the saved view layouts, so that I can see the perspective view of my model as well as the Hypershade window. This can be done by going to Window>Saved Layouts>Hypershade/Persp, or by holding the space bar over the Perspective view, left clicking directly above Display and going to Hypershade/Persp.
The Hypershade is a work area that allows the creation, deletion and application of textures. It also allows you to edit each texture you have created, and even add extra variables or nodes, to the textures. When you create a new document, Maya will automatically create a default Lambert1 texture, which will be applied to every object you create in the scene. You can change the Lambert1 texture in the same way you can edit any texture, and this will edit any starting objects that you create from there on.
As you can see here, the Hypershade shows the default Lambert1, as well as the default ShaderGlow1 and ParticleCloud1, which we will ignore in this tutorial. In the Perspective view, you can see 6 objects, all of them are the jet engine I began last tutorial, the column on the left is the low poly model, while the right has been poly smoothed. You can also see that they are all the normal default Lambert1, and decidedly dull because of it.
Maya has many different textures that you can work with, and most of them can be edited to the point of looking like most the other textures, there is that much scope to them. However the three most commonly used textures are Lambert, Blinn and Phong. Lambert by default has no reflectivity, where as Blinn and Phong do, and although Phong is less reflective in this demo, it can be made to be almost as reflective as the Blinn textures.
For this purposes of this tutorial I am going to use a Phong texture. As you can see in this scene, I have removed the four objects with the Lambert and Blinn textures, and have kept the Phongs. I have also edited to Phong textures by going back to the Hypershade window and double clicking on the Phong1 texture. This will open the texture editor options and allow any changes you wish to make. I have made the colour of the texture darker, in an attempt to get realistic looking steel. I have also made it slightly more reflective and refractive. The image above is a text render image, rendered using Maya software at production quality. As you can see the texture does not resemble steel, and would take a fair amount of fiddling or prior knowledge on what settings make a good steel texture, however you can see the reflections more clearly, even if they are distorted in an odd way. They also reflect and refract off of each other, though that is slightly less clear in this image.
Again I edited the Phong1 texture, however this time I tried to create a reflective aluminium surface, which you can see in the image above. I think the texture is closer to what I was after than the previous image, however it still needs work. As you can see both objects have the most the same texture settings applied to them, however I edited the colours slightly to get different effects from them, and I also cranked up the reflectivity settings of one to near maximum. Although neither of the two are really ideal, they are both an improvement on the previous attempt, and as you can begin to see, texturing without really knowing what you’re doing can take some time.
I have previously said that Lambert, Phong and Blinn textures are the most common used, and they are, however you can use different effects tools to gain a completely different style, and Maya has quite a few of these built-in.
One example of this is the Toon shader. The Toon shader can be applied to an object, while the user chooses exactly which colour or colours, and shader you want to use. The shader I have chosen here is called the Dark Profile Toon shader, and it darkens the colour based on the angle of each edge, giving a cartoon shaded effect, while light hitting the object can darken or lighten. There are other Toon shaders such as a single solid colour toon and two-tone shader, however these are best experimented with as you can get some fantastic results.
A completely different way to texture an object is to use the UV Map Editor. This tool allows you to create a net of an object, save an export the net as a flat image, into a program like Photoshop, and paint directly onto the net. You can then import the image back into Maya and use it as the texture, however it can cause problems if you are rendering in Mental Ray, but for this tutorial I am using Maya Software Renderer.
Firstly you must create a map of the object. This will net out the objects faces onto a flat image, however there are several ways of doing this, Planar mapping, Cylindrical mapping and so on. Today I am going to be using the Automatic Mapping, as you can select how many sections you want the net to be in. Click on the Automatic Mapping options box to get more details and options.
I am not overly bothered about how many sections my net will be in as it is a simple model which will mostly be painted the same colour, however for more complicated models or models with specific sections that must be kept together, there are ways of editing the net making procedure to ensure your preference. I simply selected 12 planes and to optimize for less distortion.
Maya then creates some visual references around your model to show that it has been mapped. There are ways to edit the map using these visual references, however we won’t go into that now.
As you can see Maya has created 12 planes which will be used to keep the UV map correctly orientated.
The next step would be to get Maya to map the net. You can do this by going to Edit UVs>UV Texture Editor.
After the UV Texture Editor window has opened, you will be able to see your object broken down into a net.
You can edit your net in this window, however for demonstration purposes we wont be needing to do that. The next step is to take a UV Snapshot, which will allow us to import the net into Photoshop and paint onto it. Simply go to Polygons>UV Snapshot, then choose a place, size, and file type. I usually use PNG as they are a lossless format.
For the purpose of this tutorial I have already painted the whole of the net black, apart from the white lines of the net, which I have left in to show you how the net lies on the object. I have also painted a small portion of the object red to demonstrate.
If you are unsure which sections of your net relate to what parts of your model, you can also use Photoshop to write onto the model, then import it into Maya and see if your orientation is correct, for example I have written a few words onto my image as well. When you are done editing your image, you will have to save it, preferably as a lossless format, and then import it back into Maya.
To import the image into Maya, and then attach it to the object you have been working on, you must go back to the Hypershade window, select a texture, open the texture editing menu which should happen automatically if you have the attributes editor window open. You then click the checkered box next to the colour option in Common Material Attributes, and select file from the window that pops up.
This option window should then replace your Attributes Editor Window. Next to where it says Image Name, press the folder icon to select the location of your file. After doing this your Perspective window should show a rough render of the file on top of your object. Don’ worry if it looks wrong, as an actual render is the only way to tell what is really happening with your model, and Maya is simply doing its best to confuse you.
You can then do a test render to see what your object looks like with its new skin.
Here is my test render. As you can see, the colour scheme is not ideal on the black background, however that would be easily fixed by changing the background colour or adding a coloured plane into the background. The next sits where it should do on the object, even after going through Photoshop and back out. Glorious!
If you need to edit your texture, you can simply open the image up in Photoshop again and draw on top of it some more, and the best thing is, it doesn’t even have to be neat as Maya will only use the parts of the image which the net tells it to. You can then go back to Maya and, navigate again to this window.
Once here again, you should be able to click the reload button to refresh Maya’s Hypershade, and show the newer version of the file, however for my own purposes I saved the image as a different name and so simply had to click the folder icon once again and navigate to the new image.
You can then do a final render to see your result.
Well, that’s about all I managed to work out for my first UV Texture Editor session, I shall look it in further detail in the future, enjoy.