Project 7: Character Animation, Rendering, and Production Conventions

Goal

In this assignment you will be animating a 5-10 second short using the Mouse rig. The animation can be of anything so long as the mouse is interacting with an object. This assignment is designed to help prepare you for production in the following ways:

Deadlines

This assignment will take longer than a week. Here we specify checkpoints you should meet as the quarter progresses:

Prerequisite Exercises

Download mouse_rig.ma and scene_cove.ma and optionally ball_rig.ma

Preliminary Convention Notes:

  1. Install Production shelves:

    • Simply navigate to the following directory O:\unix\projects\instr\production1\cse458_au12_turn_in\project_7
    • Double click on install_capstone_shelves.py, maya_script_path.bat, and python_path.bat individually.
    • Next time you open Maya you should see a Production and Tractor shelf

  2. Create production directories

      In your turnin fold you will create a hierarchy of directories very similar to what will be used in production. The directory structure looks like this:

      • turn_in with your name

        • reference
          • lighting
          • motion

        • models
          • props
            • [propname]
              • [propname].ma
          • set
            • scene_cove
              • scene_cove.ma

        • textures
            • [prop names]
              • [prop_names_texture_description]

        • rigs
          • characters
            • mouse
              • mouse_rig.ma

        • shots
          • shot_100
            • motion
              • shot_100_motion.ma
            • lighting
              • shot_100_lighting.ma
            • renders
              • [directories created from rendering]
            • shot_100.aep (After Effects project)
            • shot_100.mov (final rendered/composited video)

  3. Prepare set for referencing

    1. Open scene_cove.ma.
    2. Select scene_cove in the Outliner.
    3. Got to Assets -> Create Asset with Transform (Options).
    4. Under Include these inputs make sure All Inputs is checked.
    5. Also check Include Shading Network and then hit Apply and Close
    6. This creates an asset parent node in which anything related to the cove object is encapsulated beneath the asset node. This asset node lets us delegate the types of controls available for this object. Thus, when referencing the object in a shot file, many attributes and controls that are not needed down the pipeline are hidden a way. This means that the object can only be used in only defined ways to avoid changes that could break referencing structures. By default, an Asset will always let you Translate, Rotate, and Scale the encapsulated object. However, there will be times when you need to delegate more controls. This is done by Publishing selected attributes.

    7. In the Outliner, expand the created asset and select scene_cove.
    8. In the Channel Box, under Inputs of the scene_cove look for the Visibility attribute.
    9. Select and then Ctrl + Right click on the word Visibility and choose Publish Asset. You will see it be added to the section above Inputs. You have now created an additional attribute that can be used with this asset.
    10. At the moment, you could still easily make undesired changes to this Asset. We are going to Black Box this asset to protect the scene so that only the default attributes and the additional Published attribute can be modified.

    11. First will make it so the geometry cannot be edited. To do this select scene_cove under the asset in the Outliner and select all its vertices. In the Channel Box, expand CVs. Shift click the first vertex (labeled 0) and scroll down and shift select the last vertex. With all of them selected, Right Click -> Lock Selected. If you need to go back and edit the geometry simply repeat this process but choose Unlock Selected instead.
    12. Select the asset and open the Attribute Editor. It should be called scene_cove_AST.
    13. Expand Asset Attributes and check Black Box. In the Outliner, you will no longer be able to view its children and you should only see the Transformation and Visibility attributes.
      • If you need to change the scene_cove, simply go the attributes for the asset and uncheck Black Box. Be sure to check it again once done making changes.
    14. Since this is our set, it should be never be transformed in a shot file so select Translate, Rotate, and Scale and right click to Lock and Hide Selected.
    15. We also wont need to have the Visibility keyed so right click the attribute and choose Make Selected Nonkeyable. This will allow you to hide the set if it gets in the way of your camera.
    16. When referencing set pieces and other files into your shot file, it can be tempting to change a shader. It may seem harmless, but this essentially stops the reference from updating when the original file gets update causing you to have to re-referencing the asset, which could break any motion already done on the object.

    17. Make sure scene_cove.ma is in models/set/scene_cove/.

  4. Create props and prepare for referencing

      If your animation requires a custom prop, follow these steps. If you are using the ball rig place it under rigs/props/ball_rig/ball_rig.ma. Do not follow the steps bellow if you are using the ball rig, but please read the steps as these steps will be used in production.

    1. Create the prop and its textures and shaders. Be sure to create it at the origin of the scene file. If your prop consists of multiple meshes, combine them; or if that's not applicable, group them. There should only be one top level node in the Outliner besides the default objects. The pivot point for that top level node should be the origin of the scene file. Make sure that the top level node is named after the prop and save the file as a Maya Ascii(.ma) with same prop name as the top level node in the Outliner. Make sure this file is the folder models/props/[propname]/.
    2. Freeze transformations on your top level node.
    3. Lock all the vertices as done in the previous step.
    4. Once done, select the top level node and create an Asset. The defaults should be fine, but you can Publish any attributes that you may need. Black Box the Asset.
    5. Additionally, if you need texture files for your shaders; create a folder with the name of the prop in the textures directory. Save your images that your shaders will reference in this spot for the desired prop. Your prop file should only reference PNG images. You may, however, have a PSD file in here so you can edit the textures. Just always save out a PNG for Maya to use. The PSD and PNG file for the same texture should have the same name minus the different file extension. Naming conventions for texturers to use: [propname]_[texturedescriptor].png and is put under textures/[propname]/.
    6. In Maya, shaders should be named as such: [propname]_[descriptor]_shader. Descriptors should be used only if your prop requires multiple shaders. So for a single shader applied to prop named ball, its shader name would be ball_shader. However, if you had a hammer prop with a shader for its head and one for its handle, the shader for the handle would be hammer_handle_shader.
    7. Name texture nodes as such: [shadername minus the _shader postfix]_[attribute]_[nodetype]. For example, if you had a texture affecting the color attribute of the shader for the hammer handle, name the file node hammer_handle_color_file.

  5. Make sure to put mouse_rig.ma in rigs/characters/mouse/. For this assignment, you shouldn't need to do anything within this scene file. You will reference in your shot files.
  6. Create motion file

    1. Open a new Maya scene and save it as shot_100_motion.ma under shots/shot_100/motion/
    2. Go to File -> Create Reference (Options). Go to Edit -> Reset Settings and hit Reference.
    3. Navigate to scene_cove.ma and open it and you should see it your scene. Do the same for mouse_rig.ma and the props your are using.
    4. If you need to have the same object, DO NOT COPY/PASTE and DO NOT DUPLICATE. Instead, reference the same file twice.

    5. If the joints for the rig are showing up, you can go to Show in the menu bar for the viewport and uncheck Joints.
    6. Don't attempt to edit shaders, change geometry, modify set layout. Only animate the characters and keyable props. Don't key any part of the set!
    7. Expand and follow the animation tutorial directly below:
      • A note before you begin: you will have several files in the motion directory. You will have the motion shot you just created and this will eventually hold your final animation. Additionally, you will have a file that has just your blocked out poses and a playblast for it. So once done with blocking, save a separate file in the motion folder. Then polish and save that as a separate file with its own playblast. However, do your work in shot_100_motion.

  7. Animation Tutorial ← Click!

    In this assignment we will be reinforcing the animation principles from the previous assignment while also learning new tricks and techniques. Your assignment is to animate a 5-10 second short using the Mouse Rig and the Mouse must interact with an object. Reference and planning sheets will be essential in producing a good quality short so make sure you don’t dive right into animating. Animation is a process that must be carefully thought through; otherwise you may find yourself with something that’s long, unclear, and difficult to work with. Make sure you’re working in 24 fps with 640x360 resolution.

    1. Think of an idea to animate! Just make sure your short will cover 5-10 seconds.

    2. Now that you have your idea find/take reference, and then get started on your planning sheet(s). Pay attention to the line of action and silhouettes. Remember the importance of conveying weight. DO NOT START ANIMATING UNTIL YOU’VE FINISHED THIS STEP.

    3. Set up your Camera. Create a new Camera (Create -> Cameras -> Camera). Rename your camera as “render_cam”. To view through your camera go to Panels -> Perspective -> your_camera. Place your camera in the correct composition and lock it by selecting all of the camera’s attributes in the attribute editor -> right click -> lock selected. To see the edges of the camera view, in the menu bar for the viewport, go to View -> Camera Settings -> Resolution Gate. When playblasting, you will want to turn off the gate by selecting No Gate in the same menu.

    4. Add buffer frames at the beginning and end of your animation. Your first key should be on frame 25. Set the end time of the animation 24 frames after your last keyframe using thing Range Slider.

    5. Begin blocking. Blocking is extremely important with all animation. The basic idea behind blocking is to efficiently get your animation laid out so that the timing and spacing are correct and the poses read clearly. When blocking you’ll generally want to stay in “stepped” mode – this will keep your animation from interpolating between key frames. To get into stepped mode go to Preferences and change “Default In Tangent” to Linear and “Default Out Tangent” to Stepped. The reason why you don’t want to interpolate just yet is because the interpolation Maya creates for you will most likely be undesired and it’ll skew your sense of timing and spacing for your animation. KEEP YOUR POSES IN FULL-BODY POSES. Once you’re done blocking save your file out as “lastname_firstname_project7a_blocking.ma” and create a playblast “lastname_firstname_project7a_blocking_playblast.avi.”

    6. Begin splining and polish. Once your animation is blocked out you can now spline and polish it. Select all of the anims for your rig -> then select all keys in your timeslider -> right click the selected frames -> hover over tangents -> select spline. Now your animation will interpolate between poses; however, it’s rarely the case that the interpolation Maya creates for you is exactly what you want. Now add tangents and keys to polish your animation. Make sure you keep your keys in full-body poses. Save your animation as “lastname_firstname_project7a_polish.ma”.

  8. Create lighting file

    1. Open a new Maya scene and save it as shot_100_lighting.ma under shots/shot_100/lighting/
    2. Go to File -> Creat Reference (Options). Go to Edit -> Reset Settings. Scroll down and expand Namespace Options and uncheck Use namespaces and hit Reference.
    3. Navigate to shot_100_motion.ma and open it; you should see your motion file.
    4. Change the time slider so it has the same value as your motion file.
    5. You are now ready to light but you must follow these guidelines:
      1. All lights should be under a parent group called lights.
      2. Never touch the animation! Don't attempt to edit shaders, change geometry, modify set layout. Only mess with the lights!
      3. Once a light is created, Immediately go to its attributes and TURN OFF ILLUMINATES BY DEFAULT AND NEVER TOUCH AGAIN!
      4. If you wish to delete a light, go to Lighting/Shading -> Light Linking Editor -> Light-Centric. Select the light you wish to delete and make sure it is not linked to anything. You can now delete the light.

        WARNING: Skipping this step will trigger a very serious bug in Maya. If a light is deleted without first removing the light links, the save file will be deleted.

        It's generally a good idea to create a backup file before deleting lights. However, following these lighting guidelines should prevent this problem. BUT ALWAYS CREATE A BACKUP!

    6. No lights should be referenced from other scene files. All lights should natively exist within the lighting shot file.
    7. For this assignment, a simple 3 point lighting set up will suffice.

  9. Preparing for render

    1. These steps are to be done in shot_100_lighting.ma
    2. Open the render settings and use the following settings:
      • Render Using: mental ray
      • File name prefix: shot_100
      • Image Format: PNG
      • Frame/Animation ext: name_#.ext
      • Frame padding: 4
      • Start frame: 1
      • End frame: [last keyframe + 24]
      • Renderable Camera: render_cam
      • Width: 640
      • Height: 360
      • Enable Default Light: Uncheck
      • Under the Quality tab change Quality Presets to Production.

    3. In order for your render location to be understood by the farm you'll have to follow these step:

      • Go to File -> Project Window and hit New
      • In Current Project: type renders.
      • Under Location: set the path to //ntdfs/cs/unix/projects/instr/production1/cse458_au12_turn_in/project_7/[student_file]/shots/shot_100/
        Make sure to delete anything in the Images. Hit Accept.
      • This creates a mess of folders in your renders folder so just delete them; just be sure to leave the workspace.mel file.

    4. Select all your geometry(mouse_rig, scene_cove, and props) and hit 3 on your keyboard to put them in smooth preview. Mental ray will render them as smoothed even though they don't have an actual smooth node.

    5. Next we'll be creating render layers. Render layers lets you add specific objects to a layer and apply specific render options for each layer. By default there is the masterLayer that contains all objects. Do not change this layer. These layers come in useful in post-production as they help create advanced effects through compositing. More on this when you renders are done.

    6. In the Layer Editor underneath the Channel Box, you will find the Render tab with the masterLayer and the ability to create more layers.
      • Beauty Background - This layer contains just the background of the shot.
        1. Select the light group and the set.
        2. In the Render Layer window click the icon to the far right with a blue sphere on a plane. This will create a new layer with the selected objects as its members. Double click the layer and rename it beauty_background.
        3. Right click -> Attributes and set Cast Shadows and Receive Shadows to Override On and set Ignore Self Shadowing to Override Off.
      • Beauty Characters - This layer is the beauty pass for characters
        1. Create a layer named beauty_character with the light group, mouse_rig, and the props the mouse interacts with. No cameras or set pieces should be added.
        2. Set Cast Shadows and Receive Shadows to Override On and set Ignore Self Shadowing to Override Off.
      • Shadow - This layer contains only shadow information stored in the alpha channel of the image.
        1. Create a layer named shadow with the light group, characters, props, and set. No cameras.
        2. Right click the layer -> Attributes. Go to Preset -> Shadow
        3. If the shadows don't appear to render, make sure you are looking at the image's alpha channel. If it's still not render, select the shadow layer and open the Render Settings and make sure Render Using is set to mental ray.
      • Depth - This layer creates a black and white image. White represent objects closest to the camera and black is farthest from the camera. This layer is used in compositing to create effects such as depth of field.
        1. Create a layer named depth and added characters, props, and sets. No cameras and no lights.
        2. In its attributes go to Presets -> Luminance Depth.
        3. Click the arrow to the right of the Shading Group attribute and then click the arrow to the right of Out Color.
        4. You will want to be in shaded mode to see what your doing so hit 6 on your keyboard.
        5. Right click on the X value for Old Min and Break Connections. Repeat for the X value of Old Max. Set Old Min to 10 and Old Max to 100 as a starting point. Manipulate those values to get a desired depth map. You want the things closest to the camera to be white (objects in focus) and objects farthest from the camera are black (out of focus).
      • Occlusion - Creates a layer that adds the real world light phenomena ambient occlusion.
        1. Create a layer name occlusion and add characters, props, and set. No cameras and no lights.

          NOTE: Be sure to only select the character/prop geometry and not the entire rig. Any included anim geometry will affect the result of the ambient occlusion pass, and you may notice unexpected shadowing on the model caused by the anims.

        2. In its attributes go to Presets -> Occlusion.
        3. Go to the mi_amb_occlucion tab and change these values:
        4. Samples: 250 Spread: 0.5 Max Distance: 3

    7. Save all open Maya scene files and then close them. Navigate to O:\unix\projects\instr\production1\cse458_au12_turn_in\project_7\. Drag and drop each Maya Ascii file in your folder structure onto the file named o_to_ntdfs.cmd. You should see the Command Prompt do something. It is changing the file paths for each scene so that when you push your files to the render farm, the file paths make sense to Unix. The file paths starting from the O drive using O:\[etc] are paths only understood by Windows and this batch script updates the references so Unix (which the render farm is run on) can resolve file paths properly. Most of the time, renders fail because the farm doesn't know where to look for specific files reference by your scene.

  10. Send to farm to render

    1. Open shot_100_lighting.ma and go to the Tractor shelf and hit the tractor icon.
    2. Ensure that the following options are set in the newly opened dialogue box:
      • Frames Per Node: Start with a value of 5 (all of your frames will be divided into groups of size defined by this number. You can reduce this number to ultimately use more machines; however, you will take away farm resources from others)
      • Render: Mental ray
      • Tractor Engine Name: tractor-engine
      • Style: Remote
    3. Once ready hit Spool to send the job the farm.
      NOTE: As soon as you spool the job to the farm, you can close Maya.
    4. To check its status, go to Tractor Dashboard and login using your UWNetID as the account.
      • To learn how the Tractor interface works, read the bottom section Tractor Web Interface: Production Rendering
    5. If everything was done correctly, renders should appear in /shots/shot_100/renders/. Each folder is a separate render layer containing and image sequence for that layer.
    6. At this stage you are ready to follow the compositing tutorial.
  11. Compositing export instructions

    Compositing: 
    1) Open the render folder of the shot you are compositing in its own window 
    2) Open after effects 
    3) drag your render layer folders into the after effects program and name them accordingly (you can rename them by clicking on folders in after effects and hitting enter) 
    4) right click on the footage you just brought in and hover over 'interpret footage' then select 'main' 

    1.  
      1. a) in 'Main Options' under Alpha select premultiplied and under frame rate type in '24' click 'OK' 

    DO THIS FOR ALL YOUR FOOTAGE 

    5) Then drag the background layer, the character layer, the shadow layer and the occlusion layer into your composition (bottom of the screen).

      1. a) In order from bottom to top, the layers are arranged as such: background, character, shadow, occlusion. 

    5.5) If your background layer is only one frame, you will have to lengthen it by right clocking on it, selecting 'time' -> 'time stretch...' and then type in the duration that you want (same length as all you other layers 

    6) under 'mode' there is a dropdown menu, for the occlusion layer change the setting from 'Normal' to 'Multiply.' You can adjust the opacity of your occlusion layer if it’s looking to intense.

    7) under the projects tab, rename your composition to shotName_shot# 

    8) Go to 'Composition' (up at the top of your screen) and select 'new composition' 

    1.  
      1. a) make sure pixel aspect ratio is set to the same pixel aspect ratio as your footage (if you don't know what the pixel aspect ratio of the footage is, you can check by going to interpret footage again), the default on our renders is currently square pixels) 

    9) into your new composition drag the composition you just worked on and the depth layer, with the depth layer on the bottom 

    10) right click on shotName_shot#, go to effect -> blur & sharpen -> compound blur  (or Gaussian blur, your choice)

    11) an effects option tab will replace your projects tab, check the 'invert' option and make 'maximum blur' a very small number (like .5) 
    Exporting: 
    1) Composition -> add to render queue 
    2) Go to Render Queue 
    3) Render settings: 

    1.  
      1. a) Best settings 
        1.  
          1. i) Frame rate: make sure ‘use comps frame rate’ is checked

    4) Output mode: 

    1.  
      1. a) lossless
        1. i) Format quicktime 
        2. ii) Video output 
          1. (1) format options 
            1. (a) Compression: H.264
            2. (b) Make sure 24 frames 
        3. iii) Uncheck audio output 

    5) Output to 

    1.  
      1. a) motion file 
        1. i) Name: shot_100_yourname 

     

Turn In There are two separate parts to this assignment and you will be graded on the following:

Conventions and Rendering:

Mouse Animation:

Turn in the following: