Monday, November 30, 2009

MAYA Tutorial - Texturing and Shading

Materials are a critical part of creating attractive images and animation in a 3D program. Materials interact with lights, so lighting drives some material choices; for example, if your overall lighting is bright, you might need to make your scene materials somewhat more matte and light absorbing so that they don't blow out when hit by bright lights.
What do we mean by "materials"? It's a catch-all term to describe all aspects of what a surface looks like. At first glance, beginners usually notice the surface color—red, wood brown, metallic silver. To an artist, however, there are many other factors: An object isn't just metallic silver, for example—it's a mirrored smooth finish that relies on the reflected surroundings for its appearance. In addition to factors of color, shine, and reflection, Maya also considers transparency, incandescence, translucency, refraction, bumpiness, and many other user-controlled parameters. Attention to these details gives your rendered results more subtlety and complexity.
Hypershade
Maya's Hypershade is one of the first and most important areas you should take the time to explore. It provides a quick and easy way to create,edit, and connect rendering nodes, such as textures, materials, lights, rendering utilities and special effects.
Hypershade uses a free-form approach to material design. Swatches connect to one another to create effects; for example, a brick image might connect to the Bump attribute of a material to create bumps in the pattern of bricks. Hypershade also doubles as a kind of browser so that you can view and select existing scene lights, cameras, materials, and other elements.
To open Hypershade, choose Window > Rendering Editors > Hypershade (hotkey: Alt+h).

Fig 5-1 Hypershade
Hypershade displays each node as an icon, sometimes called a swatch, that represents the characteristics of the node. When you edit a node's attributes or assign textures or special effects, that swatch updates in hypershade.

Create Bar

At the left is the Create Bar, which displays all the material types you can create for a selected category. Simply click on a type to create that item in the Work Area. To select a category, click the down arrow on the Create Bar; the options are Materials, Textures, Lights, Utilities, and All Nodes.

Tab Panels

The top tab shows existing materials, and the bottom tab is used to create and edit materials. After you become familiar with Hypershade, you can customize the tabs to your liking and even add Work Area tabs to simultaneously edit several materials.

Top Tab

This area displays all the elements that are already part of the current scene file in these tabs: Materials, Textures, Utilities, Lights, Cameras, and Projects. In this tab, you can duplicate, edit, select objects assigned to shading groups, link lights, import and export materials, and a number of other functions

Bottom Tab

This area is usually used as the Work Area—the assembly point for new materials.

Basic Material Types

Lambert

Lambert is a flat material type that yields a smooth look without specular highlights. It calculates without taking into account surface or reflectivity, which gives a matte, chalk-like appearance. Lambert material is ideal for surfaces that don't have highlights: pottery, chalk, matte paint, and so forth. By default, any newly created object is assigned the Lambert shader.

Phong

The Phong material takes into account specular reflectivity to create highlights across an object surface. The algorithm can be customized for surfaces such as plastic, porcelain, and glazed ceramic.

PhongE

PhongE is a faster rendering version of Phong that yields somewhat softer highlights than Phong.

Blinn

The Blinn material calculates highlights on surfaces similarly to Phong; however, Blinn can achieve a more accurate representation of the soft tinted highlights you see on metallic surfaces. Because Blinn is a versatile material type and doesn't cause flickering with bump maps.

Anisotropic

The Anisotropic material type stretches highlights and rotates them based on the viewer's position. Anisotropic materials are ideal for materials such as hair, feathers, brushed metal, and satin.

Ramp Shader

The Ramp Shader material consists of built-in ramp graphs to offer more advanced control and simplify the shader network.

Ocean Shader

The Ocean Shader material has several items in the shader's attributes that control how the material behaves over time, and it has graphs to add detail to the base shader. Attributes include Wave Speed, Wave Height, Wave Turbulence, and Wave Peaking.

Layered Shader

The Layered Shader lets you combine several materials to create a more complex material.

Shading Map

The Shading Map material is primarily designed to let you get a "cel" look in 3D, like typical animated cartoons.

Surface Shader

The Surface Shader is used when you want to control a material's color, transparency, and glow with something else in Maya.

Use Background

The Use Background shader cuts a "hole" in the image's alpha channel where objects with the material appear. This material is useful for combining separately rendered images in a compositing program to create the final results.
Material Settings
To edit material settings, double-click on any material in Hypershade's top or bottom tabs. Usually, you create a Blinn material in the Work Area of the bottom tab panel, and then double-click it to edit it in the Attribute Editor.
Fig 5_2 Material settings in the attribute editor
Notice the material name at the top of the Attribute Editor, which Maya sets to blinn1 for a default starting name. Maya increments the number if you create more Blinn materials. Next is the Common Material Attributes section, followed by the Specular Shading section. These two sections, displayed by default, are used the most in material editing.


Color
The default material color.

Transparency

If the transparency value is 0(black),the surface is totally opaque; if the transparency value is 1(white),the surface is totally transparent. If you change transparency from the default black ,the background of the material's hypershade swatch becomes a checked pattern .This is not a visual aid and is not rendered.

Ambient Color

Uses Black by default. As the ambient color becomes lighter, it affect's the material's color by lightening it and blending the two colors.

Incandescence

The color and the brightness of light that a material appears to be emitting. The default color value is 0.

Bump Mapping

Makes the surface appear more rough or bumpy by altering surface normals according to the intensity of the pixels in the bump map texture. A bump map does not actually alter the surface.

Diffuse

Gives the material ability to reflect light in all directions. The diffuse value acts like a scaling factor applied to the color setting-the higher the diffuse value, the closer the actual surface is to the color setting.

Translucence

Gives the material the ability to transmit and diffuse light. Light falling on a translucent surface is first absorbed beneath the surface and then diffused in all directions. The slider range is 0 to 1.
Surface Material Attributes

Specular color

The color of shiny highlights on the surface. A black specular color produces no surface highlights. The default color value is 0.5.

Reflectivity

Gives the surface the ability to reflect its surroundings or the reflected color. The default color value is 0.5.

Reflected color

Represents the color of light reflected from the material. This can be used to tint a reflection.

Surface Material


Fig 5-3 Surface Materials

Anisotropic

Represents surfaces with grooves, such as cd or feathers etc. Anisotropic material (such as Phong or Blinn)reflects specular light identically in all directions.If you spin an isotropic sphere, its specular highlight remains still.

Roughness

Determines the overall roughness of the surface. The range is 0.01 to 1.0.The default is 0.7.Smaller values correspond to smoother surfaces and the specular highlights are more concentrated.

Fresnel Index

A fresnel is a flat lens consisting of a number of concentric rings that reduces spherical abnormalities. The Fresnel index for water is 1.33.Value range from 1.0 to 20.0.

Anisotropic Reflectivity

If on, Maya automatically calculates Reflectivity as a fraction of roughness. Reflectivity is on by default.
Blinn Attributes
Color The base color of the surface.
Transparency Adjusts the surface opacity. You can use colors to create a tinted glass effect.
Ambient Color Adds to and blends with the color value.
Incandescence A simulation of emitted light. At low values, it tints and self-illuminates the material, and at high values, it overtakes the material's color and becomes self-illuminated.
Diffuse By default, it's set to 0.8, which dulls down the color value you've set.
Translucence A special effect in which light is absorbed and scattered as it passes through an object, useful for simulating materials such as frosted glass.
Translucence Focus Controls how light scatters from the surface.
Eccentricity The width of the highlight, simulating how polished or rough the surface appears.
Specular Roll Off The brightness/intensity of the highlight.
Specular Color The color of the highlight; usually set to white or a gray value.
Reflectivity The strength of reflections on the object. Reflections can be raytraced or use texture maps.
Reflected Color For Blinn, the color swatch and slider have no effect. However, when a texture map is applied, it appears to be reflected by the material.
Lambert
Represents matte surface(such as chalk,matte paint,unpolished surfaces) with no specular highlights. The initial shading group uses a lambert material.
Layered Shader Attributes
Represents a single surface material composed of several different surface materials layered on top of one another.
Transparency
By default the material is semi-transparent.

Compositing Flag

Composites the layers using a layered shader or layered texture mode.

Hardware color

Helps you distinguish the objects assigned to a layered shader in the views.
Phong Attributes
Represents glassy or glossy surfaces with a hard specular highlight.

Cosine power

This feature is available to the phong material. Controls the size of shiny highlights on the surface. The default value is 20.
Phong E Attributes
A simpler version of the phong material. The specular highlights on the Phong E surfaces are softer than those on Phong Surfaces and Phong E surfaces render faster than Phong surfaces.

Roughness

Controls the specularity focus.

Highlight Size

Controls the amount of specular highlight.

Whiteness

Controls the specular highlight color. The default value is white. You can also map a texture to this value.


Shading Map Attributes
Represents a color map you apply to surfaces after they are rendered.The shading map material is useful for creating non-photorealistic effects(cartoon shading)or to highlight threshold values in a rendered image.

Shading Map Color

Defines the color of the material. The default is gray.

Shader

You can map any material to the shading Map material.
Surfaces Shader Attributes
A wrapper node, meaning you can connect any keyable attribute to this shading group and then connect the shading group to an object.

Out color

The color of the material .The default is black.

Out Transparency

The transparency of the material. The default is black.

Out Glow Color

The glow color of the material. The default is black, without glow.
Use Background
You use it to set the object's Matte channel to 1 or 0, or create a matte for shadows and reflections on the surface. This material applies the same color as the objects in the background image to stand -in-surfaces.

Attributes

Adjust the Use Background material's to the light ,shadows, reflections and the geometry placement in the scene.
Texture Mapping
Normally, a texture refers to applying a 2D image around a 3D surface, rather like wallpapering a curvy surface. Because a 2D image can be stretched, wrapped, and projected onto a surface in many different ways.

Mapping Coordinates

Mapping coordinates, also known as UV coordinates. For NURBS, parametric mapping is inherent to the surface and this is typically what's used. Parametric mapping is the 0 to 1 coordinate system that NURBS uses to map textures across its surfaces. It makes sure that the textures stay mapped to the surface like a decal, even if the geometry is deformed.
For polygon surfaces, mapping is normally applied by projecting 2D maps across the 3D surface in one of several ways: planar, cylindrical, spherical, and a special method called automatic mapping.
Fig 5-4 Mapping projection
Procedural Maps
In addition to applying an image or movie to a surface, Maya has other texture types called procedural textures. Many patterns, such as bricks, tiles, and gradients, are so repetitive that they can easily be represented by an equation. By using special forms of seemingly random values, many natural effects can be simulated mathematically: Marble, leather, water, granite, and many other complex and random textures are included with Maya as procedurals.
Maya's procedural textures come in two varieties: 2D and 3D. You can think of the 2D procedurals as a calculated form of a bitmap.When 3D procedurals are applied, however, they exist throughout 3D space, and object surfaces define where you see the texture. It's like carving the object from a block of the material.Procedural textures have several benefits. Because they are formula based, their parameters can be adjusted to instantly synthesize all kinds of different effects.
2D Procedurals
Maya's 2D procedurals can be divided into two categories: regular patterns and noise patterns. The regular patterns include Grid, Checker, Bulge, Cloth, and Ramp. With these patterns, you can create tiles, bricks, and many other man-made repeating effects. Noise patterns include Fractal, Mountain, Noise, and Water. These psuedorandom textures are excellent for creating the complex "dirty" surfaces common in nature.

3D Procedurals

All the 3D procedurals but snow are random types. Some, such as wood and marble, clearly imitate nature. However, all are excellent for synthesizing random effects.
Assigning material to surfaces
The following lists a few quick ways to assign a material to a surface.
  • In the view,select the surface to which you want to assign the material.

  • From Hypershade, MMB-drag the material swatch over the selected surfaces.
or
  • In the view ,shift-select the object to which you want to assign the material and in hypershade,click the material swatch.

  • While the cursor is over the material swatch in hypershade,RMB -click-drag to select assign material to selection from the pop-up menu.
or
  • MMB-drag and drop a Hypershade swatch onto an object in the IPR Render view.

To apply a material to several surfaces from with Hypershade

  • Select the surfaces in a view.
  • In Hypershade,RMB-click over the material swatch and select Assign material to selection from the pop-up menu.

To apply a material to a group of faces on a polygonal surface

  • Select the surface.

  • Press the RMB while over the surface,select face from the marking menu,then choose the select by component type icon.

  • Select the face you want to map.

  • While the faces are highlighted in the view, in hypershade,LMB-shift-click over the material swatch you want and press theRMB and select Assign material to selection from the pop-up menu.














Custom Search

0 comments:

Post a Comment