CS32 W11 Homework 3: Due MONDAY, APRIL 18 Now let s put the ball in a world of your making and have some fun. Create a simple AND WE MEAN SIMPLE environment for one of your ball bounces. You will assign materials to the objects, add color and simple texture, then place cameras and lights. In this project you will learn, (1) about materials and shaders in Maya, (2) basics on procedural and file textures, (3) basic lighting concepts, (4) how to add shadows, (5) some very simple modeling, (6) how to set up a camera, (7) rendering basics. DUE Monday, April 18th What you will turn in: Turn in a QuickTime (.mov) file of you RENDERED animation. This movie will be compressed. Details on how to render a scene and which compression to use will be provided this week in a tutorial. Turn your movie file into the homework folder on the server called Lights, Camera, Action. Be sure to save a copy of your project file in your home directory (on the server use fetch).
Materials: Let s start by giving your ball a material and color. In Maya, shading is the term for applying colors and textures. Step one is to decide upon the characteristics of the animated object. Is it made of plastic? Metal? Glass? What color is it? Transparent? Translucent? Does it have a smooth and shiny surface, or is it dull? Simply put, a shader defines an object s look. The tools for assigning materials and textures reside primarily in the Hypershade and Attribute editors. A material is a description of an object s surface that is used by Maya to render. There are five basic options for materials: Anastropic, Blinn, Lambert, Phong and Phong E Except for Lambert, the main difference between these materials is the way light bounces off them. The highlights you see on an object are actually the reflection of the lighting source. Since it would be very computationally costly to do this the right way in Maya, another method has been created. In this method, shiny spots are created on surfaces automatically, with the spots corresponding to the positions of lights in your scene. Picking a shader that corresponds closely to the type of material you are trying to simulate is very important. Blinn tends to have soft highlights Phongs and Phong E s have more concentrated, high-contrast highlights, very reflective and glossy looking. Anastropic is used for surfaces that require a highlight that is broken up by grooves in the surface (hair, the underside of a CD, brushed metal, for example). Anastropic is defined as having properties that differ according to direction. This creates a specular highlight that is uneven across the surface, changing according to the direction you specify. Lambert has no highlight and is used for a dull, non-reflective surface. Layered shaders allow the stacking of shaders to create complex shading effects. This is good for objects made of different materials, such as a bottle with a paper label or applying dirt to an aged surface. This makes it possible to save computer power by eliminating the need to create a separate geometry for different each material. Layered shaders are controlled by using transparency maps, stacking them from left to right in the Attribute Editor (the left layer is the topmost layer). Ramped shaders apply a texture that is a gradient. Ramps create a smooth transition between colors and can even be used to control particles. When used as a texture, it is applied to any attribute of a shader to created graduated colors or transparency, increasing glow effects, etc. Ramp shaders can also be
applied as a self-contained shader node that automatically has several shader nodes attached to its attributes. It is a simplified editing environment for the shader because all the colors and handles are accessible through the Ramp shader s own Attribute Editor. You apply a material to you object: RMB click on the object and then select Material > Assign new Material (or existing material) Another way to apply shaders, is in the Hypershade window. Window > Rendering Editors > Hypershade In the left column of that window, you will see a list of Maya shading nodes. The first section has the Surface nodes described above. Shader Attributes: Shaders are composed of nodes just like other Maya objects. Within these nodes, attributes define define what shaders do. Color: An RGB or HSV value that defines what color the shader is when it receives a neutral color light. Transparency: The higher the transparency value, the less opaque and more see-through the object becomes (can have color). Ambient Color: This color affects the color attribute of the shader as more ambient light is created in the scene. Ambient color tends to flatten an object because Ambient Color evenly colors the object.
Cameras You can create a camera that will follow an object or that can be animated. The best way to do this is to create a camera that has an aim control. 1. From the Create menu, select Cameras > Camera and Aim 2. A new camera appears in the Perspective view. The dot in front of the camera is the aim. 3. From the window menu, select Hypergraph. You can see the nodes associated with the camera group. 4. From the Hypergraph, select the group node of the camera (probably called camera1_group). 5. Move the camera around. The aim and camera move together. 6. In the Perspective view, select and then move the aim. The Camera remains aimed at the dot. 7. In the Perspective view, select and then move the camera. The camera moves but continues to point at the aim. 8. Animating the camera is just like animating anything else. You select it, keyframe it, move to another frame, move the camera, keyframe it again,etc. 9. Be sure you are looking at the view through the camera you are animating! You can use tumble, track and dolly just as you did with the perspective view, to move the camera and set the shot up. To make the aim follow an object: 1. Select the object you want the camera to follow. (if you want to test it on a test shot, create a nurb sphere. Keyframe it at frame 1, move it in frame 30 and keyframe it again to create a simple animation. 2. From the Create menu, select Cameras > Camera and Aim 3. Select and move the aim of the camera to the center of the sphere 4. With the aim still selected, shift-select the sphere (so that both are selected at once). Press p to parent the aim to the sphere (or go to Edit > Parent in the menu). 5. Rewind to the beginning of the animation and play it. The camera will follow the sphere. If you look through the camera, you will see that the sphere is centered in the camera at all times. Creating an Image Plane Image planes are a component of the camera that remains in the background of the view no matter where the camera is moved. It can be
used to create a template for modeling or it can be used to place a backdrop in a scene for rendering. 1. From the View menu of the Perspective view, select Image Plane > Import Image. 2. An Open dialog box appears. 3. Browse for your image and click open. The image now appears on the image plane. 4. To move the image around, you must set the pick mask to Select by Component Type and select the Miscellaneous icon (the question mark). 5. Once you have selected the image plane, you can move it by changing the Center x.y. and z settings in the Channel box. You can delete it by pressing delete. 6. A quick way to hide an image plane is to uncheck the Cameras from the Show menu of the view pane you are in. Since the image plane is a component of the camera and you are hiding the camera, the image plane is also hidden.
Rendering Rendering is how you output completed images. In this course, we output them as a sequence of images that are put together into a movie (using Quicktime). The main window for setting the option is the Render Settings window. FIRST. MAKE SURE YOUR PROJECT IS SET CORRECTLY! YOU SHOULD SEE SOMETHING LIKE: Users/imac/documents/maya/projects/your project name/scenes/your scene name ALONG THE TOP OF THE MAYA WINDOW AND IN THE RENDER SETTINGS WINDOW. IF YOU DON T.GO TO FILE>PROJECTS>SET AND SELECT THE CORRECT PROJECT FOLDER. How you set your options depends on what you are outputting to. 640X480 is good for this class. The higher the resolution, the longer each frame takes to render. 1. Make sure you are in the Render Module. Open the Render Settings window. Click on the icon, or, go to Windows > Render Editors > Render Settings. The Render Settings window opens. 2. Click on the Common Tab to open the common settings 3. Click the triangle next to Image File Output to expand the options (if it isn t already expanded) 4. In the File Name Prefix field, type a file name for the render 5. In the image Format selection field, choose jpeg 6. The Frame/Animation ext: changes to name.#.ext 7. The Compression button becomes active. Click on it. 8. Set the Start and end frames of your animation. This should be set to the range of time you want to render. 9. Under Renderable Cameras, choose the camera you want to render with for the frames you ve selected. 10. You don t need a Depth Channel right now. 11. Under Resolution, click the arrow to expand the options (if it isn t already expanded). From the Presets menu choose the resolution you want. 640-480. 12. Maintain Aspect Ratio 13. Enable Default Lights should be un-checked Click the Maya Software render tab. 1. Under quality, choose Production Quality 2. Under Edge Anti-aliasing, choose Highest Quality. 3. Under Field Options choose Frames
4. If you are using Raytracing, set the quality here. 5. If you are using Motion Blur, set it up here 6. Under Render Options, make sure you have Enable Depth Maps set if you are using Depth Map shadows and Shadows Obey Light Linking should be checked. 7. Click Close.
You are ready to render. In the menu, go to Render > Batch Render. The Render begins. If you click on the Script Editor icon in the lower right corner of the interface you can watch the progress of the render. To view the render: From the Render menu, select Render > Show Batch Render Your image sequence will be saved in the images folder for your project. To open the images and turn them into a movie, open Quicktime.
Go to File>Open Image Sequence Select the first image in the sequence. Choose the frame rate you want (24 or 30 frames per second, depending on what you set your playback rate to in Maya). To save your movie, you can either go to File>Save Scene As and Choose Self- Contained Movie, or go to File>Export. Choose Movie to Quicktime Move. Select Options and make sure compression is set to H264. Be sure your name is in the movie file name. Save. Other options for rendering: Hardware Rendering: Hardware Rendering is an option between playblasting and Software rendering. It is essentially a series of screen snapshots. It is a bit
better than playblasting because it can anti-alias the edges, create motion blur, create an alpha channel so you can composite better. Like playblasts, you will not have shadows, reflections, refractions, or special effects. About Raytracing: Raytracing is a way to get more believable reflections and refractions. It is significantly slower than using depth map shadows. To create reflections: Reflections happen when the light rays are bouncing off one surface and then bouncing off another surface and then bouncing into your eye or the camera lens. 1. Create a scene with a large plane, a sphere and many cubes and some lights. 2. For the cubes, assign a red Phong material and for the sphere, assign a reflective Phong material. Frame the sphere in the perspective view. 3. Open the Render Settings window and set it to use Maya Software to render. 4. Set everything as before. Be sure you are in Production Quality. 5. Under Raytracing Quality, click the arrow to expand the options window. 6. Select Raytracing to activate it. 7. Render it. Note: Objects can be visible or invisible in reflections. To change an object s reflection state, select the object and open the Attribute Editor, expand the Render Stats section, and uncheck Visible in Reflections to make the object not visible in reflections! To create refractions: Refractions are the bending of light as it travels through a dense, transparent material such as glass or liquid. Without it, glass doesn t look real. You can set the amount of bending the light does as it passes through the surface. 1. Using the scene from above, select the sphere. 2. Click on the Graph Materials on Selected Items in the Hypershade. The material for the sphere appears in the work area of the Hypershade. 3. Double click the Phong material assigned to the sphere. The Attribute Editor opens 4. Drag the Transparency slider all the way to the right. The color field next to transparency becomes white. 5. Scroll down in the Attribute Editor and click the arrow next to Raytrace Options to expand the window. 6. Select Refractions 7. Change Refractive Index to 1.333
8. Click the Render button. The sphere refracts the light, which causes the objects seen through it to appear warped. 9. As with reflections, you can make objects visible or invisible in refractions under the Render Stats section of the Attribute Editor. Mental Ray is like the Maya Renderer but it has more advanced features. If you want to play around with it, feel free. The main advantages to Mental Ray are the ability to create Caustics and Global Illumination. Feel free to look into this more.