Animating Real-Time Game Characters.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Copyright 2003 by CHARLES RIVER MEDIA, INC. All rights reserved. No part of this publication may be reproduced in any way, stored in a retrieval system of any type, or transmitted by any means or media, electronic or mechanical, including, but not limited to, photocopy, recording, or scanning, without prior permission in writing from the publisher. Publisher: Jenifer Niles Production: Publishers' Design and Production Services, Inc. Cover Design: The Printed Image Cover Images: Paul Steed CHARLES RIVER MEDIA, INC. 20 Downer Avenue, Suite 3 Hingham, Massachusetts 02043 781-740-0400 781-740-8816 (FAX) [email protected] www.charlesriver.com This book is printed on acid-free paper. Paul Steed. Animating Real-Time Game Characters. ISBN: 1-58450-270-3 All Betty Bad characters © 2002 WildTangent. All rights reserved. All brand names and product names mentioned in this book are trademarks or service marks of their re- spective companies. Any omission or misuse (of any kind) of service marks or trademarks should not be regarded as intent to infringe on the property of others. The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to distinguish their products. Library of Congress Cataloging-in-Publication Data Steed, Paul. Animating real-time game characters / Paul Steed. p. cm. ISBN 1-58450-270-3 (paperback with CD-ROM : alk. paper) 1. Computer animation. 2. Computer games—Design. 3. Videogame characters. 4. Real-time programming. I. Title. TR897.7 .572 2003 794.8'15—dc21 2002014664 Printed in the United States of America 02 7 6 5 4 3 2 First Edition CHARLES RIVER MEDIA titles are available for site license or bulk purchase by institutions, user groups, cor- porations, etc. For additional information, please contact the Special Sales Department at 781-740-0400. Requests for replacement of a defective CD-ROM must be accompanied by the original disc, your mail- ing address, telephone number, date of purchase and purchase price. Please state the nature of the prob- lem, and send the information to CHARLES RIVER MEDIA, INC., 20 Downer Avenue, Suite 3, Hingham, Massachusetts 02043. CRM's sole obligation to the purchaser is to replace the disc, based on defective materials or faulty workmanship, but not on the operation or functionality of the product. CONTENTS Preface Acknowledgments xv Foreword xvii About the Author xix CHAPTER 1 BUILT TO MOVE 1 Design 2 Aesthetic Considerations 2 Technical Considerations 4 Understanding Reference 4 Modeling: Form 8 Using Reference 8 Basic Modeling Tips 13 Modeling Techniques 15 Starting With Primitives 15 Extruding Shapes Or Faces 16 Using Booleans 16 High Resolution Mesh Template 17 Patch Modeling With Surface Tools 20 Surface Issues 21 Optimization 29 Modeling: Function 31 Model Breakdown 31 Animation Accommodation 32 Neck and Head 33 Shoulders 34 Waist 35 Mips and Rear 35 Elbows and Knees 37 Hands and Fingers 37 vii viii Contents Wrists and Ankles Fitting the Biped Texture: Maps UVW Coverage Quality of the Texture Summary CHAPTER 2 RIGGING YOUR CHARACTERS WITH BIPED Setting up a Typical Biped Steps to Setting up a Biped Rig Loading Your Character's Mesh Creating Your Biped Adjusting the Structure of Your Biped Adjusting the Biped's Body and Head Adjusting the Biped's Arms and Legs Saving the Biped's Pose Rigging a Four-legged Character Adjusting the Structure Adjusting the Body, Head, and Tail Adjusting the Legs and Arms Other Types of Character Rigs A Dog A Dolphin A Goat-Girl? Facial Rigs Face Rig Level 1 Face Rig Level 2 Face Rig Level 3 A Higher-Resolution Character Rig Ta Da Vinci or Not Ta Da Vinci? A Face Rig for a Higher-Resolution Mesh Adding Bones and Using Different Controllers Summary CHAPTER 3 WEIGHTING A CHARACTER USING MANUAL VERTEX ASSIGNMENT A Typical Game Character Steps to Applying Physique Applying and Initializing Physique Contents IX Assigning Vertices to a Link 95 Typing in Weighting Values 99 Removing Vertices from Links 105 Adjusting the Elbow Area 107 Working on the Hand and Fingers 113 Saving Your Weighting Values 116 Assigning the Neck, Shoulders, and Torso 117 Weighting the Other Leg 120 Loading a.Bip File into Biped 123 Tackling the Hips 125 Adjusting the Gun Arm 128 Summary 133 CHAPTER 4 WEIGHTING A CHARACTER USING ENVELOPES 137 Conquering Envelopes 138 Steps to Applying Physigue 138 Turning Off Unnecessary Envelopes 139 Adjusting the Radial Scale of the Envelopes 144 Adjusting the Parent/Child Overlap of the Envelopes 147 Copying and Pasting to Symmetrical Limbs 150 Removing Any Vertices from Links 153 Weighting the Waist, Hips, and Legs 153 Resorting to Type-in Weights 156 Assigning the Breast Vertices 158 Adjusting the Head and Face 163 Summary 168 CHAPTER 5 THINGS TO CONSIDER BEFORE You ANIMATE 171 Know Your Character 172 Appearance Dictates Identity 173 Uniqueness Required 174 The Animation Set 175 Genre 175 Environment 177 Size Still Matters 177 Game Controls 179 Game Technology 180 Keyframe or Motion Capture? 181 Keyframing Defined 182 I X Contents When to Keyframe When to Use Mocap Tips on the Mocap Process Implementing the Character Perpetual Windup Toy Fitting the Technology Summary CHAPTER 6 KEYFRAME ANIMATION: PART I First Things First Footsteps versus Freeform Think Animation Folder Preparing the Biped Keyframe Animation Basics Frame Zero The Track View Configuring Time Copying Keyframes Animation Space Buffer Track View and Active Animation Range Posing the COM and Limbs Locking Down the Feet and Hands Refining the Idle Pose Tension, Continuity, and Bias Ease To and Ease From Keyframes and the Time Slider Bar Keyboard Shortcut Override Toggle Secondary Motion Animating the Tail Using Layers Using Time Tags Summary CHAPTER 7 KEYFRAME ANIMATION: PART II Betty's Animations One Chick, One Gun Special Moves Idles It's All in the Pose Anchor Keys Contents xi Doubling Keys 240 Secondary Motion 243 Join To Previous IK Key 246 The Third Idle 248 Shooting 250 The Firing Pose 250 Adding Recoil 254 The Other Two Idle Attacks 255 Aiming Mechanism 257 Jumps 259 Standing and Running Jumps 259 Implementing the Real-Time Jump 261 See Betty Jump 262 See Betty Jump...Again 267 Turnaround Jumper 268 Jumping while Shooting 273 Using Snapshot for Reference Objects 274 Hitting the Ground Shooting 277 Animation Ideology 280 Swimming 281 Treading Water 281 Creating a Smooth Loop 284 Swimming Forward 286 Summary 292 CHAPTER 8 USING MOTION CAPTURE 295 Motion Capture Files 296 CSM Format 296 BVH Format 296 Converting CSM and BVH Files 297 Using Key Reduction 299 Deciding Which Mocap Files to Use 305 A Bad Run Animation 305 A Good Run Animation 307 Creating a Looping Run 308 Determining the Loop Length 308 Grabbing the Best Loop Segment 310 Comparing the Loop Segments 314 Doubling the loop 316 Refining the Loop with Layers 317 Creating a Death Animation 325 XII Contents Using the Motion Flow Editor to Rotate the Biped Adding Secondary Motion with Layers Deleting Frames to Increase Impact Effect Repurposing a Mocap File Copying Posture Loading the Getting-Hit Animation Paste Pose/Posture/Track Moving the COM Creating the Firing Motion Moving the Recoil Closer Aligning the Right Foot by Moving the COM Adjusting the Upper Body Making Adjustments with the Set Multiple Keys Function Summary CHAPTER 9 PUTTING IT ALL TOGETHER Motion Flow Mode Preparing an Animation for Motion Flow Creating the Motion Flow Script Adjusting Transition Length between Motion Clips Rotating Motion Clips The Export Process Installing the WildTangent 3DS Max 4 Exporters Creating and Exporting an Actor Exporting an Actor with Animations Final Thoughts APPENDIX ABOUT THE CD-ROM Recommended System Reguirements Chapter Directories Demo Files Mocap Files INDEX PREFACE reetings! Thanks for buying or considering this book. Investing your money in books like this is not an easy decision. There are G many to choose from and many to consider. My intent in writing Animating Real-Time Game Characters has been to share my work methods, thoughts, and ideas about animating real-time characters in 3ds max 4™ and character studio 3®. Any factor that affects the animation process using these two tools has been covered. Design, modeling, texturing, rigging, weighting, keyframing, motion capture, and exporting to a game engine are all in here. Written for the relatively new or intermediate user of 3ds max, the book isn't just a rehash of the man- uals and tutorials that came with your software, it's a companion to them. Make sure that you know your way around 3ds max 4 at a basic level and that you have at least gone through the animation tutorials in order to understand the terminology that will be used. Since I usually wait at least a year after the latest version of 3ds max comes out until I begin using it, the information presented doesn't include or apply to 3ds max 5. However, with the exception of a couple of key features, I'm con- fident that many of the tips and tricks covered will work for 3ds max 3 and 3ds max 5 as well. To illustrate ideas, tips, tricks, and techniques, I've used several char- acters from games or projects I've completed over the last year and a half, but most often I've used a character called Betty Bad from the self-titled game that was released January 2002 by WildTangent. This is primarily to show you the thought and work that goes into an implemented game character. By doing so, I've hopefully given you a snapshot of what I do every day and have been doing every day for the past nine years: charac- ter animation. It's not just my job, it's my hobby, passion, and the thing I love to discuss with others.