Thursday 22 August 2013

Hypershade Work In Maya

This tutorial teaches you how materials work, and how to create materials in Maya.
Surface Materials


These are the materials that actually define the color of your model when rendered or seen in the view port. There are a couple of different surface materials that you can choose from.

Anisotropic
Blinn
Lambert
Hair Tube Shader
Phong
Phong E
Ocean Shader
Ramp Shader
Surface Shader

These are just the basic materials that you will be using most often. Each material has different attributes to define the appearance of the material. Almost all of them will look uniquely different, even when set up with similar settings. Example: The phong, which is the shiny plastic-like material, will look much different than a lambert, a matte finish material.

Assigning Shaders/Materials To Your Model


The default material that's assigned to your model is a gray lambert connected to the initial shading group.
There are more than a couple of ways to do this, so we're going to list off the most useful ones. The attributes editor may open with the material settings loaded in it. Don't bother with it, because we'll cover editing the material setting later.
Step one - Select your model (in our case, a sphere), go to the rendering shelf.

Step two - Click on the material that you want to use. This will automatically create a material and shading group, and then connect the shading group to the selected model.
Here is another way to do it.
Undo the last steps.
Step one - Once again, select your sphere and right click on top of it, and go to assign new material>and select the material from the list. If you have mental ray loaded, your selection of materials will be larger. Once again, this will create a shading group and surface material, and assign it to the model.
Or, instead of going and creating a whole new shading group and surface shader, you can use one that's already in your scene. It might be assigned to another model and you want them both to have the same material. Right click and go to assign existing material instead.
Here is another way to do it.
Undo the last steps.
Go to window>rendering editors>hypershade.

In the create Maya node side.

Click on the material you want to create. This will add it to the work area and create a surface shader and its shading group.

Now select your model in the view port, right click on the surface material in the work area, and click assign material to selected. This will assign the material shading group to the model shape node; in other words assigning the material to the model.

Editing The Surface Materials Settings


The quickest way, to access the materials settings, is to open them in the attributes editor. The quickest way, to load the surface material attributes of the selected model into the attributes editor, is to select the model, go to the rendering shelf, and click the show shading group button. The attributes editor, by default, will open the shading group, but go to the surface material tab.

Another way to do it is to open the hypershade again and select the material in the materials section, then go to window>attributes editor.

Whichever way you chose, it will load the shaders attributes into the attributes editor. Since all materials are different, I'll cover the standard settings for almost all shaders.
Color - When you click on the color swatch, it will open the color chooser; this is the overall color of the model.
Transparency - This attribute can be gray scale (black, gray, and white), or it can be colored. The lighter the color, the more transparent it is. White is completely transparent.
Ambient Color - The ambient color is mostly affecting the color when an object is shaded on a model. It acts as a multiplier to the color.
Incandesence - Imagine this is an overall color. When editing this attribute, be careful that you don't make a shade that looks washed out when rendering. A way to prevent this is to make sure the v (value) of the color is lower than 0.1; in other words, keep this color dark.

Now we're going to see what a standard shading network looks like. First, open the hypershade (window>rendering editors>Hypershade). Go to the tab shading groups. Right click the initial shading group and select "graph network".

We can see all three of the spheres connected to the shading group. Basically, it's connecting the object groups from the shape nodes in the models to a dag set members array, stored in the shading group.
Now select the shading group and open the attributes editor. Click on the initial Shading Group tab.

We can see the surface material slot has the lambert1 surface material connected to it. You can also see this is in the hypershade.

So this takes the output of the surface material (in this case, lambert1) and connects it to the surface shader for the shading group.
Shaders don't have to be assigned to an entire object - they can be assigned to individual faces on an object. For this to work, instead of connecting a shading group to an entire model, it will create a subgroup Id it can use to connect the shading group from an array to the faces. But, unlike in the standard example, the shading group will need to send the color information back to the model for shading that particular region.
Different shaders take different amounts of time to render. A phong shader will render faster than a blinn shader.
Some shaders, such as the "surface shader", have no "shading" at all; it's just a flat-colored surface.


No comments:

Post a Comment