Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design

Maya 4.5 Materials

This chapter is from the book

This chapter is from the book

Adding Basic Materials to Your House

In Chapters 5, "NURBS Modeling Basics," and 6, "More NURBS Modeling," you created a house with NURBS modeling techniques. In this section, you'll texture the house by following the tutorials to add materials for the doors, windows, and so forth.

Setting Up Default Lights

Before you start adding textures, you need to add some lights to the scene from various angles so that your test renderings while working on materials give you an accurate view of the fully lit house. To ease the process, we've created a MELscript that adds three Spot lights to your scene:

  1. Start by opening the Script Editor (hotkey: Shift+S).

On the CD

Chapter_08\movies\ch08tut02.wmv

  1. In the Chapter_08 folder on the Maya Fundamentals CD-ROM, you'll find the script file ch08Lights.mel. Open this file in the Script Editor (File | Open Script).

  2. At the bottom of the Script Editor, you'll see some text, which is the command set you want to run. Click to get a cursor at the bottom of this command set. To run this script, press Ctrl+Enter.

On the CD

Chapter_08\ch08Lights.mel

  1. Open the Outliner (hotkey: Shift+O). You'll see three Spot lights listed. With some lights in the scene, now you're ready to begin creating and applying materials to the house.

Tutorial: Materials for Your House

You should load the file noted below the CD icon from the Maya 4.5 Fundamentals CD-ROM. If you use your own ending scene file from the previous chapter, the results might vary.

On the CD

Chapter_08\ch08tut02begin.mb

  1. To work more efficiently in this tutorial, switch to the saved layout corresponding to materials and rendering (Panels | Saved Layouts | Hypershade/Render/Persp). The viewports should now be replaced with Hypershade, the Render View window, and Perspective view. If you had one of the views open as a floating window, the viewport ignores that particular window in the layout and leaves the floating window available.

  2. For the doorknob's texture, you'll create a brushed metal with a worn look. First, hide all the layers in the scene, except for the DoorL layer, by clicking the "V" (for visibility) next to the layer names. If there are other objects, such as cameras or deformers, you can hide them by disabling them in the view (Hotbox | Show | Cameras, Deformers). Orbit and zoom to the DoorKnob object in the Perspective view; this is the doorknob on the outside of the house.

  3. The preliminary material for the doorknob is identical to the metal you created earlier in this chapter in the "Creating Solid Materials" tutorial, so follow Steps 8–10 to create a gold metal material and change the material name to DoorKnob-Blinn.

NOTE

When you use a hyphen (-) between words in filenames, Maya converts it to an underscore ( _ ).

  1. Make sure the doorknob is still selected, and assign the DoorKnob_Blinn material by right-clicking the new material and choosing Assign Material to Selection. IPR render the scene in the Render View window; when it's finished, marquee-select a rectangle that surrounds the doorknob. After a few seconds, this area will render again, and IPR is now set to respond instantly to your material (see Figure 8.11).

Figure 8.11Figure 8.11 Adjusting the texture of the doorknob, using IPR rendering for quick feedback.

  1. The doorknob currently has an ugly bright yellow spot, which doesn't look realistic. To fix that, select DoorKnob_Blinn again and open the Attribute Editor. Click on the swatch for Specular Color, and in the Color Chooser, change the Value setting to 0.45. The specular color looks a little duller now.

  2. Save the scene as ch08TexturedHouse. It's a good idea to save your work frequently.

    The door is already visible, so even though you won't finish the texture right now, you can go ahead and add a material for it.

  3. For the door, you'll create another Blinn material by MMB-dragging a new Blinn material type from the Create Bar to the bottom tab panel. Name the new material Door-Blinn.

  4. Select the door object in the Perspective view. Remember that it's a NURBS cube, so after selecting one side, press the up arrow once to select the entire door.

  5. In the top tab in Hypershade, RMB-click on Door_Blinn and choose Assign Material to Selection. IPR rendering will update in the Render View window.

  6. Next, set up the material's attributes in the Attribute Editor. You're creating a wood material for the door, so select a light brown color (HSV: 40, 0.8, 0.3). Set Eccentricity to 0.5, thus increasing the size of the specular highlight, and set Specular Color to a lighter brown than the door in the Color Chooser (HSV 40, 0.4, and 0.5). Last, set Reflectivity to 0, and save your scene again. You'll see the updates in the Render View window after each change.

The next step is setting up a material for the windows in your scene:

  1. You're through with the door, so hide the DoorL layer in the Layer Editor, and then display the WindowsL layer.

  2. Create an Anisotropic material, name it Window_Anisotropic, and set its Diffuse attribute to 1. Set the color to black, the Transparency attribute to white, and under Raytrace options, check the Refractions box and set Refractive Index to 1.5.

  3. Click on the window glass object and confirm that the Channel Box lists Window_Glass. Assign Window_Anisotropic to it. Repeat for the other window's glass, and save your scene again. Notice that because the material is transparent, you can no longer see the plane representing the glass for the window. You can still select it by clicking on the area where you would normally see the plane.

To surround the window, you can add a wood trim, similar to the material you used for the door. After you create the material for the trim, you can use it for other trim on the house, such as along the porch roof or around the door. Reusing a material in this way gives your house a more realistic look—after all, the trim should match, right? This is a more efficient way to work than creating a completely new material for every element in a scene.

  1. Instead of creating a new material for the trim, you'll use one you already have. In the top Materials tab in Hypershade, select Door_Blinn. Duplicate the material (hotkey: Ctrl+d), and change its name to Trim_Blinn.

  2. Normally, you'd use the Attribute Editor to change values for the material, but this time try using the Channel Box. When a material is selected in Hypershade, its default attributes appear in the Channel Box (just as with any other object in Maya). Under Trim_Blinn in the Channel Box, change the material's color by entering values in the three text boxes for red, green, and blue: Set Color R to 0.4, Color G to 0.35, and Color B to 0.25, as shown in Figure 8.12. The material will become a darker brown, varying slightly from the original Door_Blinn.

Figure 8.12Figure 8.12 The Channel Box is an alternative to the Attribute Editor when modifying materials.

  1. Next you need to apply the material to the window's trim. Click on one of the window's Window_Frame trim that borders the window, and assign Trim_Blinn to the selection. The wood trim intersecting the window needs to have the material applied. In the Outliner, expand the Windows group. Under either window, select Window_CrossH and Window_CrossV, and assign the material to them. Do this for both windows.

  2. Now that you've finished the base materials for the windows, hide the WindowsL layer, and save the scene.

Tutorial: Creating the Remaining Base Materials

So far you've been creating a material and then immediately applying it to a designated object. That workflow method is fine when you're trying to get materials tweaked and have the details and attributes ready for specification. In this tutorial, though, you'll see how to speed up your workflow to create the rest of the base materials and assign them to the house. You need to create base materials for the following portions of the house:

On the CD

Chapter_08\movies\ch08tut03.wmv

  • Vertical porch rails

  • Horizontal porch rails

  • Outside wall

  • Outside foundation

  • Chimney base

  • Chimney pipe at top

  • Roof

On the CD

Chapter_08\ch08tut02end.mb

Because you're just creating materials, you don't need to have the other viewports visible. With the Hypershade view active, tap the spacebar to maximize it. Increasing the workspace can help improve your productivity. You can start where you left off with the preceding tutorial or load the scene from the CD-ROM.

TIP

You can also hide the UI (user interface) to further increase the workspace (Display | UI Elements | Hide UI Elements). This removes everything from the Status Bar to the Help Line. You can turn the interface back on by selecting Restore UI Elements instead of Hide UI Elements.

  1. The porch needs two separate materials for the vertical and horizontal beams on the porch. Select Trim_Blinn in the top Materials tab in Hypershade and duplicate it twice. Name Trim_Blinn1 as VertPorchRail_Blinn. Change the name of Trim_Blinn2 to HorizPorchRail_Blinn. That's all you need to do for the rails right now.

  2. The house's walls are next. Create a PhongE surface material by selecting PhongE from the Create Materials Bar. Name the new material Foundation_PhongE. The foundation will have a wet look, so PhongE is a good material to start with. Next, create a new Blinn material and name it Walls_Blinn.

  3. Open the Attribute Editor for Foundation_PhongE. Under the Common Material Attributes section, click the swatch next to Color to set the value in the Color Chooser (HSV: 65, 0.45, 0.35), and click Accept. Next, decrease Diffuse to 0.7. Continuing down to the Specular Shading section, increase Roughness to 0.810, decrease Highlight Size to 0.15, and set Reflectivity to 0. Finally, click the color swatch for Whiteness to set the value in the Color Chooser (HSV: 270, 0.010, 0.2), and click Accept.

  4. Next, select Walls_Blinn in the top Materials tab in Hypershade. In the Channel Box (press Shift+C if it's not open), set Color R to 0.9, Color G to 0.68, and Color B to 0.4. You should have a brownish-orange color for the material.

  5. Next, you'll create a Lambert material for the chimney. The chimney is made up of brick, which usually doesn't have any highlights, so Lambert is the perfect material candidate. With the new Lambert material selected (lambert2), change the name to ChimneyBase_Lambert. Then duplicate the material, naming the duplicate ChimneyPipe_Lambert. Select ChimneyBase_Lambert in the top Materials tab. Open the Attribute Editor, use the Color Chooser to set the material's color to dull red (HSV: 0, 0.6, 0.5), and click Accept. In the Attribute Editor, click on ChimneyPipe_Lambert in the Materials tab, set its Color attribute (HSV: 0, 0.4, 0.5), and click Accept.

  6. The last base material you need to create is for the roof. You haven't used a Phong material yet, and the roof would look good with a mossy wet material, so create a Phong material and name it Roof_Phong. In the Channel Box, change the material's color by setting Color R to 0.34, Color G to 0.312, and Color B to 0.102, which results in a dark brownish-green color.

  7. The Work Area bottom tab is cluttered with material nodes at this point and should be rearranged. RMB-click a blank space in the Work Area, and choose Graph | Rearrange Graph from Hypershade's menu to organize all visible materials in the Work Area.

You have now set the foundation for the materials in your scene, and can continue to apply these new materials to the corresponding objects in your scene. If you haven't saved your scene, now would be a good time because you have created quite a few materials. Your Hypershade should have all the materials shown in Figure 8.13.

Figure 8.13Figure 8.13 The base materials you will build on for the scene.

  1. Next, you'll assign the materials you've created to your scene objects. To make it easier, switch to a predefined saved layout (Hotbox | Panels | Saved Layouts | Hypershade/Outliner/Persp). The Outliner makes it easier to select specific components, and having it open in a viewport eliminates clutter. In Hypershade, click the Show Top Tabs Only button (refer back to Figure 8.1 to see where this button is) because you don't need to see the Work Area now. For more space, hide the Create Bar by clicking the Show/Hide Create Bar button. Last, hide the UI elements in the scene (Hotbox | Display | UI Elements | Hide UI Elements). Keep the Channel Box visible (hotkey: Shift+C) so that you can easily work with the layers in the house. Your interface should now be set up to efficiently assign the remaining materials to objects (see Figure 8.14).

  2. In the Outliner, all the scene elements are grouped under Old_House. Display all the layers in the scene. To assign a material to the house's outer walls, in the Outliner, select OuterWall and assign Walls_Blinn. You should see the green wireframe of the outer walls, indicating that they're selected. In Hypershade, RMB-click on Walls_Blinn and choose Assign Material to Selection. With the Perspective view active, press 7 to make sure textures are hardware-rendered for viewing and lighting.

  3. Select Foundation in the Outliner. RMB-click on Foundation_PhongE and choose Assign Material to Selection. The outer walls of the house now have their base material assigned.

  4. Select Chimney, and assign ChimneyBase_Lambert to it. Under the Chimney group in the Outliner, select Chimney_Top and assign ChimneyPipe_Lambert. Even though the material for the chimney's base had been assigned to the pipe, it had no affect on new materials being applied, which immediately override the object's existing material.

Figure 8.14Figure 8.14 By using Hypershade, the Outliner, and Perspective view, you can easily assign materials to objects in your scene.

  1. Expand the Roof group in the Outliner. Under RoofSide, select RoofSlab, and assign Trim_Blinn to it. Shingles should also be located in this group. Assign Roof_Phong to Shingles. Next, assign Trim_Blinn to RoofSlab in RoofSide1 and Roof_Phong to the Shingles in RoofSide1.

  2. Close the topmost Roof parent in the Outliner. Hide the RoofL layer and save your scene.

  3. The final base materials need to be assigned to the porch before you're ready to move on to texture mapping. Using the Outliner, select the three box objects that make the trim of the porch floor and assign Trim_Blinn to them. Select the horizontal parts of the porch rails, along with the stairs and the porch floor, and assign HorizPorchRail_Blinn to these. Now select the vertical elements of the porch, including the poles, the porch legs, and rail bars, and assign VertPorchRail_Blinn to these.

  4. You have finished applying base materials to objects in your scene; in the following section, you'll learn how to add more detail to your textures. Hide the PorchL layer, and save your scene as usual.

If you got stuck in this tutorial, load the file ch08tut03end.mb, which contains the finished scene for this tutorial.

On the CD

Chapter_08\ch08tut03end.mb

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020