Applying Shaders and Materials - Part 1

Uploaded by MayaHowTos on 06.06.2011

In a graphics pipeline, rendering is often the last major step before you’re ready to show off your work.
Rendering allows you to greatly increase the fidelity of your working scene with effects, such as shaders and materials.
A material is the name we give to a shader whose settings mimic the appearance of real life surfaces,
particularly the way they react to light.
Such details might include the color, shininess, smoothness, and many more.
We can then apply these materials to our geometry to make the surfaces look more believable.
As you can see, our guitar is currently shaded with a bland grey material.
This is the material Maya applies to all objects by default.
Let’s start by differentiating the pick guard by making it white.
Select the pick guard and open the Attribute Editor.
Go to the “lambert1” tab. “Lambert” refers to the type of shader currently applied to the object.
Change the color to a light shade of grey.
Well, that’s the color we wanted, but we’ve inexplicably changed the color of every single object in the scene.
This is because everything is sharing the default shader right now.
In general we should avoid changing the default shader.
We’ll do this by making a new shader for our pick guard.
Undo the previous step.
Select the pick guard, hold the right-mouse button over it and select Assign New Material from the menu that appears.
Maya displays the Assign New Material window.
From here we can assign various different shader types, each with specific attributes and uses.
Select Lambert to create a new Lambert shader.
Change the color to the same tone of grey as before.
Now rename the material to “Pick_guard_MAT”
You now have your first material.
Now let’s create a material for the metal portions of the guitar.
Select the input jack and assign another new material.
Unlike the pick guard, this time we’re going to assign a Blinn Shader.
Blinn is a good default material for metal since it features a highlight
known as the specular shading, that mimics metal’s natural sheen.
Leave the color as the default grey.
Now let’s tweak the specular shading to make the sheen more metal-like.
Specularity refers to the mirror-like reflection of light on a surface.
The intensity of the specularity depends on how well a surface bounces rays of light versus absorbing them.
Set the Specular Color to a light shade of grey.
Notice the swatch changes to reflect your current settings.
You can play with the Eccentricity, Specular Roll Off, and Reflectivity to change the shininess of the metal if you want.
The eccentricity affects the highlight of your material. The lower it is, the more intensely focused the highlight will be.
The Reflectivity and Specular Roll Off controls how much of the environment will be reflected in the material.
High reflectivity and roll off means other objects will reflect cleanly in it, in all directions.
It should also be noted that there are many more ways to create metallic shaders with varying levels of fidelity,
but in this tutorial we’ll keep the focus on a basic understanding of the core concept.
Rename this Blinn material to “Metal_MAT.”
Now select every other piece of the guitar that should be metal.
Right-click the guitar and select “Apply Existing Material,” then select Metal_MAT.
Now if you frame your scene, you can preview the render by clicking the Render Current Frame button.
Notice that the blinn metal is shinier than the lambert parts of the body, despite sharing the same default grey.
Right now we’re rendering this using the Maya Software renderer.
The scene may render slightly differently depending on the type of renderer you choose to use,
so always keep your renderer in mind when performing these tests.
Now you’re finished with all the metal parts.
Note that all these metal parts now reference the same shader.
If you wanted to change the look of the metal, you can simply select any of these parts, make your changes,
and those changes will be applied to all the metal parts at once.
Now let’s move on to the head and neck.
On a real guitar, both these parts would be made of wood. Unlike metal, this will require some texture.
Open the Hypershade. This window shows all the current shaders in your scene.
It is also your visual guide to creating and editing your own shader networks.
Let’s create a substance material. Substance materials are preset to resemble certain real-life materials.
Select 2D textures from the left column and then click the Substance button.
If you don’t see a Substance button, go to the Plug-in Manager and make sure the Substance.mll file is loaded.
A tile appears in the Work Area region of the Hypershade.
The Work Area is the area where we can work with our shaders, creating inputs and outputs for them.
You’ll see an example of this in a moment.
Now in the Attribute Editor, click the folder icon next to Substance File.
We’re going to load a preset that resembles wood.
Navigate to the substance folder and select the “Light_Wood” file.
You can also find this file, along with various other substances, in the Maya local install directory.
Now the swatch updates to a nice wood material.
In order to actually make this substance material usable, we need to create the associated shader network.
Click the Create Shader Network button.
In the Work Area of the Hypershade, notice that the single tile suddenly turns into a complex network of different tiles.
This is called a shader network.
Each arrow represents a connection in which certain attributes are driven by attributes of another tile.
We’ll look at this in more depth in the next video. For now, click the green tile and rename the shader to “Wood_MAT.”
Now apply the wood material to the head and neck.
Turn on the textured view to see the wood in the viewport
And click the Render Current Frame button to see what it looks like rendered.
Although they look pretty close, you'll notice that the rendered version looks a little more polished.
In general, the limitations of the viewport will often result in differences between it and your final render.
In the Hypershade, hold the right-mouse button over Wood_MAT
and select Graph Network to view the substance material’s shader network.
By selecting the substance tile in the Hypershade,
we can adjust some of the wood’s properties in the Substance Parameters section of the Attribute Editor.
Let’s lower the Depth to -1, and the Normal to 0.1 so that the grains aren’t quite so deep.
If we render the scene one more time, we can see that the wood looks more processed now.
In the next video, we’ll give the body some life with a dazzling paint job.