- TinyXML2 to parse xml in preparation for next week (skin weights are stored in XML) -

Similar documents
Character animation Christian Miller CS Fall 2011

MODELING AND HIERARCHY

Advanced Graphics and Animation

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala

About this document. Introduction. Where does Life Forms fit? Prev Menu Next Back p. 2

1. In Maya, ensure that the fbx plug in is loaded (Windows/SettingsPreferences/Plug-in Manager)

Tutorial: Exporting characters (Maya)

Breathing life into your applications: Animation with Qt 3D. Dr Sean Harmer Managing Director, KDAB (UK)

Intro to Animation. Introduction: Frames and Keyframes. Blender Lesson: Grade Level: Lesson Description: Goals/Objectives: Materials/Tools: 4th and up

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

FACT-BVH Tutorial. Part I: Setting up the model. In Life Forms. In ElectricImage. 6. Open a New Animation. 7. Import the Fact model

CGDD 4113 Final Review. Chapter 7: Maya Shading and Texturing

Notes 2 My Notes and Thoughts Blender Rigify. Categories : Uncategorised. Date : 19th November / 43

Animation. CS 465 Lecture 22

Chapter 9- Animation Basics

You can also export a video of what one of the cameras in the scene was seeing while you were recording your animations.[2]

Tutorial: Exporting characters (Max)

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

CMPSCI 187 / Spring 2015 Sorting Kata

The first tool is the Bongo menu. When Bongo is loaded you will see a Bongo menu added to the Rhino menu bar.

CS354 Computer Graphics Character Animation and Skinning

Mixamo Maya-Auto-Control-Rig

Overview. Animation is a big topic We will concentrate on character animation as is used in many games today. humans, animals, monsters, robots, etc.

3dSprites. v

Project 2: 3D transforms and Cameras

Lab 0 Introduction to the MSP430F5529 Launchpad-based Lab Board and Code Composer Studio

Content Loader Introduction

Animation. CS 4620 Lecture 33. Cornell CS4620 Fall Kavita Bala

Platformer Tutorial 8 - Adding Mr.Green and Character Animation. Last month. Character FX

CMPSCI 187 / Spring 2015 Hanoi

CHAPTER 6 Character Animation: Hands On by Ryan Dale Character Animation: Discussion Ryan Dale

Rigging / Skinning. based on Taku Komura, Jehee Lee and Charles B.Own's slides

To Do. Advanced Computer Graphics. The Story So Far. Course Outline. Rendering (Creating, shading images from geometry, lighting, materials)

Lab Assignment #10: Mechanisms

3D Modelling: Animation Fundamentals & Unit Quaternions

Course Outline. Advanced Computer Graphics. Animation. The Story So Far. Animation. To Do

Art-based Rendering with Graftals

SM2231 :: 3D Animation I :: Basic. Rigging

Game Programming. Bing-Yu Chen National Taiwan University

Agenda. Introduction Curve implementation. Particle System. - Requirements -What are all those vectors? -Where should I put things?

CMPSCI 187 / Spring 2015 Implementing Sets Using Linked Lists

Creating a 3D Characters Movement

CMPSCI 187 / Spring 2015 Hangman

Spline Control. How to Create the Spline

Animating a Cabinet for NWN2

animation, and what interface elements the Flash editor contains to help you create and control your animation.

Tutorial: Importing static mesh (FBX)

IAT 445 Lab 10. Special Topics in Unity. Lanz Singbeil

Mocap in a 3D Pipeline

SlickEdit Gadgets. SlickEdit Gadgets

Workshop BOND UNIVERSITY Bachelor of Interactive Multimedia and Design Beginner Game Dev Character Control Building a character animation controller.

Project #3. Computer Science 2334 Fall Create a Graphical User Interface and import/export software for a Hurricane Database.

Chapter 1- The Blender Interface

Inverse Kinematics Programming Assignment

3D LEADS 2D: ANIMATING A 3D CHARACTER WITH A 3D STAND-IN USING MAYA

COMPUTER ANIMATION 3 KEYFRAME ANIMATION, RIGGING, SKINNING AND CHARACTER ANIMATION. Rémi Ronfard, Animation, M2R MOSIG

Reading. Topics in Articulated Animation. Character Representation. Animation. q i. t 1 t 2. Articulated models: Character Models are rich, complex

Animator Friendly Rigging Part 3b

Tangents. In this tutorial we are going to take a look at how tangents can affect an animation.

3D Modeling Course Outline

About the FBX Exporter package

Advanced Robotic Manipulation

Creating animation rigs that solve problems, are fun to use, and don t cause nervous breakdowns.

Chapter 5.2 Character Animation

Animator Friendly Rigging Part 2b

3D Character Creation for the Unreal Game Engine Using Adobe Fuse

This lesson introduces Blender, covering the tools and concepts necessary to set up a minimal scene in virtual 3D space.

Lecture 12: Mid-term test solution & project. CITS 3003 Graphics & Animation

Part Tests on TBMaster

Blender Animation Editors

CS 4620 Program #2: Character Animation

THE SETUP MACHINE FOR GAMES

Stratigraphy Modeling Horizon Coverages

Mount Points Mount Points is a super simple tool for connecting objects together and managing those relationships.

Zappar's coordinate system is based on the center of the scene being the center of the target image.

3D Overlay Specifications (Formerly 3D Guidelines)

Presets are the heart of Genoma. They can be added to so you can build up a library of reusable rig parts or even complete rigs to suit your

Software Compare and Contrast

SharePoint 2010 Site Owner s Manual by Yvonne M. Harryman

NEXT BACK 1. Animania!

Modify Group. Joint Move. (default keyboard shortcut Ctrl J)

Homework 2 Questions? Animation, Motion Capture, & Inverse Kinematics. Velocity Interpolation. Handing Free Surface with MAC

(Refer Slide Time: 00:01:27 min)

Animation. 8 GB of RAM. Table of Contents

Learning Autodesk Maya The Modeling & Animation Handbook. Free Models From Turbo Squid Value US $ Official Autodesk Training Guide

MEGACACHE DOCS. Introduction. Particle Simulations. Particle Exporters. Example Videos

3D Modeling: Skinning

SCENE FILE MANIPULATION SCENE FILE MANIPULATION GETTING STARTED MODELING ANIMATION MATERIALS + MAPPING RENDERING. Saving Files. Save.

BONE CONTROLLER ASSET VERSION 0.1 REV 1

Chapter 1- The Blender Interface

Tutorial: Exporting animated creatures from other video games(including World of Warcraft) to the Neverwinter Nights game engine.

Character Animation 1

Virtual Production for the Real World Using Autodesk MotionBuilder 2013

Chapter Adding 1- T Mo he tio B n le to nde Yo r ur Inte Scerfac ne e Landscape Scene Stormy Night.mp4 End 200 Default Animation frame 1 Location

Chapter 9 Animation System

CMSC 425: Lecture 10 Skeletal Animation and Skinning

Armin Attribute Holder V.1 for 3Ds Max

Week 12 - Lecture Mechanical Event Simulation. ME Introduction to CAD/CAE Tools

Maya Lesson 8 Notes - Animated Adjustable Desk Lamp

Lecture 18 of 41. Scene Graphs: Rendering Lab 3b: Shader

Transcription:

Lab 9: HTR Files Objective & Goals - Understand how animation data is stored in the H ierarchical T ranslation- R otation (HTR) file format - Implement an HTR file loader - Create a hierarchy of GameObjects using the data loaded from the HTR file - Create a simple joint hierarchy animation in Blender and load it in You may work individually or in groups of 2-5. Feel free to work in your GDW groups. Only one person needs to submit, make sure everyone s names are in all of the submitted source files. Updates to Framework - TinyXML2 to parse xml in preparation for next week (skin weights are stored in XML) - https://github.com/leethomason/tinyxml2 Itinerary Part 1: Programming - First, we need to load the animation data contained in the HTR file - The HTR file format is split into the following sections: - [Header] - Describes the data in the file, contains things like rotation order, number of animation frames, number of joints, animation frame rate etc. - [SegmentNames&Hierarchy] - A list of each joint and it s parent - [BasePosition] - This is bind pose, the transformations in the actual animation frames are expressed relative to this pose - Note: when performing skinning, the base mesh should align with this pose. MotionBuilder seems to export this section incorrectly. For next week, install 3DS Max. 3DS Max exports good HTR files. - Joint Animations - In this section, the animation frames for each joint are listed - The data is organized as: - FrameNumber t x t y t z r x r y r z s xyz - Where t is translation, r is rotation (euler) and s is a uniform scale value

- A nice thing about the HTR file format is that the sections are guaranteed to be in this order, this simplifies the parsing process. - You should open the provided HTR file simple_rig.htr (located in assets/animations/) and examine it s contents. Compare the data in this file with the description given above. Simple_rig.htr is a very simple HTR file, take a look at jog.htr to see what an actual mo0cap file looks like. The architecture for the animation system is as follows: - The HTRLoader class (located in HTRLoader.h) will parse the HTR file and store the data in JointDescriptor objects. - The JointDescriptor struct (located in JointTypes.h) contains member variables which describe a specific joint, including each frame of animation. The HTRLoader class will create a JointDescriptor object for each joint loaded in from file. - We now have a SkinnedGameObject class which inherits from the GameObject base class. This class overwrites the update function defined in the base class to set the translation, rotation and scale (TRS) of the object using the data from the HTR file. For now we are just focusing on the HTR animation, next week we will overwrite the draw function to actually perform the skinning. - In the InitializeScene function located in main.cpp, we invoke SkinnedGameObject::initializeSkeletonFromHTR, this function will create an instance of the HTRLoader class and invokes HTRLoader::loadHTR which loads the animation data into memory. Once the animation data is in memory, we construct GameObjects for each joint. Todo list: - Open up JointTypes.h, in here are some structs which we will use to store the data loaded in from file. Compare these structs with the HTR file to get an idea of where the data from file will be stored. - Open up HTRLoader.h, here you will find several functions which will facilitate the parsing of the HTR file. loadhtr is the main function we will be working with. Open up it s definition and take a look at what s happening. - The Header and SegmentNames&Hierarchy sections of the HTR file are provided for you. Take a look at the processheadersection and processsegementnamesection functions to see how the data is parsed. - Your first task is to implement the processbasepositionsection and processanimationsection functions. You need to parse the data and store it in the appropriate place. - Now we should have the animation data loaded into our program. Next we need to create actual GameObjects using this data. This is the exact same process we did last week, but this time, instead of creating the GameObjects manually, we create them using the data from the HTR file. Do this in the HTRLoader::createGameObjects function.

- Once you create the GameObjects, you can run the project. It won t work just yet but you should be able to see the hierarchy in the GUI. - The next step is to create the transformation matrices for each GameObject in SkinnedGameObject::update. - Now you can run the program, you should see something like this: - If you do not see this, you ve made an error parsing which you should fix before continuing. - The hierarchy will not move, that s okay because this HTR file has no animation!, - Load in the jog.htr file. You should see an animation of a walk cycle which looks like this:

- If jog.htr plays and looks correct, then you are done this lab! Things to think about: Notice that the character is rather large and the animation seems to be playing to quickly. How might you fix this? Try playing around with the provided jog.fbx file. Also try loading in run.htr, notice that this animation has a translation on the root node, this makes it kind of difficult to control the locomotion of this animation, think about how you would fix this. Part 2: Blender - Note: This section is not going to be marked as a part of this lab, so don t stress if you do not get to finish it during the lab time. This is more of a for your knowledge thing since, it s a pretty useful thing to know. Creating a simple rig in Blender: - First create an Armature: - You need to be in Object Mode

- You can now Pose the armature by going into edit mode and rotating / translating it. - To create a second joint, select the armature and press the e key. - You can now pose this armature too. - Once you create a few armatures, you can start creating an animation by going into Pose mode - Once in pose mode, the first thing you want to do is add a keyframe at the initial position: - - Scrub the the first frame in the animation - Press the i key and click LocRotScale : - - Notice that the line in the scrubber is now yellow, denoting that a keyframe was placed. - You can now scrub down to another frame, pose the joint however you like and create a keyframe.

- When you press the play arrow, you should see the joint interpolate between the frames. Creating the HTR File - Once you have a rig you want to export, we need to load it into MotionBuilder to generate the HTR file. To do this, we export the object from blender as an FBX and import it in MotionBuilder. - In Blender click File > Export > FBX - In the Export FBX options on the left side, make sure your options match these: - Next you need to open up MotionBuilder and import the file. Just press Import on the dialog box that pops up.

Once the object is imported in MotionBuilder, you need to select the root node of the hierarchy, see the images below:

Once the root node is selected, click File > Motion File Export and select the desired output directory:

In the export options you can tell MotionBuilder how you want the data exported. We only need to export the default take. Make sure you set the sampling rate to match your game s FPS. Note: The local option under position doesn t seem to work properly since the base position portion of the HTR file is not filled in. For this reason, we will use 3DS Max next week to generate our HTR file. The base position (a.k.a bind pose) is needed for skinning. What s Next - You should now be very familiar with how forward kinematics works - We now know how to create joint animations in Blender and load them into our projects - Next week we will be looking at deforming meshes based on joint animations (aka skinning) Submission Submit a zip file the following: 1. Any source files you modify Make sure you put your name and student number in a comment at the top of each file! Failure to follow these submission guidelines will result in a zero!