Project 2: Character Animation Due Date: Friday, March 10th, 11:59 PM



Similar documents
Animations in Creo 3.0

CHAPTER 6 TEXTURE ANIMATION

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

Creating Scenes and Characters for Virtools in OpenFX

Character Animation Tutorial

Fundamentals of Computer Animation

Tutorial: Biped Character in 3D Studio Max 7, Easy Animation

CS 4620 Practicum Programming Assignment 6 Animation

animation animation shape specification as a function of time

CS 4204 Computer Graphics

Scratch Primary Lesson 4

Interactive Computer Graphics

Maya 2014 Basic Animation & The Graph Editor

Chapter 1. Animation. 1.1 Computer animation

Human Skeletal and Muscle Deformation Animation Using Motion Capture Data

Wednesday, March 30, 2011 GDC Jeremy Ernst. Fast and Efficient Facial Rigging(in Gears of War 3)

Computer Animation. CS 445/645 Fall 2001

Graphics. Computer Animation 고려대학교 컴퓨터 그래픽스 연구실. kucg.korea.ac.kr 1

4VATARS PROJECT. Standard avatar specification for content creation in RealXtend

CS 2112 Spring Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions

6 Creating the Animation

Motion Capture Technologies. Jessica Hodgins

ANIMATION I :: SYLLABUS

Outline. Animation. 1. Squash and Stretch. Overview: Traditional Animation. Squash and Stretch Cont. 2. Timing and Motion

SimFonIA Animation Tools V1.0. SCA Extension SimFonIA Character Animator

Animation (-4, -2, 0 ) + (( 2, 6, -4 ) - (-4, -2, 0 ))*.75 = (-4, -2, 0 ) + ( 6, 8, -4)*.75 = (.5, 4, -3 ).

Welcome, today we will be making this cute little fish come alive. Put the UltimaFish.bmp texture into your Morrowind/Data Files/Textures directory.

Mocap in a 3D Pipeline

C O M P U C O M P T U T E R G R A E R G R P A H I C P S Computer Animation Guoying Zhao 1 / 66 /

CMSC 425: Lecture 13 Animation for Games: Basics Tuesday, Mar 26, 2013

Introduction to Computer Graphics Marie-Paule Cani & Estelle Duveau

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries

Particles, Flocks, Herds, Schools

game development documentation game development documentation: concept document

Voice Driven Animation System

animation shape specification as a function of time

Mocap in Carrara - by CyBoRgTy

Character Animation from 2D Pictures and 3D Motion Data ALEXANDER HORNUNG, ELLEN DEKKERS, and LEIF KOBBELT RWTH-Aachen University

CATIA V5 Tutorials. Mechanism Design & Animation. Release 18. Nader G. Zamani. University of Windsor. Jonathan M. Weaver. University of Detroit Mercy

Motion Retargetting and Transition in Different Articulated Figures

This week. CENG 732 Computer Animation. Challenges in Human Modeling. Basic Arm Model

The first program: Little Crab

2 The first program: Little Crab

Module 3 Crowd Animation Using Points, Particles and PFX Linker for creating crowd simulations in LightWave 8.3

Video Tracking Software User s Manual. Version 1.0

IMD4003 3D Computer Animation

New Media production week 9

Jordan Shearer. Portfolio. 1Maya Modeling

So today we shall continue our discussion on the search engines and web crawlers. (Refer Slide Time: 01:02)

Blender 3D Animation

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science. Friday 18 th January 2008.

Visualizing molecular simulations

Character Bodypart Tutorial

The 3D rendering pipeline (our version for this class)

Metrics on SO(3) and Inverse Kinematics

The Top 9 Ways to Increase Your Customer Loyalty

This tutorial assumes that Visual3D has been installed and that a model has been created as described in Tutorial #1.

Animation. Persistence of vision: Visual closure:

The Car Tutorial Part 1 Creating a Racing Game for Unity

Computer Science Education Week Teacher/Volunteer Guide

3 Improving the Crab more sophisticated programming

Tutorial 9: Skeletal Animation

How to Build a Simple Pac-Man Game

Computer Animation. Lecture 2. Basics of Character Animation

Compact Representations and Approximations for Compuation in Games

Computer Animation. Jason Lawrence CS 4810: Graphics

Background Animation Generator: Interactive Scene Design based on Motion Graph

Fish Chomp. Level. Activity Checklist Follow these INSTRUCTIONS one by one. Test Your Project Click on the green flag to TEST your code

Cork Education and Training Board. Programme Module for. 3 Dimensional Computer Graphics. Leading to. Level 5 FETAC

An Instructional Aid System for Driving Schools Based on Visual Simulation

HACKETTSTOWN, NEW JERSEY. Computer Animation Grades CURRICULUM GUIDE FINAL DRAFT. July 2014

Pro/E Design Animation Tutorial*

Use fireworks and Bonfire night as a stimulus for programming

Using Emergent Behavior to Improve AI in Video Games

Multimedia Authoring Tools THETOPPERSWAY.COM

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina

3 Multimedia Programming with C++ and Multimedia Frameworks

Animator V2 for DAZ Studio. Reference Manual

Spatial Pose Trees: Creating and Editing Motions Using a Hierarchy of Low Dimensional Control Spaces

View Controller Programming Guide for ios

Bitrix Site Manager 4.1. User Guide

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

Chapter 1. Introduction. 1.1 The Challenge of Computer Generated Postures

Make your own Temple Run game

Republic Polytechnic School of Information and Communications Technology C391 Animation and Visual Effect Automation.

ACE: After Effects CS6

RoboCup Advanced 3D Monitor

Course Syllabus. Tuesday 4 pm to 5 pm & Thursday 4 to 5 pm

Synthetic Movies for Computer Vision Applications

Scripted Operator Shoulder

Digital Production Art 3-D AET Bringing ones imagination to life has never been easier. Fall 2015 CBA TTH 9:30-11:00 AM

Greetings Card. Projects 1

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team

SIMULATION OF LOAD BALANCING ALGORITHMS: A Comparative Study

Assignment # 2: Design Patterns and GUIs

User Guide Installing the 3D Studio plug-ins

Top 5 best practices for creating effective dashboards. and the 7 mistakes you don t want to make

Transcription:

1 Introduction Project 2: Character Animation Due Date: Friday, March 10th, 11:59 PM The technique of motion capture, or using the recorded movements of a live actor to drive a virtual character, has recently become very popular in video games. Characters that are animated with motion capture data appear very realistic and exhibit subtleties of human motion that are hard to replicate, even by a skilled animator. The amount of time required to produce an animation sequence is also much less with motion capture than with traditional animation techniques. There are a number of different formats in which motion capture data is stored (Dojo supports the ASF and BVH formats), but the general idea is to represent the character as a skeleton, or a hierarchy of bones. At the top of this hierarchy is the skeleton s root, whose orientation and position in the world defines the entire character s orientation and position (these are the global degrees of freedom). The position and orientation of each bone down in the hierarchy is defined in relation to the bone s parent (the bone directly above it in the hierarchy). Each parent and child pair is connected by a joint that can have from 0 to 3 degrees of freedom (these are the local degrees of freedom; for example a hinge joint = 1 dof, a ball joint = 3 dof). Each frame of motion capture data contains values for all of the skeleton s local degrees of freedom (defining the skeleton s pose), as well as the position and orientation of the skeleton s root in relation to the start frame of the motion sequence (these global degrees of freedom are adjusted as necessary to position the character in a scene). In this assignment you will use motion capture data to animate a humanoid character in your game. Specifically, you are required to use a motion graph 1 and come up with a scheme for controlling your character in-game. This animated character should replace the character entity that you used to navigate the game world in Project 0. For extra credit, you can integrate your control scheme with the path-planning algorithm from Project 1 to create intelligent, animated humanoid NPCs. 2 Motion Graph 2.1 Structure A motion graph is a directed graph whose nodes are animation frames. In its simplest (and not very interesting) form, a motion graph just contains a number of node chains, each corresponding to a recorded motion sequence (diagram 1 Lucas Kovar, Michael Gleicher, and Frédéric Pighin. Motion graphs. ACM Transactions on Graphics, 21(3):473-482, July 2002. 1

below, on the left). The motion graph becomes useful when new transitions (edges) are added to connect different motion sequences or different parts of the same motion sequence (diagram below, on the right). The goal is to create a graph such that any traversal of it will yield a valid, visually pleasing motion. Remember that each frame of motion data stores the position and orientation of the skeleton s root relative to the start of the sequence that contains the frame. When a transition is added to the motion graph, it is necessary to record the transformation (rotation and translation in 3-space) that is needed to align the root across the transition. To understand intuitively why this is necessary, imagine a motion graph that contains a single walking sequence, where the only additional transition is one from the last frame to the first to create a cycle. If the root is not properly aligned across this transition, then the character will simply jump back to its original starting position to repeat the motion over and over, whereas the desired effect is to have him continue walking off to infinity. 2.2 Creating new transitions In order to generate motions that are as smooth and visually pleasing as possible, transitions must be created only between frames that are similar to each other. For example, a transition from a frame where the character is lying on his back to one where he is jogging would be very undesirable. There are a number of ways to measure similarity between frames, but the support code that you are given for this assignment uses a method that compares the orientations of the character s joints between the two frames. 2 Once the distance, or transition cost, has been computed for each pair of nodes in the graph, it is up to you to decide where to actually create transitions, based on the costs. A typical approach is to select a threshold and to create a transition for each pair of nodes whose cost is below the threshold. However, you will probably find that choosing a single good threshold for all your motion sequences is difficult, if not impossible. Instead, you may want to set different thresholds for different motion categories, for example one threshold to be used for determining transitions between walk sequences and another to be used for transitions from a walk sequence to a run sequence. Bad transitions will result in ugly, jerky motions, so it is important that you leave yourself enough time to experiment with this part of the assignment and to come up with a good solution. Even if you end up finding a really good transition, you will still most likely see jerky motion if you simply switch from one motion sequence to the next 2 For more information, see: Jim Wang, and Bobby Bodenheimer. An Evaluation of a Cost Metric for Selecting Transitions between Motion Segments. Eurographics/SIGGRAPH Symposium on Computer Animation, 2003. 2

at the transition point. In order to get a smooth transition you will need to interpolate between the two motion sequences in a window around the transition point. You can either perform this interpolation on the fly as you traverse the graph, or you can insert the interpolated frames as new nodes into the motion graph when you create a transition. Note that a longer interpolation window does not necessarily translate into a better looking motion. A window that is too long can produce very unrealistic motion and the ideal window is somewhere between 10 and 30 frames long. Interpolation is not required to for this assignment, and it will be considered extra credit. 2.3 Pruning the graph When you ve created all of your transitions, your motion graph will likely have a number of dead ends, nodes that have no edges leading away from them. The final step in creating the motion graph is to remove all of these dead ends from the graph. However, since this is not particularly interesting, we re leaving it as extra credit. A simple alternative method for getting rid of dead ends is to take the last node of each motion sequence and create a transition from it to the first node of the respective sequence. Whichever method you decide to use, make sure that your character motion avoids unpleasant motion induced by bad transitions. 3 Controlling the character Once you have a motion graph set up and ready to go, you need to come up with a way to use it to animate your character based on the player s input. As mentioned earlier, any walk along a motion graph should yield a plausible motion, however while a random traversal of the graph might make for a good screen saver, it s not particularly useful for an interactive video game. It is up to you to come up with a control scheme for your character: a strategy for choosing the next path to take in the motion graph based on the current state and the player s input. We are deliberately leaving this part very open-ended because every game will require a different control scheme. Be sure to put a lot of thought into how you re going to approach this problem. A bad control scheme can destroy a game, while a particularly good one can be what makes a game stand out. Feel free to discuss any ideas you might have with the course staff. Whatever control scheme you come up with, you should make sure that it is sufficiently responsive to the player s input. This means that if the player indicates that the character should turn left, he should not have to wait 10 seconds for that action to take place (unless of course having laggy controls is a design decision, if you re trying to make, say, a drunken boxing simulator... in that situation though you will have to make a very good case to the course staff). This issue relates back to the structure of your motion graph. If you find that your controls are very laggy, maybe there are not enough transitions 3

in your motion graph. 4 Support code As with most of the materials that we provide you with in this course, you are completely free to ignore this support code if you have another way that you would like to do this assignment. We re giving you an almost complete implementation of a motion graph so that you can focus on working on your control scheme without having to worry about details like what the heck is a quaternion. If something about our implementation is incompatible with an idea that you want to try, or if you think that it s just plain stupid, feel free to change as much or as little as you like, though please list any changes you make in your README for the sake of the graders sanity. 4.1 MGHumanoid MGHumanoid is a subclass of Dojo s Humanoid class that is used for handling motion capture data. The methods that you need to worry about are: static MGHumanoidRef create(const std::string& name, const std::string& filename, bool canmove = false); This is a static method that returns a reference-counted pointer to a new instance of MGHumanoid. (Note that you always want to call this method and not the constructor when creating a new MGHumanoid). name A name that you assign to this humanoid. filename The name of the file containing the skeleton for this humanoid (a BVH or ASF file). canmove Always set this to false. Humanoid::Motion loadmotion(const std::string& filename); This method is inherited from Humanoid and is used for loading motion data from a file (either AMC or BVH). The file must contain motion data that is compatible with the skeleton data from the file was used to create the MGHumanoid. void setmotiongraph(motiongraph* graph); Use this method to set the humanoid s motion graph once you create it. bool getnextframe(const double & dt, Frame & frame); This is where the graph traversal is performed. At each simulation step this method is called to see how the humanoid should be posed at this 4

step. You have to fill this method with the control scheme that you devise. The method returns true if a next frame is available (i.e. no error occurred). dt frame 4.2 MotionGraph The elapsed time since this method was last called. Passed by reference, you use this variable to return the Frame of the MotionGraphNode that you determine should come next in the graph traversal. MotionGraph is an almost complete implementation of a motion graph. Its most important methods are: void addmotion(humanoid::motion* motion); Adds a motion to the graph. void computedistance(motiongraphnode* a, MotionGraphNode* b); Performs a similarity measure between two nodes in the motion graph (the obtained cost is stored in MotionGraphNode::distanceMap). This is already written for you. Tweak the m velocityweight member variable to specify how much weight is given to the bones rotational velocities as opposed to just their orientations when calculating this cost. void computetransitions(motiongraphnode* node); Creates viable transitions out of the node (call computedistance() first). You need to fill this method in. Note that you will likely need to add some data to the MotionGraphNode class based on how you decide to set up your control scheme. For example, you might want to assign a type to each transition to help in choosing the correct one when you traverse the graph. This is how you should initialize your MGHumanoid and MotionGraph: MGHumanoidRef mghumanoid = MGHumanoid::create("mgHumanoid", "mymocapdir/f wlk1.bvh"); World::world()->insert((EntityRef)mgHumanoid, CoordinateFrame())); MotionGraph* motiongraph = new MotionGraph("mgraph", mghumanoid->skeletonname); motiongraph->addmotion(&mghumanoid->loadmotion("mymocapdir/f wlk1.bvh")); motiongraph->addmotion(&mghumanoid->loadmotion("mymocapdir/f wlk2.bvh")); mghumanoid->setmotiongraph(motiongraph); 5

5 Motion capture data A collection of motion capture data is available to you in /course/cs196-2/pub/mocap/. Additionally, you can find more data at these sites: mocap.cs.cmu.edu www.bvhfiles.com 6 Requirements Your grade for this assignment will be based on the following: Quality of transitions Do you perform transitions at all? 40% How smooth are they? Is there an intelligent strategy for making transitions? Control scheme Can switch between at least 3 separate actions. 40% How responsive are the controls? Creativity Is the control scheme interesting or well-designed? 20% Is it fun/intuitive/useful/cool? Or is it boring/overly complicated/frustrating? Please explain your strategy for creating transitions in a README (for example, if you decided to set a bunch of thresholds, explain how you arrived at their final values). Also talk about the reason why you chose your control scheme, why you think it s good and any issues that you think still need to be resolved (remember to actually provide instructions for controlling your character as well). The README must be a text file (.doc file submitters will be prosecuted!). 7 Extra credit There are a number of things that you can do for extra credit, though remember to get the core assignment working first before attempting any of these. Integrate the motion graph with your path-planning algorithm from Project 1 to create animated humanoid NPCs. Interpolate between frames around transition points to get smoother transitions. Implement a proper graph pruning algorithm to get rid of dead ends. Write methods to save/load the motion graph to/from a file. In a real video game you don t want to be creating the motion graph from scratch every time you start the application. Instead the graph should be built once, saved to a file, then loaded by the game. 6

Do something that really impresses us. Be creative. 8 Handing In 8.1 What to Hand In Make sure that you hand in all of your code as well any maps and textures. If you used any mocap files that were not provided by us, please make sure that those are included as well. Along with this, you must handin a README in which you explain your design choices. 8.2 Handin Script IMPORTANT: Make sure to clean your solution (Build>Clean Solution in Visual Studio) before handing in. To handin your project, run /u/course/cs196-2/bin/cs196-2 handin asgn2 in your project s base directory. 7