Shading w/ Maya

This lab will familiarize you with the concept of shaders within Maya. As discussed in lecture, shaders are programs which control how geometry is rendered. By binding data to the inputs of these shaders, we can create a wide variety of materials.

For this assignment you should:

  1. Complete Lessons 1 and 2 of the Maya rendering tutorials. You can find these tutorials by going to Help > Tutorials in the menu and then under Learning Resources > Tutorials > Getting Started with Maya > Rendering. All required assets can be found in /usr/autodesk/maya/GettingStarted/.

  2. Create your own model (can be the model created in previous lab) and apply various materials. You should use each of the following shaders at least once: Lambert, Blinn, and Phong.

    Below is an example of an ice cream cone created with the required shaders (top scoop to bottom cone: Lambert, Phong, Blinn, and Lambert)

  3. Add some form of texture input to one or more of the shaders. Below: The top scoop of ice cream has a marble texture applied to color channel of the Lambert shader. Both the middle and bottom scoops have a noise texture applied to the bump-mapping channel of their respective shaders to create the appearance of a rough surface.

Extra credit (5 pts): Image Textures and OpenGL

  1. Download the starter code here. This code contains the functions needed to load PNG images and read the Wavefront OBJ mesh format that Maya can export.

  2. Map an image-texture to the surface of the object. You can generate your texture within Maya by using the paint tools. Lessons 1 and 2 of the Polygon Texturing section of the tutorials should be helpful.

  3. Export the object and materials from Maya as a Wavefront OBJ (Note: There are limitations on the types of materials which can be exported; you are restricted to image textures only) You will need to enable the OBJ exporter plugin in Windows > Setting/Preferences > Plug-in Manager.

  4. Load the model into OpenGL using the OBJ loader. You will need to copy over the exported .obj, .mtl files, and all image textures (must be RGB/RGBA PNG format), to the viewer code directory.