Creating Your Own Material Libraries


You can build your own material libraries in Maya, but doing so takes a few steps. First, create a new tab in Hypershade by choosing Tabs | Create New Tab on Hypershade's menu. Name the new tab, and select the Bottom radio button for Initial Placement and the Disk radio button for Tab Type (see Figure 16.20). Point the Root Directory text box to the folder where you're collecting your materials, and click the Create button. Set the tab to this newly created folder, and you should see a set of Maya icons, one for each material file. Normally, you want one shader stored in each .ma or .mb file in this folder.

Figure 16.20. Adding a material library tab to Hypershade.

graphics/16fig20.jpg

Next, you replace those Maya icons with swatches of the rendered material. To do this, you have to actually render an IFF sample image file of the shader. You might want to make up a sample scene file.

Usually, you render a small (typically 200x200) pixel sample. After you render and save this IFF file, you need to rename it with the same name as the shader file, but with the suffix .swatch. So if your shader file is called darkwood.ma, your swatch is renamed from darkwood.iff to darkwood.ma.swatch. Then, you copy this file to the .MayaSwatches folder directly under the folder containing the shader files. If none exists, you can copy and paste a folder of this name from one of the AW\Maya\brushes\ folders, and then delete the contents of the duplicated folder. Windows doesn't let you directly create a folder with this name. When you reference the shader file in the tab, you'll see the swatch. You can then MMB-drag the swatch to the upper tabs so that the shader is ready to apply to a scene object.



Maya 5 Fundamentals
Maya 4.5 Fundamentals
ISBN: 0735713278
EAN: 2147483647
Year: 2006
Pages: 198

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net