Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Creating Textures and Shaders in Maya with Eric Keller shows how to create textures and materials, and then apply them to models to render realistic surfaces. The course covers working with the mental ray shading nodes, including the mental images architectural node, subsurface scattering nodes, occlusion, and car paint shaders, as well as how to incorporate these nodes into shading networks using the Hypershade editor. It also explores using textures, Maya software nodes, normal maps, and displacement maps for adding detail to models. Exercise files accompany the course.
In this movie I'm going to show you how to add a little more detail to the texture in the tires here for this car. As you can see, I have applied a file texture to create a decal for the side of the tire, and also a little bit of the tread. But it's not looking entirely realistic right now, mainly because the tread is not actually pushing out of the surface. So it doesn't look like these tires are going to get a whole lot of traction. So there are several ways that you can fix this problem. One is to actually model the tread into the surface.
That is very time consuming. Also, you're going to have to add an awful lot of geometry to the surface in order to create a nice looking tread but it is one option that you can use. Another option will be to use a bump texture, a grayscale picture to sort of bump out the tread surface. The only problem with that is that a bump texture makes the surface appear as though it's bumpy, but it doesn't actually change the geometry. So if you apply a bump texture, let's take a look at what that would look like.
So I'm going to select the tire surface, and scroll down here to the Bump section. I'm going to connect the bump to the Standard Bump channel with the tireShader. So I'll click on the checker icon. Pull up the File. I'll set the Bump Depth to 0.250. In the file node, and we are going to set the Filter Type to off, and click on Image Name. I'm going to select tread_bump. So you can see the tread_bump texture has a light color for the treads.
So this is going to push the tread out, and a light color, very dim color for the decal, just to add a little bit of bump to the decal. So I'm going to choose Ope and that will hook up the Bump texture. I'm just going to select in this region around the front tire, and do a test render. So you can see that we have a little bit of tread going here. But the problem with using a bump texture is since it doesn't actually deform the surface. As this surface starts to curve away, we can see that the tread is still actually flat. It's not actually being bumped out.
It just looks as though it's been bumped out on the parts of the surface that face the camera because you have this little specular highlight and a little bit of shadow in there. So it's a good for faking some amounts of detail. It's usually bump maps are best for faking like high frequency detail, like if you wanted to make little sort of a grainy quality to the surface of the tire. But they're not really good for things like treads, since they don't actually deform the geometry. So in this case, what I want to use is a displacement map. The displacement map is a grayscale texture, just like a bump texture.
So it's another type of texture map that wear light values, push the surface out, and dark values pushed the surface in. The difference is that a displacement map actually deforms the surface of the geometry. So when it pushes the geometry out, it changes the way the geometry appears in the render so that you're actually pushing out. It tends to make a much more realistic looking deformation in the render. So let's see how we can hook up a displacement map. I'll choose Window > Rendering Editors > Hypershade to open up Hypershade Editor.
I'll select the tire. You can see it's selected here. I'm going to right-click in the work area of the Hypershade and choose Graph Materials on Selected Objects. Here is our shader network. So we have the tireShader, which is a mia_material, and a bump connection to the tireShader, and also the file node connected to the Color channel of the mia_material. So that's fine. We can leave that the way it is. So if you want to connect a displacement map, what you're actually going to do is you don't connect the displacement texture to the tireShader itself; you connect to the displacement shader to the Shading Group.
This is the node that is between the tireShader and the actual geometry. It has a number of slots that you can use for creating specialized texture maps such as Displacement. So I'm going to select the mia_material_x_passes2SG node. This is the Shading Group node. Let's say we rename that. I'll just call it tireShaderSG to make my life a little bit easier. Then under Displacement material at the very top, under Shading Group Attributes, I'm going to click on the checkerboard icon,. Pull up the Create Render Node.
Again, I'll just select File. This brings up the displacementShader node in the Attribute Editor, which I don't actually have to do anything to this node. I'll just click on the arrow next to Displacement. That will switch me over to the File node that's now hooked up to the Displacement node. I'll click on the folder next to Image Name. I have a file in here called tread_displacement. You can see in the preview that the tread_ displacement looks a lot like the bump texture. We have light values pushing out the tread, and just a little bit for the logo, and the other details in the tire, but just enough. I'll choose Open.
I want to set Filter Type to off. Now before I do a render, I want to point out one thing. I'm using the TIFF file format, which is a personal habit of mine. I use TIFF for a lot of pictures. But mental ray does not always play nicely with the TIFF format. So what it prefers is a format called the .map format. There is a way to have Maya automatically convert all your textures into this .map format, saving your bit of work.
To activate this, go to Windows > Settings/Preferences > Preferences, and under the Categories, click on Rendering, and turn on, under mental ray Preferences, turn on Use optimized textures (auto-conversion) and turn this on. You can choose use Assigned textures only, or All textures. That's up to you. I'll just put it to All textures. I'll click on the Update optimized cache textures now button. Now what this does is this actually creates a separate folder called cache with all the converted file textures.
So if I look in my project directory in the sourceimages folder, there is a folder called cache here. This has basically converted all of my textures in the scene to the .map format. This is a much friendlier format for mental ray. It prefers this because TIFF can often crash mental ray. So it's good to get in the habit of turning on that option in the Preferences. I almost always have it on. Now that I have that set up, let's do a test render.
I'm just going to render this region again. Let's store the current image. Let's see how it looks. Okay, so here is our rendered region. It took a while to render, and we check it out. You can see that there are a couple of problems here. This is normal. The Displacement Map is doing exactly what it's supposed to do. It's displacing the geometry, so you can see that the tread is definitely being pushed out from the tire and same with the logo. The only problem is its being pushed out an awful lot. So we need to adjust this displacement map so that it renders something a little bit more reasonable.
It's fairly easy to do. I just need to go into the file node for the displacement map, scroll down to the Color Balance section and what I need to do is adjust the Alpha Gain. So the Alpha Gain is, kind of, like the volume knob for the displacement map. Now what it actually does is the displacement texture, if you look in the Hypershade, is connected. The file texture is connected to the displacement node using the outAlpha. So the Alpha Gain is a volume knob for this outAlpha connection.
So right now, it's set to 1. Let's pull this down a lot. Let's try 0.1 and render the region again. So this is what we get with a value 0.1. It's a little bit extreme. Now we're in the realm of monster truck tires. So I want to cut that in half again to 0.05. I'm guessing that's going to do the job. There we go. Here is nice displaced tire tread. Now as you, no doubt noticed, displacements maps do take a long time to render.
So you must use them with caution, and use them sparingly, because they will add a lot to render times, because the geometries is actually being displaced. So be careful how you use them. As a general rule, I like to use displacement map for a very large surface changes. Things like this tread, or the logo. Then, I'll combine that by also adding a bump map into the shading network to create more high frequency detail like little tiny bumps on the surface of the tire. But that's the basic workflow for displacement maps. I'll do a final render of the entire car so we can see both tires displaced.
Okay, there is our final render of the car with the displaced tires. You can see we have a nice start going here for creating some really cool effects and some realistic detail. The challenge of course is to continue working with the shading network, and see how much more realism you can get into it by combining things like file textures, and other aspects of the mia_ shader network.
There are currently no FAQs about Creating Textures and Shaders in Maya.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.