TE AM FL Y
2D Artwork and
3D Modeling for
Game Artists David Franson
© 2003 by Premier Press, a division of Course...
153 downloads
2600 Views
45MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
TE AM FL Y
2D Artwork and
3D Modeling for
Game Artists David Franson
© 2003 by Premier Press, a division of Course Technology. All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system without written permission from Premier Press, except for the inclusion of brief quotations in a review.
The Premier Press logo and related trade dress are trademarks of Premier Press, and may not be used without written permission. Publisher: Stacy L. Hiquet Marketing Manager: Heather Hurley Acquisitions Editor: Emi Smith Series Editor: André LaMothe Project Editor: Estelle Manticas Technical Reviewer: Lorenzo Phillips Copy Editor: Kate Welsh Interior Layout: Marian Hartsough Cover Designer: Mike Tanamachi Indexer: Sharon Shock Proofreader: Sandy Doell Acrobat, Reader, and Photoshop are trademarks of Adobe Systems Incorporated. Discreet is a division of Autodesk, Inc., 3d studio max, 3D Studio VIZ, character studio, fire, flame, flint, frost, inferno, Lightscape, smoke, stream, and wire are registered trademarks, and Discreet, 3ds max, backdraft, combustion, jobnet, and sparks are trademarks of Autodesk Inc./Discreet Logic Inc. in the USA and/or other countries. mental ray is a registered trademark of mental images GmbH & Co. KG. Vecta3D-MAX is a trademark of IdeaWorks3D, Ltd. All other brand names, product names, or trademarks belong to their respective holders. (c) Copyright 2002 Autodesk, Inc. All rights reserved. All other trademarks are the property of their respective owners. Important: Premier Press cannot provide software support. Please contact the appropriate software manufacturer’s technical support line or Web site for assistance. Premier Press and the author have attempted throughout this book to distinguish proprietary trademarks from descriptive terms by following the capitalization style used by the manufacturer. Information contained in this book has been obtained by Premier Press from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, Premier Press, or others, the Publisher does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from use of such information. Readers should be particularly aware of the fact that the Internet is an ever-changing entity. Some facts may have changed since this book went to press. ISBN: 1-931841-33-0 Library of Congress Catalog Card Number: 2001097576 Printed in the United States of America 03 04 05 06 07 BH 10 9 8 7 6 5 4 3 2 1 Premier Press, a division of Course Technology 2645 Erie Avenue, Suite 41 Cincinnati, Ohio 452081
This book is dedicated to my mother, Shirlee, and my father, William. They’ve been the most profound and supportive people in my life. I love you both!
Acknowledgments
T
here were so many people involved with this book, I don’t know where to start. But here goes: The first and foremost thanks goes to André LaMothe. His influential presence got me into the game industry. I actually flew out to California to attend the Game Developer’s Conference looking to have him sign my copy of his Tricks of the Game Programming Gurus, but in seeking him out I instead found the editors at Premier Press, who enticed me to become an author. André is the Series Editor for Premier, a leader in the game industry, and a true genius. Thanks, André. Thanks to Emi Smith, my acquisitions editor, who is one of the driving forces at Premier and is a friend at the same time. To Kate Welsh, my copy editor and the English master who made my text beautiful. Next goes to Estelle Manticas, my Project Editor: thank you for your patience, for being a friend, and for being the sister I’ve never had. Without you I’d be lazy and deadlines wouldn’t have been met! To Marian Hartsough, the layout designer—how exactly did you do it, putting up with me while laying out over a thousand of my images? To Lorenzo Phillips, my technical editor, a knowledgeable and kind person, thank you so much. To Lars Ricaldi, for doing the sketches in my book—you truly have an artistic talent. Now let’s meet at the next GDC for cryin’ out loud! Oh yeah—does this also mean I have to send you a signed copy of my book?? Thanks to the Caligari Corporation; these people influenced me to get deep into the 3D modeling industry. Particular thanks got to Roman Ormandy for developing such a lovely product, to Bibiana Gasparik, and to Norm Fortier, for tech-supporting me to the end. On the other side of the globe in New Zealand, thank you Right Hemisphere, and Mary Alice Krayecki (hey, cup of coffee at the GDC ‘03, remember?). Your software is totally unreal; job so well done!
Next, thanks go out to Adobe—to Gwyn Weisberg, and to all of the people there for your unbelievable software. I think the whole world agrees! Finally to Discreet, specifically Liz Tan and Peter Nguyen: thank you so much for your help in allowing me to incorporate 3D Studio Max into my book. I can’t believe how prompt and courteous you were!
About the Author DAVID FRANSON has been a professional in the field of networking, programming, and 2D and 3D computer graphics since 1990. In 2000, he resigned his position as Information Technologies Director at one of the largest entertainment law firms in New York City to pursue a full-time career in game development. Between being distracted by flying remotely controlled airplanes and studying tae kwon do, artistry for games has become the new passion in David’s life.
Contents at a Glance Introduction . . . . . . . . . . . . . . . . . . . . xx Chapter 1
The History of Game Graphics . . . . . . . . . 1
Part One 3D Modeling with trueSpace. . . . . . . . . . . . . 11 Chapter 2 Chapter 3 Chapter 4
Getting Ready to Model: Concept Art . . . . . . . . . . . . . . . . . . . . 13 Modeling the RF-9 Plasma Gun with trueSpace 6 . . . . . . . . . . . . . . . . 25 Modeling the Slogre Character with trueSpace 6 . . . . . . . . . . . . . . . . 65
Part Two Unwrapping the UVs with DeepUV . . . . . . . 95 Chapter 5 Chapter 6
U-V Mapping the RF-9 Plasma Gun with DeepUV. . . . . . . . . . . . . . . . . 97 U-V Mapping the Slogre with DeepUV . . . . . . . . . . . . . . . . . . . 149
Part Three Unwrapping the UVs with DeepUV . . . . . . . 183 Chapter 7 Chapter 8 Chapter 9 Chapter 10
Game Texturing . . . . . . . . . . . . . . . . . 185 Inorganic Texture Tutorials with Photoshop . . . . . . . . . . . . . . . . . 193 Advanced Texturing Examples . . . . . . . 353 Organic Texture Tutorials with Photoshop . . . . . . . . . . . . . . . . . 395
Contents at a Glance
Chapter 11 Chapter 12
Skinning the RF-9 Plasma Gun with Deep Paint 3D and Photoshop . . . . 429 Skinning the Slogre with Deep Paint 3D and Photoshop . . . . . . . 475
Part Four Preparing Assets for Games with 3D Studio Max . . . . . . . . . . . . . . . . . 509 Chapter 13 Chapter 14
Making the RF-9 Plasma Gun Game-Ready with 3D Studio Max . . . . . . 511 Making the Slogre Game-Ready with 3D Studio Max and Character Studio . . 535
Part Five Bringing It All Together. . . . . . . . . . . . . . . 583 Chapter 15
Bringing Your Work into the Torque Game Engine . . . . . . . . . . . . . 585
Postscript
Finding Work as a Game Artist . . . . . . 593
Part Six Appendices. . . . . . . . . . . . . . . . . . . . . . . . 603 Appendix Appendix Appendix Appendix
A B C D
Appendix E Appendix F
A 3D Modeling Primer . . . . . . . . . . . . 605 A 2D Graphics Primer . . . . . . . . . . . . 617 Photoshop 6 Keyboard Shortcuts . . . . 631 Glossary of 2D- and 3D-Related Terminology . . . . . . . . . . . . . . . . . . . 639 Related Web Sites and Links . . . . . . . . 657 What’s on the CD-ROM?. . . . . . . . . . . 669 Index. . . . . . . . . . . . . . . . . . . . . . . . 673
vii
Contents Letter from the Series Editor. . . . . . . . xviii Introduction . . . . . . . . . . . . . . . . . . . . . xx
Chapter 1 The History of Game Graphics. . . . . 1 The Birth of the Computer Game Artist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 The Arcade Moves Back Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 The Personal Computer Blossoms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 The Gaming Revolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 The Graphics Revolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Third-Stage Booster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 The New Millennium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 The Future of Computer Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Part One 3D Modeling with trueSpace . . . . . . . . . 11 Chapter 2 Getting Ready to Model: Concept Art . . . . . . . . . . . . . . . . 13 Importance of Sketch Art . . . . . . . . . . The Asset Process . . . . . . . . . . . . . . . . The Making of Two Compound Assets . In My Mind’s Eye:The Slogre . . . . . The RF-9 Plasma Gun . . . . . . . . . . The Final Objective . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
14 15 17 17 20 24 24
ix
Contents
Chapter 3 Modeling the RF-9 Plasma Gun with trueSpace 6 . . . . . . . . . 25 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Setting Up the trueSpace 6 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Changing the World and Object Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Setting the Dynamic Rendering Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Texture Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Keeping the Point Edit Tools Handy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Modeling Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Modeling the RF-9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Step 1: Planning the Model’s Dimensions and Poly Count, and Creating a Reference Plane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Step 2: Build the Muzzle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Step 3: Build the Barrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Step 4: Build the Grip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Step 5: Build the Hoops and Hose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Step 6: Optimize and Triangulate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Export the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Chapter 4 Modeling the Slogre Character with trueSpace 6 . . . . 65 Modeling Pre-Considerations. . . . . . . . . . . . . . . . Modeling the Slogre . . . . . . . . . . . . . . . . . . . . . . . Step 1: Build the Body . . . . . . . . . . . . . . . . . . Step 2: Build the Leg . . . . . . . . . . . . . . . . . . . Step 3: Build the Arm. . . . . . . . . . . . . . . . . . . Step 4: Complete the Model (Well, Half of It) Export the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
68 69 70 78 82 88 93 93
Contents
Part Two Unwrapping the UVs with DeepUV . . . . 95 Chapter 5 U-V Mapping the RF-9 Plasma Gun with DeepUV . . . . . . . . . . . . 97
AM FL Y
Installing the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Introduction to DeepUV 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Example: Unwrap the Widget. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Automatic Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Manual Mapping: Isolate and Unfold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Mapping the RF-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Preparing the Model for Texturing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Plan of Attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Step 1: Unwrap the Grip and Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Step 2: Unwrap the Rear Hoop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Step 3: Unwrap the Barrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Step 4: Unwrap the Front Hoop and Hose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Step 5: Unwrap the Muzzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Step 6: Pack the Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Step 7: Update the U-Vs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
TE
x
Chapter 6 U-V Mapping the Slogre with DeepUV . . . . . . . . . . . . . . . 149 Completing the Slogre Model in 3D Studio Max 5. Optimize the Mesh . . . . . . . . . . . . . . . . . . . . . Edit the Mesh . . . . . . . . . . . . . . . . . . . . . . . . . Clone and Attach. . . . . . . . . . . . . . . . . . . . . . . Add Some Tusks . . . . . . . . . . . . . . . . . . . . . . . Smooth Out the Bumps. . . . . . . . . . . . . . . . . . Export to DeepUV! . . . . . . . . . . . . . . . . . . . . .
Team-Fly®
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
151 152 152 155 157 158 159
xi
Contents
Unwrap the Slogre’s U-Vs . . . . . . . . . . . Step 1: Unwrap the Legs . . . . . . . . . Step 2: Unwrap the Arms. . . . . . . . . Step 3: Unwrap the Head and Body. Pack the Map . . . . . . . . . . . . . . . . . . . . . Update and View the Results in Max . . . Summary . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
160 160 169 175 180 180 182
Part Three Unwrapping the UVs with DeepUV . . . 183 Chapter 7 Game Texturing. . . . . . . . . . . . . 185 Introduction to Game Texturing. Types of Textures . . . . . . . . . . . . Hand-Drawn Textures . . . . . Photo-Based Textures . . . . . Compositing Textures . . . . . Seamless Textures . . . . . . . . Animated Textures. . . . . . . . Summary . . . . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
186 186 187 188 189 190 191 191
Chapter 8 Inorganic Texture Tutorials with Photoshop . . . . . . . . . . . . . 193 Texture Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Brick Textures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Brick Procedure #1: From Scratch. . . . . . . . . . . . . . . . Brick Procedure #2: From an Existing Image . . . . . . . . Brick Procedure #3: A Quick Composite (Yeah, Right) Cement Textures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Plain and Boring Cement . . . . . . . . . . . . . . . . . . . . . . . Not So Plain and Boring Cement. . . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
195 196 197 203 206 219 219 222
xii
Contents
Rock and Stone Textures . . . . . . . . . . . Mineral Rock . . . . . . . . . . . . . . . . . Granite . . . . . . . . . . . . . . . . . . . . . Sandstone . . . . . . . . . . . . . . . . . . . Hot Lava . . . . . . . . . . . . . . . . . . . . Cold Lava . . . . . . . . . . . . . . . . . . . Marble . . . . . . . . . . . . . . . . . . . . . . Asphalt . . . . . . . . . . . . . . . . . . . . . Stone Wall Set . . . . . . . . . . . . . . . . Metal . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Metal . . . . . . . . . . . . . . . . . . Shiny Metal . . . . . . . . . . . . . . . . . . Metal from an Image . . . . . . . . . . . Rusted Metal . . . . . . . . . . . . . . . . . Diamond-Plated Metal . . . . . . . . . . Peeling Paint on Metal . . . . . . . . . . Metal Panels (and Spaceship Hulls) Pipes,Wires, Rivets, and Screws . . . Wires . . . . . . . . . . . . . . . . . . . . . . . . . And the Rest . . . . . . . . . . . . . . . . . . Wood . . . . . . . . . . . . . . . . . . . . . . Glass . . . . . . . . . . . . . . . . . . . . . . . Decals . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . 229 . . . . . . . . . . . . . . . . . . . . . . 229 . . . . . . . . . . . . . . . . . . . . . . 233 . . . . . . . . . . . . . . . . . . . . . . 236 . . . . . . . . . . . . . . . . . . . . . . 243 . . . . . . . . . . . . . . . . . . . . . . 248 . . . . . . . . . . . . . . . . . . . . . . 249 . . . . . . . . . . . . . . . . . . . . . . 256 . . . . . . . . . . . . . . . . . . . . . . 264 . . . . . . . . . . . . . . . . . . . . . . 277 . . . . . . . . . . . . . . . . . . . . . . 278 . . . . . . . . . . . . . . . . . . . . . . 279 . . . . . . . . . . . . . . . . . . . . . . 281 . . . . . . . . . . . . . . . . . . . . . . 287 . . . . . . . . . . . . . . . . . . . . . . 298 . . . . . . . . . . . . . . . . . . . . . . 302 . . . . . . . . . . . . . . . . . . . . . . 306 . . . . . . . . . . . . . . . . . . . . . . 311 . . . . . . . . . . . . . . . . . . . . . . 318 . . . . . . . . . . . . . . . . . . . . . . 325 . . . . . . . . . . . . . . . . . . . . . . 325 . . . . . . . . . . . . . . . . . . . . . . 332 . . . . . . . . . . . . . . . . . . . . . . 334
Chapter 9 Advanced Texturing Examples . . . 353 Wood Crate with Explosives . . . . . . . . . . . . A Quick Note on the Crate’s U-V Map . Medieval Castle/Haunted House Gate . . . . . High Tech . . . . . . . . . . . . . . . . . . . . . . . . . . . Time Counts . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
354 364 365 379 393 394
xiii
Contents
Chapter 10 Organic Texture Tutorials with Photoshop . . . . . . . . . . . . 395 Skin and Bones . . . . . . . . . . . . . . . . . . . . Lizard/Dinosaur Skin . . . . . . . . . . . . . Rhinoceros Skin. . . . . . . . . . . . . . . . . Bone (Using Displacement Maps . . . . Torn Flesh . . . . . . . . . . . . . . . . . . . . . Clothing. . . . . . . . . . . . . . . . . . . . . . . . . . Camouflage . . . . . . . . . . . . . . . . . . . . Wrinkles (Using Displacement Maps) Planetary Textures . . . . . . . . . . . . . . . . . . Earth . . . . . . . . . . . . . . . . . . . . . . . . . Dry Lake Bed . . . . . . . . . . . . . . . . . . Water . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
396 397 400 402 406 413 413 417 419 419 422 425 427
Chapter 11 Skinning the RF-9 Plasma Gun with Deep Paint 3D and Photoshop . . . . . . . . . . . . . 429 Identifying the RF-9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Thoughts on Texturing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Texturing Techniques You’ll Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . Texturing the RF-9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 1: Linking the U-V Map to Deep Paint 3D and Photoshop . Step 2:Texturing the Hoops. . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 3:Texturing the Bottom Hose . . . . . . . . . . . . . . . . . . . . . . Step 4:Texturing the Grip and Trigger . . . . . . . . . . . . . . . . . . . . Step 5:Texturing the Barrel . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 6:Texturing the Muzzle . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
431 434 434 435 435 443 450 453 459 469
xiv
Contents
Preparing the Map for 3D Studio Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
Chapter 12 Skinning the Slogre with Deep Paint 3D and Photoshop . . . 475 Identifying the Slogre’s Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Thoughts on Texturing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Texturing the Slogre. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 1: Linking the U-V Map to Deep Paint 3D and Photoshop . Step 2:Texturing the Head. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step 3:Texturing the Arms, Legs, and Body . . . . . . . . . . . . . . . . Step 4:Texturing the Feet and Hands. . . . . . . . . . . . . . . . . . . . . Step 5:Texturing the Cuffs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Clean Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preparing the Map for 3D Studio Max . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
477 479 480 480 488 502 504 505 507 507 508
Part Four Preparing Assets for Games with 3D Studio Max . . . . . . . . . . . . . 509 Chapter 13 Making the RF-9 Plasma Gun Game-Ready with 3D Studio Max . . 511 Applying the Skin to the RF-9 . . . . . . . . . . . . Aligning the Pivot Point . . . . . . . . . . . . . . . . . Creating the Bounding Box . . . . . . . . . . . . . . Adding and Manipulating Nodes. . . . . . . . . . . Embedding the Shape (for Torque Users). Adding the Dummies . . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
513 515 519 522 524 525
xv
Contents
Exporting the RF-9 for the Torque Game Engine . Viewing the Model in Torque . . . . . . . . . . . . . . . . Adding Levels of Detail (LODs) . . . . . . . . . . . . . . Viewing the New Level of Detail in Torque . . Tips for Exporting to Other Game Engines . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
527 528 529 533 533 534
Chapter 14 Making the Slogre Game-Ready with 3D Studio Max and Character Studio . . . . . 535 Applying the Skin to the Slogre . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 Scaling and Aligning the Pivot Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 Scale the Mesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 Set the Pivot Point. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 Some Final Mesh Adjustments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 Creating the Bounding Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 Preview in Torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 Exporting the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 Viewing the Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 Bones, Skeletal Weighting, and Animating with Character Studio . . . . . . . . . . . . . . . . 554 How Character Studio Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 Adding and Attaching a Biped . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 Weighting the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 Adding and Manipulating Dummy Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 Linking the Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 Create a Root Pose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579 Exporting and Viewing the Slogre in Torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579 Levels of Detail (LODs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 Last Note on Other Game Engines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582
xvi
Contents
Part Five Bringing It All Together . . . . . . . . . . . 583 Chapter 15 Bringing Your Work into the Torque Game Engine . . . 585 Playing Real Wars Using the Slogre and RF-9 . Testing the Slogre . . . . . . . . . . . . . . . . . . Locating the RF-9 Plasma Gun . . . . . . . . . Editing the World. . . . . . . . . . . . . . . . . . . . . . Terrain Editor . . . . . . . . . . . . . . . . . . . . . Adding Other Objects . . . . . . . . . . . . . . . Texturing Buildings. . . . . . . . . . . . . . . . . . Saving Your Modifications . . . . . . . . . . . . . The Last Word. . . . . . . . . . . . . . . . . . . . . . . . Postscript Finding Work as a Game Artist. . . Getting a Job with a Game Company. . . . . . . Job Positions . . . . . . . . . . . . . . . . . . . . . . . . . Working on a Game-Development Team . . . . Tools of the Trade . . . . . . . . . . . . . . . . . . Working with Programmers . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. 586 . 586 . 587 . 588 . 588 . 590 . 590 . 592 . 592 . 593 . 594 . 596 . 599 . 600 . 600
Postscript Finding Work as a Game Artist . . . . . . . . . . . 593 Getting a Job with a Game Company. . . . Job Positions . . . . . . . . . . . . . . . . . . . . . . Working on a Game Development Team . Tools of the Trade . . . . . . . . . . . . . . . Working with Programmers . . . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. 594 . 596 . 599 . 600 . 600
Contents
Part Six Appendices . . . . . . . . . . . . . . . . . . . . 603 Appendix A A 3D Modeling Primer . . . . . . . 605 Appendix B A 2D Graphics Primer . . . . . . . . 617 Appendix C Photoshop 6 Keyboard Shortcuts . . . . . . . . . . . . . . . . 631 Appendix D Glossary of 2D- and 3D-Related Terminology. . . . . . . . . . . . . . . 639 Appendix E Related Web Sites and Links . . . 657 Appendix F What’s on the CD-ROM? . . . . . . 669 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
xvii
xviii
Letter from the Series Editor
Letter from the Series Editor
If you just picked this book up and are trying to decide whether it’s cool, then let me tell you: it’s beyond cool. In fact, there are words I would like to use to describe it that are illegal in most states, so I will refrain. 2D Artwork and 3D Modeling for Game Artists is the first book to really bridge the gap between art and game design. Most books about game art are written by non-technical artists, or by non-engine programmers. We were lucky to find David, as he is a gifted artist and modeler and can program as well. I guarantee that there’s nothing like this book. You’re going to be blown away by the sheer amount of amazing material and graphics in this book. What’s more, this book includes step-by-step annotated explanations of every single operation you will need to create 2D art and 3D models for your games. The book starts out with a very cool historical review of game art; after that, it begins to show you how to storyboard an idea, something simple: a plasma gun. Then, step-by-step, every single detail of the design, art, and modeling of this weapon is detailed. When you’re done with that, David takes you deeper and deeper into every single aspect of 2D art and 3D modeling for games. The book is simply insane! Look at the Table of Contents right now—it’s just too good to be true: advanced texturing, skinning, bones, character animation, advanced texture preparation, putting everything together to create complete game ready assets with 3D Studio Max, and then dropping them into the Torque Engine to see them run.
Letter from the Series Editor
I am primarily a technical person, but I’m also an artist; I can draw, 3D model, do sound, design, and write. But when you see someone with David’s talent then you realize who the real artist is! This book really rocks, and it can only improve your skill set. Nowhere but in 2D Artwork and 3D Modeling for Game Artists will you find such a complete treatise on 2D artwork and 3D modeling for games or interactive media. Sincerely,
André LaMothe Series Editor, Premier Game Development Series
xix
Introduction
W
AM FL Y
elcome to the wonderful world of graphic artistry and design for video games! If you’re like me, you’ve taken a keen interest in learning how to create all of those cool graphics you’ve been seeing while perched behind your personal computer, Playstation, Nintendo, or Sega. Well, that’s what this book is all about.
TE
For the most part, the digital gaming art world encompasses a few primary categories: 2D texture and background creation, 3D modeling and animation, and level design. We’ll be diving deep into the first two, then adding our hard-earned work to a live video game. Level design, however, is subject for another book entirely (don’t tempt me)! My intention with this book is to rev up your engine and get you saturated with many of the how-to’s of game artwork—with hopes that with your natural creativity I’ll see your work in a hot game title in the future. As a fairly creative person myself, I find it easy to quickly absorb artistic ideas that get me going with tons of unique creations. I don’t want this book to be anywhere near boring; rather, as you dig into each section I want you to feel that I’m giving you some totally cool ideas. But before you lay down a single pixel in your blank, eagerly awaiting image, you’ll need a heads-up on the required hardware and software you’ll need to have, and what you should be familiar with in order to accomplish many of the tasks in this book. On that note, read on, and I’ll make sure not to conceal any secrets!
What You Need to Know This book assumes one of the following: ■ ■
■
You’re an aspiring video game artist with no graphical talent whatsoever. You have an aptitude for graphics and want to explore the field of video game design. You have been creating computer graphics for a while but need direction when it comes to applying your talent in video games.
Team-Fly®
Introduction
xxi
Either way, I hope that at the very least you have a solid knowledge of the Microsoft Windows 95, 98, Me, XP, or NT/NT2000 operating system environment. This book requires lots of Ctrl+clicking, Alt+clicking, dragging-and-dropping, and whatnot, along with critical file saves and retrievals, dialog box interaction, all the intermediate functions of general Windows operation. If your Windows skills are a little rusty, please pick up a refresher course to help keep up. I’m going to assume, however, that you don’t know much at all about the programs discussed in this book. Even so, I won’t spend too much time teaching you each program in its entirety. Instead, I’ll cover procedures and examples that will be helpful to you when it comes to game design. Besides, I believe the best way to learn is by doing. Don’t think TIP you’ll be wallowing around in easy There are trueSpace and Photoshop soup all of the time, however; as tutorials located on this book’s CD-ROM each section progresses, I’ll demonthat will help to introduce you to these strate more and more complex techprograms. I’ll cover modeling and texniques. That way, even if you are turing using these two powerful tools, so already familiar with the program I highly recommend that you check being discussed, you might be able those out if you’re new to them. to pick up some tricks, tips, or techniques that are new to you.
What You Need to Have First and foremost, you must have a computer (d’oh!), an IBM-compatible running Windows 95 or (preferably) better. For graphics development with 3D Studio Max, which we’ll use in Part IV, “Preparing Assets for Games with 3D Studio Max,” it’s better to run NT2000 or higher for stability and its OpenGL environment. I usually do my work and play games on Windows 98, however. As far as the machine itself, of course I’d love to see you driving the Lamborghini of all computers, but most game artists (like me) usually don’t have that kind of budget. Nowadays computers are so darn good that for under $1,000 you can get a Pentium 4, 2+ GHz with 512MB RAM, a 128MB video card, and 60GB hard disk space. For what you’ll be doing, that’s ample. Consider this: For development, I have a PIV-1.7GHz with a GeForce 3 card and 512MB of RAMBUS memory. This system does what I want, but will slide off the deep end as the bigger and better software comes out.
xxii
Introduction
Besides having a computer, you may find it comes in handy to have a graphics tablet when creating textures for your game environment. Mine’s a Wacom 6×8 that you can pick up for something like $250. Textures are a vital part of game artwork—the detailed images that are applied to walls, floors, and other 3D objects that give them the illusion of realism—and a graphics tablet makes hand-painting them much easier, since it’s much more like working with pen and paper. Also, a digital camera is invaluable; if you’re going to texture or model anything, by all means go outside and take snapshots of the real thing. This will help you keep things looking realistic and acceptable. In fact, many textures in games are composites—that is, images derived from a photograph combined with artistic effects that you apply. When it comes to games and graphics, use this list when prioritizing what your system should have, in order of importance: 1. Video card with 3D acceleration. This is probably the most important feature of a computer when playing games or making graphics and animations. Your card should have a high-end processor and as much memory as you can afford—games store their textures and graphics in this lightning-fast memory, and without it your system will appear slow. My card has 128MB, and the graphics are smooth and good (for now). If you invest in a brand-name card like a 3DLabs Wildcat or a card with a GeForce3+ chip onboard, you’re set. Also pay attention to the processing ability of the card’s graphics processing unit (GPU)—if the card has a fill rate of over a billion pixels per second and/or a processing rate over 30-million triangles per second, you’ll tear your graphics up! 2. Pentium III central processing unit (CPU) or better. Much of the newer 3D software and games can barely run on anything less than a PIII; I can barely even run 3D Studio Max 4 on my old P-II. Again, it comes down to what you can afford (and how much time you want to wait when rendering), but keep in mind that even if you have the baddest video card around, it won’t make a hill of beans of a difference if your CPU is slow. You have to strike a balance: If your video card is fast and your CPU is slow, the computer will lag because the video card is waiting for the CPU to chew away on the data. Conversely, if you’ve got a hot P-4 2GHz CPU and a lousy video card, things will appear very fast but you won’t have nearly the resolution and/or color information you’d like. 3. Computer memory. I think we’ve reached a bit of a plateau in the memory business; the average system seems to have around 256 MB and does fine. I’d
Introduction
xxiii
recommend that you have at least 512MB, however, because when you start doing renderings and animations, you’ll find that memory speeds things up. Programs like trueSpace and 3D Studio Max are extremely math and graphics intensive; to aid in their processing, they use as much RAM as is available to store temporary data. Besides, memory has become fairly cheap. 4. Monitor. After all, you’re a graphics person, and you need to see what you’re doing, right? Personally, I hate having to constantly scroll all over the place to see my work. The larger the monitor, the easier it is for you to see everything. You should have, at minimum, a 17-inch screen; fortunately, monitor sizes are continuing to go up and the prices down. I have an (now I’m going to brag) NEC 21-inch monitor; once you’ve worked with that for a while, you want to cry any time you try to work on something smaller. I can see from here to the moon with this thing. I’ve also installed a second video card in my system and hooked up a smaller 15-inch screen to that. If you’re running Windows 98/Me/Xp/NT2000, you can tell Windows to split up the desktop across both screens, so you can see your work on one screen and have another window open on the other screen. Kind of neat, huh? This really helps me when I’m modeling, since I can put all my pilot windows on the smaller screen. 5. Hard drive. Most computers purchased after 1998 have at least 10GB of disk space. If your hard drive is low on disk space, this will be a problem. Programs like Photoshop, which you’ll use extensively, cache out tons of temporary data on the drive while you work; without free space, the program will slow to a halt, sometimes freezing your system. Make sure that your system has a good 5GB free disk space after all your programs are installed, especially since graphic images and animations pile up quick. Hard drives are so cheap nowadays anyway that it almost hurts—for $100, you can pick up a 40GB drive, more than enough to contain all the programs you’ll need with plenty of space left over. If you want some serious drive power, however, consider purchasing an Ultra160 SCSI card and drive combination—these two components (most commonly purchased from Adaptec) make your data tranfers between your hard drive and the rest of your system absolutely rock at 160MB per second. 6. CD-ROM. Obviously you need this to load up your software and play games, but speed isn’t so much an issue anymore. A good thing to have is a writable or re-writeable CD-ROM (CDW or CDRW, respectively)—as you collect pictures, textures, and animations, it’s good to offload them to CD instead of letting them linger on your hard drive, eating up space. Also, this is an inexpensive way to back up your data from time to time.
xxiv
Introduction
7. Tape backup unit. I can’t tell you how important it is to back up your data! As an artist, you’ll spend hours and hours creating and animating, sometimes just one object or scene. If your data isn’t backed up daily and your hard drive crashes, you risk losing your work, and, as a result, throwing your good computer out a second-story window. Backup units are somewhat cheap, and I think spending $150 to save countless hours of work is worth it. You can use your CD-writer to back up the data effectively, but the advantage of the tape unit is that the storage space is typically 10 to 20 times more than that of a writable CD. I have a two-week library system, 10 tapes in all, in which I rotate the backup sets. This way, if I need to restore work I’ve deleted or lost, I can go back as far as two weeks ago and retrieve the data. 8. Input devices. Having a tablet, camera, scanner, or any other device that will allow you to capture and process images is always helpful, but not necessary. They do, however, make your life easier and more productive, and at the same time help you make your work more original. 9. Software. The last, and most obvious thing you’ll need to have, are the programs required to perform your game art creations. This book primarily teaches the use of trueSpace, an excellent 3D modeling program with a powerful NURBS (non-uniform rational b-spline) interface for creating highly realistic organic models; DeepUV, for unwrapping and manipulating texture coordinates on 3D models; Photoshop, one of the most powerful 2D art and imaging programs in the world, which we’ll use for the creation of textures; and 3D Studio Max, one of the most widely used modeling and animations programs in the gaming industry. All of these programs are included on this book’s CD-ROM as demo versions. Well, I hope this helps a little. Remember, this is all about money and what you can afford. I happen to be a computer professional as well, so over the years I’ve amassed quite a bit of equipment (in fact, I can’t even see my desks anymore). I don’t expect you to have a $15,000 system, but if you consider my list and prioritize, you should be good to go—you can always add on or upgrade later on.
How This Book Is Organized This is a fairly large book because there’s so much material to cover and so many cool tutorials. That said, I couldn’t possibly fit every technique the gaming industry uses in 10 books, let alone one. I’ve tried to arrange things so you can get your feet wet and gain some experience, with the hopes that you’ll set off in your own direction.
Introduction
xxv
I’ve broken the book into five parts. The first part, “3D Modeling with trueSpace,” starts everything off by developing concept sketch art, then using Caligari trueSpace to generate 3D game models based on the sketches. trueSpace is, in my opinion, quite possibly the best modeling program I’ve ever used due to its intuitive development interface. Part II, “Unwrapping the UV’s with DeepUV,” we’ll transfer our freshly created models to DeepUV, a specialized program dedicated to preparing models for proper texture alignment. Part III, “Texturing with Photoshop and Deep Paint 3D”, I’ll show you how to generate a broad spectrum of textures that may be applied to anything from game levels, background art, 3D models, and then some. Deep Paint 3D will be our middle man and helper tool in conjunction with Photoshop to create the skin textures for our models from Part I. Part IV, “Preparing Assets for Games with 3D Studio MAX,” we’ll import our textured models into one of the most powerful and important modeling and animation programs, 3D Studio, and prepare them for video games. Part V, “Bringing It All Together: Level Design,” you’ll take all of your hard-earned texturing, modeling, and animation work and place it into a live gaming environment. This book includes a demo of the Torque game engine, into which I’ll show you how to place everything you’ve created and see it all in action in a beautiful 3D game world.
What’s on the CD-ROM? I’ve compiled so much stuff for you to look at, it almost pains me to think about it all. Aside from the hundreds of free textures and models, the Programs section contains demo versions of all the software you’ll need and then some. If you don’t already own trueSpace 6, DeepUV 1, Photoshop 7, or 3D Studio Max 5, you can use these demos to get through most of the book; they do, however, have a few drawbacks. Demos usually have a built-in feature that limits you in some way, perhaps preventing you from saving your work, or causing the demo to “expire” after 30 days. If you find yourself keenly interested in game development, I highly recommend that you flat-out purchase the programs you need. Photoshop and trueSpace are relatively inexpensive at around $600 each (I say relatively, as it relates to most other graphics programs with muscle); the full version of Max, on the other hand, weighs in near a whopping $3,500. It is, however, a titanium sword in your belt if you’ve got it.
xxvi
Introduction
I’ve also included Realm Wars, which is a 3D FPS (first person shooter) game and demo of Garage Game’s Torque Engine, which you’ll need for seeing your work in action. Also, you must have DirectX, downloadable from http://www.microsoft.com/directx , installed in order to play the 3D games and to use the 3D software. Unfortunately, this book had to be printed in black and white (can you imagine if it was in color? It’d be $1200 a copy!), so you won’t be able to get a decent sense of what the color graphics really look like just by reading. For this reason, all the sample graphics and figures from each chapter are stored in separate directories on the CD-ROM. I encourage you to view all the images on the CD as you follow along.
One Final Note . . . The digital gaming world is an unbearably exciting place to be, because it keeps our minds alive and active and stimulates human creativity. As the ancient Greek philosopher Protagoras said, “Man is the measure of all things.” Therefore, I believe that as you read, learn, and do, you’ll be propelled on your own track, using your new-found wisdom and creativity to sow the seeds of your own success. Enjoy!
CHAPTER 1
The History of Game Graphics
1.
2
The History of Game Graphics
I
n this chapter I will cover ■ ■
■ ■ ■
■
A brief compilation of the history of games and thier graphical content The progress of gaming technology and the impact it had on the quality of games How arcade-style games dissolved in the eyes of the personal computer The competition between game consoles and the personal computer The revolution of 3D games and their progress due to better computing technology The future of the gaming industry
I’ve been playing video games since I got my first Coleco in 1977. Although the wondrous days of Pong and Tank Battle are long gone, they were the roots of modern-day gaming. Back then, seeing simple black and white squares of pixels moving around on your television screen—at your command—was truly phenomenal. We had no idea that things could get much better than that. The electronics industry, however, having seen the excitement in our eyes as we clutched our game paddles for hours on end, foresaw an extreme future for video gaming, and out popped the video game console. Companies like Mattel, producing the Intellivision (*sigh*), and Atari, with its model 2600, were among the first to introduce awesome interactive game consoles—small computers that were specifically designed for game play. These devices were constructed to accept program cartridges that contained code written in a specific language that ultimately encapsulated a unique game engine with graphic design of the game programmer’s choice. Up until around 1981, games were usually programmed and designed in a matter of months, usually by only one or two people! Nowadays a top-selling game usually requires a team of 20 or more, at least a couple of years, and millions of dollars to produce. The graphic content alone is typically generated by a half dozen game artists—people like yourself.
The Birth of the Computer Game Artist
The Birth of the Computer Game Artist In the early 1980s, the game industry was booming. The affordable home consoles and new computer systems such as Tandy, Commodore, and Apple that were capable of running games were good, but nothing beat the stand-up video games at arcades. I must’ve spent 80 percent of my allowance at the arcade every week! The graphics and sounds on those machines were incredible. Midway, Bally, Namco, Atari and Konami were among dozens of electronics manufacturers racing furiously to pump out new and improved arcade games. There was nothing boring about the arcade. With a new game released almost every month, the graphics became more robust, with some in the mid-1980s, such as Tron and I Robot, being among the first to simulate 3D graphics using vectorbased rendering techniques. Although these games lacked texture, they gave people the first view of what video games were to become in the years ahead. Around 1982, game design was becoming so complicated it needed to be segregated into several fields. Gone were the days that a two-man programming team could create a game. If you were an independent game developer who wanted to make it in the big leagues, you needed one or two programmers, one or several graphic artists, and a sound expert. Programmers were the ones who made the games possible; in many instances it was (and still is) the programmer who could take a game with simple graphics and make it one of the hottest sellers in history. (PacMan, anyone?) Even so, in many respects, the artists were the most important people in the group. From a sales standpoint, the game had to
TIP If you want to indulge yourself with nearly all of the arcade games from the 1980s, and have a Pentium-level personal computer, check out http://www.classicgaming.com. This site can provide you with special emulating software that, when loaded on your PC, will “emulate” the hardware of the old arcade machines.Then, it’s only a matter of downloading any one of the hundreds of ROM files (ROM stands for read-only memory, the original unaltered game file that was loaded into the arcade machine), placing it into the ROM directory of the emulator, and firing it up.You won’t be getting a remake of the game—it’s the real McCoy. These ROM files are also available for download at this site.
3
1.
The History of Game Graphics
be prodigiously visual or it wouldn’t produce; a typical game required hundreds and hundreds of sprites (that is, drawings of a single character in various positions), quality background art, and eye-catching special effects.
AM FL Y
Thanks to these advancements in games, not to mention the advent of such gaming platforms as Sega, Nintendo, and the Intel x86-based personal computer, general graphic-design and illustration professionals saw more and more openings in the game industry to create game products that had outstanding consumer potential; as a result, many graphic artists dropped their jobs to take on game design.
The Arcade Moves Back Home
By 1985, Sega of America was introducing its 8-bit Sega Master System game console to the world, alongside Nintendo’s NES (Nintendo Entertainment System). These consoles ported games found in arcades directly to the player’s home, with the only drawback being the resolution difference between the arcade’s screen and your television’s. But here was the upswing: for a low, low price (which, no doubt, involved you mowing 20 or 30 lawns), you no longer had to waste your parents’ money on arcade games! Great games like Phantasy Star, Super Mario Brothers, and Final Fantasy kept kids in the abode.
TE
4
Nintendo was the forerunner through the late 1980s, suppressing Sega. Most programmers and artists worked for Nintendo due to the company squelching 90 percent of the home entertainment market; in 1989, however, Sega revamped its equipment to produce the Sega Genesis system, running games at 16-bit speeds. This system was by far more exciting; the graphics, sounds, and general game play catapulted over the NES. With this new console, Sega’s checkmate move on the game market was with the top seller Sonic Hedgehog. Utilizing fast-paced parallax scrolling (layered images whose background moves slower than the foreground, giving the illusion of depth) and flattened 3D imagery (3D models rendered as 2D sprite animations), Sega reopened its doors to success. Sonic Hedgehog truly captured state-of-the-art arcadestyle graphics that would become the forerunner of games in production for other console systems. I’ve spoken briefly about the history of console systems and the excitement of home-video game play, without recognizing the brilliance of the Sega Dreamcast, Nintendo64, or Sony Playstation. The modeling and texturing tutorials in this book
Team-Fly®
The Arcade Moves Back Home
About Bit-Processing Speeds Frequently you’ll hear about 8-, 16-, 32-, 64-, and 128-bit this that and the other. Although people use these terms with abandon, not everybody knows that they mean! Here’s the skinny: Computers are based on binary, where all numbers are a power of two.The CPU (central processing unit) of the console or personal computer is designed by engineers to process programming instruction sets (for example, game code) using these numbers as the length, in terms of bits per instruction, of game code that it cranks through every cycle. So as you play a game, if the machine you’re playing on is, say, 64-bit, then every computer cycle (each time the data is pumped through the system per second) the CPU will process an instruction 64 bits in length.This may seem a bit (no pun intended) confusing, but it just means the higher the bit number, the faster the machine; and the faster the machine, the more complex graphics, sound, and general game code it can handle.You’ll also see these bit capabilities applied to other things like sound and video cards. See Appendix B, “A 2D Graphics Primer,” for more information on bitwise graphics.
can also be applied to these systems. Although this book encompasses a wide range of graphics techniques, it will focus mainly on a unique gaming device that seemed somewhat tentative in light of the gaming arena at one point in time. . . .
The Personal Computer Blossoms So far we’re up to the late 1980s and early 1990s, but my discussion hasn’t been much about the personal computer, largely due to the fact that, for the most part, home computers weren’t considered by many to be a popular gaming mechanism in the 1980s. The personal computer wasn’t dedicated to playing games, and therefore lacked the game-specific CPU and video-processing power that console systems had. We used computers back then for more general things like word processing,
5
6
1.
The History of Game Graphics
spreadsheets, business, and communications. Yes, there were some games, but for the most part, they stunk. My first computer was this great Tandy CoCo (Color Computer) my folks bought me in 1983, on which I learned how to program in BASIC and made some pretty cool programs that displayed interesting polygon-filled graphics. My second, well, was some 80286 I think I bought in 1988 at Montgomery Ward for a gazillion dollars. It was my first true personal computer capable of running Windows 3.1—a revolutionary platform that I believe shook the computer world and charged up consumers to investing in their own computers. By 1989, I’d learned a great deal about computers and set off to actually build my own 486 from scratch. I put together a 486SX-25 with 4MB of RAM and an 80MB hard drive (can you believe that?? 80MB!!). This thing was hot—everything I ran on it was lightning. At one point I think I saw blue smoke coming out of the back! Anyway, as I recall, this was sort of a turning point—we now had computers with enough memory, fast enough processors, and decent swappable video cards to run appealing video games. The first noticeable shareware games (I was always into shareware—free games with limited levels that sucked you into buying the rest of the game) that I played on my 486 were games like Crystal Caves and Commander Keen, (you can still download these games from Apogee; go to http://www.apogee1.com/downloads.html. If your computer is a Pentium or better, you might need a pre-Pentium emulator to play in MS-DOS mode). By now many programmers and artists were shifting their attentions to the personal-computer gaming market. They saw the potential for making zillions by developing games for this platform; computers were becoming more and more flexible and multi-faceted, without being labeled as $2000 video-game consoles. Computers were also moving away from EGA (extended graphics array) video cards and moving toward VGA (video graphics array) and Super VGA cards, opening the doors for revolutionary 3D games. These cards in the early 1990s had 256-color capabilities, more than enough to present high-color and a typical 640×480 resolution.
The Gaming Revolution Most of the world delighted in playing games that appeared to be 3D, but not many people expected to be able to actually walk around in a virtual 3D world. id Software, however, did. Most of the games that had 3D geometry in the early 1990s
The Arcade Moves Back Home
merely presented a flattened 3D image illusion on-screen. What people believed to be 3D images were 2D sprites jumping and spinning in all sorts of different poses. Soon after id released Commander Keen, the company worked feverishly on creating the first 3D MS-DOS game for the personal computer. John Carmack, co-founder and lead programmer of id; Adrian, his brother and lead artist; and the rest of the id Software team shocked the world in 1992 with the release of Wolfenstein 3D. This game not only had a great plot, but while playing the game you could literally walk around walls, objects, and people! Very unheard of. The only problem back then was that the objects you walked around kept facing you, unlike the modern 3D games we play nowadays. (I forgive ‘em, don’t you?) Wolfenstein captured the world. The game play was awesome, the textures on walls were decent; it was only a matter of time before new and improved computers and video hardware came out that would rocket the 3D industry. Shortly thereafter, Apogee released Blake Stone, another great 3D game, but id came right back in 1993 with DOOM. If you had the newest hardware, man, this game was hot. The graphics were less pixilated; images were sharper, there were great texture-mapped floors and ceilings, things were gory, the player had awesome weapons, you name it. id was on top of the world, and just kept building on its own technology to crank out the next head-bashing game in 1994: DOOM II.
The Graphics Revolution By the mid 1990s, personal-computer gaming was hotter than ever. Of course, so were (and still are) console systems, with products like Nintendo64 and Sega Saturn selling like crazy, but computers were becoming so abundant that almost every household had one—making the market for personal-computer games unstoppable. More and more people demanded super-hot titles, which in turn fueled the need for better and more suitable video cards to handle these games. More important than the need for the great hardware was the programming barricade—developing a 3D video game from scratch would take years, buying a game engine (the actual million or so lines of code developed over the years by other gaming companies) typically cost $30,000. Plus, writing software that enabled games to support a 3D environment was tedious and time consuming anyway; even if you could, your game had to cater to the 100 or so different video cards that people had in their computers or it wouldn’t work. So can you guess who came up with the solution to all of this?
7
1.
8
The History of Game Graphics
Microsoft, upon releasing its 32-bit operating system Windows 95, acquired rights to and began development of a special SDK (Software Development Kit) called DirectX in 1995. DirectX was to be the programmers’ solution for importing 3D objects, textures, and animations into a game engine and creating a realistic 3D world; in addition, DirectX enabled programmers to alter their game worlds so that objects no longer faced you as you walked around them. The first few versions of DirectX were quite horrific, but near 1996 things started to pan out. DirectX became the focus of both 2D and 3D programming, with nearly all 3D games utilizing this SDK. Artists could create outstanding textures and models, develop levels, and hand it all to the programmers. The programmers could then take all the artist’s stuff and use DirectX to manipulate, rotate, light, and special-effect it all. So again id Software sprang out (expectedly) with another shocker—Quake. This 1996 release was truly magnificent. id had the upper hand because of its quintessential game-programming experience over the years, and in 1997 pumped out Quake II (by the way, if you haven’t played this game . . . man, where have you been?). I can honestly say that this game was one of my all-time favorites. At that exact time I bought this ridiculous Diamond FireGL 4000 video card, which I needed for 3D modeling (ridiculous because it pinched me for $1,500), and with the OpenGL support in both my card and the game, my jaw dropped. The textures in the game were far beyond phenomenal. Encapsulating real-time lighting effects, explosions flew brilliantly off the screen, bullet holes and blood decaled the walls and floors, you name it. So with the ever-increasing DirectX technology, the whole world was turning out 3D first-person shooters, 3D third-person RPG (role-playing game) perspectives, you name it. Even 2D parallax scrolling games used DirectX, such as Team 17’s Worms Armageddon. DirectX was the ultimate game-development tool—not just a programmers’ graphics tool, it incorporated multimedia, sound, and the ability for network and Internet play. By this time, the gaming industry was so intense that it needed to be broken down into a hierarchical structure. There was too much to handle, and artwork needed to fly minute-by-minute to achieve deadline performance. A typical gamedevelopment company might have a graphics team that looked like this: ■ ■ ■ ■
Creative Director Art Director Lead Artist Artist(s)
■ ■ ■ ■
Lead Animator Animator(s) Lead Level Designer Level Designer(s)
The Personal Computer Blossoms
With a graphics team like that, along with four or five programmers and sound people, a company could make a game that would hit the top 10. In the wake of Quake (I’m a poet and didn’t know it!) other great games came about, in particular one from Eidos: Tomb Raider. But it wasn’t just the 3D games taking the stage; after all, not everyone likes the first-person shoot ‘em up stuff. Microsoft put out that fire with Age of Empires, a perspective strategy (which I’ll cover later on), leading the way for a slew of other perspectives, strategies, and RPGs such as Blizzard’s Diablo.
Third-Stage Booster After Tomb Raider, along comes Valve, a subsidiary of Sierra, to blow the gaming market away. Utilizing id’s Quake engine, the Valve team summoned up its forces and in 1998 spat out the number one–selling game, Half-Life. This game truly set me on fire. It wasn’t just a game, but more like watching a five-star science-fiction movie—a 30-hour movie at that. From just the introduction, where the main character Freeman takes a ride into the Black Mesa facility, I was stunned. These people created such a believable atmosphere that throughout the course of the game, I’d just stop, walk up to walls, doors, objects, whatever, and just gaze at the texture or design. In some instances I thought Valve must have had architects working with them to achieve realistic interior building designs! I had been working with models and animations for a while, but from that point on I set out to learn how to create the graphics I saw in that game. I can honestly say that if it weren’t for HalfLife, I don’t think I’d be writing this book. My mind is open to all types of games, but as you can see, a 3D first-person shooter is my favorite. Half-Life was such a phenomenon and success that Valve couldn’t possibly stop there—over the next four years, Valve exhausted all possible perspectives on this game, releasing Opposing Force, a view from the military’s standpoint, and Counter-Strike, probably the most popular Internet game ever. I’ve sat up many nights whacking people (and getting whacked!) from all over the world in this game; eventually I had to
NOTE One of the great things about many 3D games like Quake and Half-Life is the fact that the programmers left their games open-ended. In conjunction with a level-editing program like World Craft, you can take Half-Life and build your own 3D game world using all of its models, textures, sprites, and animations, as well as your own.The models and textures demonstrated throughout this book may be used for games like these.
9
10
1.
The History of Game Graphics
give it up for a while because one day, while I was out shopping, I closed my eyes for a few seconds and could see the game play! I felt like a digital junkie.
The New Millennium As of this writing, midway through 2002 (and about the time of the release of Blue Shift, the fourth version of Half-Life, developed by Gearbox Software), a few other notable games were published that need mentioning here. First and foremost, I want to mention EA Games’ Undying, a really cool and gory creep show, with incredible textures—lots of rotting wood, moldy window panes, torn-up carpet, crumbling bricks, organic slime, you name it. Legend Entertainment’s Unreal Tournament, a killer Internet arena player, totally rocks—particularly the weapons and textures. And once again, id ricochets with Return to Castle Wolfenstein to take the lead again in the 3D-shooter industry.
The Future of Computer Games I’m not forgetting the game consoles or their power. The latest systems such as Sony’s Playstation II, Nintendo’s Gamecube, and Microsoft’s XBox are running 128-bit technologies with mind-boggling graphics and speed, but are still hindered by the television set. I know that’ll change soon, but because computers have matured, I’ve leaned more toward developing games on this platform rather than consoles because the graphics resolutions are way too cool. Don’t get me wrong—I believe the future of computers (and games) rests heavily on gaming consoles. The architecture of the console can produce graphic and game-play speeds that sail high over the personal computer, and one day we might see a new generation of computer that no is longer based on 8088 technology. Rather, there might be a merge of console and computer into one unit that has RISC (Reduced Instruction Set Computing) technology, which makes consoles like the Gamecube so fast. So what do I believe to be the future of digital games? Obviously we’re heading directly toward pure photorealism. I don’t think the next decade will show us Matrix-style worlds, but if you look at some of the CGI movies released recently, like Final Fantasy, just imagine that that wasn’t a movie, but a game on your computer screen. If it can be produced on a computer, all we need is the hardware to support it in order to move around in that world in real time—and the hardware to let us do that is literally right around the corner. Just be patient, my young Jedi. . . .
PART ONE
3D Modeling with trueSpace
2
Getting Ready to Model: Concept Art
3
Modeling the RF-9 Plasma Gun with trueSpace 6
4
Modeling the Slogre Character with trueSpace 6
CHAPTER 2
Getting Ready to Model: Concept Art
2.
14
Getting Ready to Model: Concept Art
B
AM FL Y
efore any game content is created, be it character models, textures, or even game levels, it is vital that a working game scenario be laid down. That is, your development team must construct a game plan with a generalized theme or synopsis, and detail the profile and anatomy of one or several lead characters. The working game scenario would also include a general game objective or mission, presenting the game’s environment and opening the doors for the creative process.
TE
Once this groundwork is in place, the next step toward generating the game content is to engage one or several sketch artists to generate concept art. Typically, sketch artists can crank out character and model sketches with lightning speed (that is, in a matter of minutes); these individuals are usually very creative, and flood the development team with ideas. That is what this chapter is all about: seeing the birth of game content through the eyes of a sketch artist. In this chapter I will cover ■ ■ ■ ■ ■
Sketch art and its importance when generating game models The game-content (asset) creation process Tools used in this process Generating ideas and concept art for a character and weapon models The components for these models and how they will affect the model’s complexity
Importance of Sketch Art Before I got into gaming on a professional basis, I frequently created models and animations onscreen, without trying to get the ideas down on paper. I’d concoct something in my mind, and improvise as I went along. Wrong! I can’t tell you what a difference it makes when you’re modeling something based on either pictures or sketches, and not on a whim. The reasoning behind this sketch-art stuff is that all financed game-development teams are on a tight time schedule to finish a game project; there’s usually no time during work hours to goof around, experiment, and create your own stuff. (Of course, creating at home for extra points is another story altogether!) As a team member and modeler, you’ll typically be handed sketch art
Team-Fly®
The Asset Process
of characters or models needing to be created, and off you’ll go using just the sketches as reference.
The Asset Process Having a few freshly developed pages of sketch art in your possession is no doubt enough to make you want to beam over to your workstation and start cranking out some sweet 3D models. However, there’s quite a bit more you ought to know before you create a single polygon onscreen—such as the type or style of 3D mesh you’ll create, the texture that will be wrapped around it, and so forth. Such specifications are assets that flow together in the creative process, and you should be aware of what they are and how they are closely linked to one another. Literally speaking, an asset is any entity belonging to an individual or group that is of any value. Likewise, in gaming, nearly every component that comprises a video game may be considered an asset—models, textures, sounds, maps, and even code are usually categorized into asset structures. A compound asset is typically a collection of two or more asset entities to make a whole. An example of a compound asset is a character model, which typically consists of a mesh, a texture skin, and an animation (or set of animations) all wrapped up in a nice game-ready package. Figure 2.1 illustrates the workflow for creating a compound asset such as a character model.
Figure 2.1 The workflow for creating a compound asset.
15
2.
16
Getting Ready to Model: Concept Art
As you can see, things are fairly straightforward here, and the first cell represents this chapter and your starting point. Here’s a quick explanation of what’s what: ■
■
■
■
■
■
Sketch art/storyboarding. This is the beginning of the creation process and the basis for this chapter. All ideas or plans to create anything should be in this form so everyone has a clear overview of what to expect. Mesh creation. This is the 3D (or 2D, in some cases) model created in any one of dozens of modeling programs on the market. The most common modeling programs used are trueSpace (I’ll be showing you how to model with that), 3D Studio Max, Maya, Lightwave, and MilkShape3D. U-V mapping. Before textures NOTE can be applied to a mesh, the A common misconception about U-V coordinates (also called modeling programs is that higher-end texture coordinates) must be programs yield better models. Mesh spread out flat and aligned objects, however, are generally low resproperly onto a texture map so olution with high-detail skins; higherthe texture artist can do his or end 3D programs are usually labeled as such due to their outstanding animaher job more easily. In this tion, rendering, and production abilities, book, I’ll show you how to use not their modeling abilities. DeepUV to unwrap and align the U-Vs of your mesh objects. In addition, programs such as trueSpace and 3D Studio Max can also perform this function as well. Texturing. This is the process of creating textures onto a U-V–mapped canvas (or skin, if it applies to 3D models). Alternatively, this term refers to the creation of texture frames for use in level design. Either way, I’ll show you both types of texturing techniques using Photoshop, with assistance from a 3D texturing program called Deep Paint 3D. Animation. This step is for a compound asset such as a character or other model requiring motion. Typically, during this phase, a bone structure is introduced into the mesh of a model, and the bones themselves are animated, deforming the mesh surrounding them. I’ll show you how to do this (and more) using 3D Studio Max. Final export. This is the last step in the process. In it, you dump all your hard work into the game engine of your choice. It is usually here that certain considerations must be made, such as into what game engine the 3D object you’ve created will be placed. Exporting is game-engine specific, and requires unique steps depending on the engine in question.
The Making of Two Compound Assets
The Making of Two Compound Assets Suppose you’re an artist on a game development team that is making a 3D game based on some futuristic world on another planet. (How original!) Not surprisingly, this planet is fairly hostile, and there’s an active battle going on between the Trevalan (the good guys) and the Engandea (the foes). In the game, the Trevalan have front-line war characters, called slogres, that are huge and aggressive, have minimal intelligence, and basically go into battle to mop the floor with the enemy. These slogres are capable of holding and firing a specialized weapon, called the RF-9 plasma gun, which, when handled properly, can disintegrate anything within 50 meters. As an artist, your goal is to create the slogre and the plasma gun (discussed in this chapter), skin them, animate them, and export them for the team’s game engine. As mentioned previously, the first step is to brainstorm, developing ideas about what traits the character and weapon will possess, and then to come up with some sketches of them.
In My Mind’s Eye: The Slogre For the slogre character, I envisioned a huge, lumbering beast that possesses unbelievable muscle mass, and who stands about four meters (13 feet) tall. It is, needless to say, very intimidating to all who try to defy it. Of course, because the slogre is from another planet, not to mention being from the future, it needed be unique in comparison to any animals you’re used to. That said, as in Star Wars, Star Trek, and just about any other science-fiction world you can imagine, the physiques and personalities of many sci-fi characters derive from objects or ideas that exist in this world. Take the sloth, for example. They’re very weird-looking animals that inhabit South America. Having four-inch long nails for grasping branches, not to mention disproportionate arms, they are excellent tree climbers—though they move so slowly they may as well be traveling backward. In addition, they appear to be fairly numb upstairs. As it happens, ancestors of the modern South American sloth thrived thousands of years ago—before the last Ice Age—and were much larger than their modern cousins. Indeed, back then, they were closer in size to bears. These ancient sloths served as a great launching point for the slogre I wanted to create.
17
18
2.
Getting Ready to Model: Concept Art
Of course, simply copying nature and creating a creature identical to the extinct sloth won’t cut the mustard here. That’s why I decided to modify the extinct sloth a bit. I figured that if the character were to have such great muscle mass, it might be slumped over from the weight, and could even have a big fat belly, much like that of the ogre in Dungeons and Dragons. For you who aren’t D&D fans, an ogre is a fictional, Quasimodo-like character that somewhat fits the profile I’m describing: huge muscles, not too bright, lumbering around, ugly, carrying a ridiculously huge weapon, and generally being totally unpleasant. There. I established a base for my character—part sloth, part ogre (hence the name “slogre”). The slogre is, for the most part, bipedal—that is, it can walk on two legs. It has two eyes, but they are monocular, so it sees from the sides of its head the way a bird or an iguana does; it has no depth perception, however, making it good only for up-close combat. The slogre has very long arms that reach to the ground, so it can support itself when resting, and can place one hand on the ground when walking (like a primate) or when firing a weapon. Finally, it has long, vicious claws for turning unfortunate enemies to mincemeat that got too close. In keeping with these characteristics, I came up with a (very) quick first sketch, shown in Figure 2.2.
Figure 2.2 The first draft of the slogre concept.
The Making of Two Compound Assets
Notice that in my sketch, I gave the slogre inverted fangs (like an ogre), and a harness with backpack for carrying munitions, and cuffs on the wrists, reminiscent of those worn by slaves—indicating that the slogre has been domesticated by some other being, or perhaps that the slogre becomes slave-like when detained. At least now I have something to work with—my sketch, and my photos of both modern and extinct sloths—and something to give to—you guessed it—a real sketch artist! In my case, I’m fortunate to work with an artist who possesses much stronger sketching skills than I: Lars Ricaldi. Lars and I split up the artwork at Samu Games, but he is the beef when it comes to sketch art. Most of the complex models I need to create come from his dusty, charcoal-laden fingers. I gave Lars my sketch and photos, and soon thereafter, he handed me the sketch shown in Figure 2.3. Not too shabby, eh? Of course, there were a few minor things I wanted changed before I began modeling. For example, I felt the slogre’s hands should contain four fingers rather than five, and that he should wear wrist bands and a harness made of leather. Within a ridiculously short period of time, Lars produced a second sketch, shown in Figure 2.4.
Figure 2.3 Lars’ first draft of the Slogre concept (courtesy Lars Ricaldi).
19
20
2.
Getting Ready to Model: Concept Art
Figure 2.4 The revised slogre sketch, as per our conversation (courtesy Lars Ricaldi).
This is a great, workable character, very overpowering, and very alien. I asked Lars to give me a few more sketches so we could model this character with ease; Figure 2.5 features the sketches Lars drew in response. You can see now how helpful it is to have a decent concept sketch of the model you’ll be creating. (Try making the mesh from my sketch!) Once you’ve hammered down the concept sketch of the slogre, it’s time to work on the second object: the RF-9 plasma gun.
The RF-9 Plasma Gun I figured that since the slogre is huge, nasty, and somewhat shallow, he’d need a weapon that’s easy to use but packs a punch—something that is very big with a wide muzzle, and perhaps a huge, idiot-proof trigger. I also wanted the weapon to have that dusty Road Warrior look. After I sent my ideas to Lars, he sent me the sketches in Figure 2.6.
The Making of Two Compound Assets
Figure 2.5 Other perspective views of the slogre (courtesy Lars Ricaldi).
Figure 2.6 Lars’ suggestions for the slogre’s main weapon.
21
22
2.
Getting Ready to Model: Concept Art
These sketches were great! I loved the idea of the big steel hoops for a harness. I asked if he’d make the gun longer, so it would retain more of that “hose” look on the outside; the finished gun is shown in Figure 2.7. My last beg-and-plea to Lars was to give the two models some texture and get the slogre in a firing pose, holding the plasma gun. Once again, he came through; Figures 2.8 and 2.9 feature some images that will complete your picture. For a fullcolor shot, see the color-plate section in the middle of the book. These sketches will make your lives much easier as you model the slogre and his weapon. Lars’ artistic talent and the perspective he used in his sketches allow you to envision these objects as 3D models. This envisioning process is not quite over, however; you need to decide what textures your model will use. Indeed, skinning is usually the keystone, and can make or break a model. In fact, until computers allow games to have extraordinarily high-resolution models, you’ll create your objects with just the essential detail meshes, and trick the player by wrapping highly detailed textures around them.
Figure 2.7 The final draft of the plasma gun.
The Making of Two Compound Assets
Figure 2.8 The slogre in action (courtesy Lars Ricaldi).
Figure 2.9 Another money shot of the slogre in action (courtesy Lars Ricaldi).
23
24
2.
Getting Ready to Model: Concept Art
The Final Objective
AM FL Y
Having the two object models in mind, I want you to pause a minute and think about why I chose them. The RF-9 plasma gun is a great start. Although it’s no ordinary object, it’s not too difficult to model, and for now will have no moving parts. This is my favorite type of object to model and texture, because it’s generally quick to develop and has what I would consider an easy texture skin. Beveled, futuristic metal is fun and looks really cool, so I think you’ll enjoy it—in fact, that will be your first modeling project to get your feet wet.
TE
The slogre model, on the other hand, will be by far the most complex. The slogre will consist of only one skin mesh, but will have an internal skeletal structure (known in 3D Studio Max as a biped object) that will be used to drive the mesh deformation. That is, as the bones in the biped object move around, the vertices in the mesh will follow. On top of that, you’ll be weighting the mesh (adjusting the behavior of the mesh around the bones) and skinning. Lastly, dummy nodes must be placed all over the slogre to signify locations for the character to mount weapons, backpacks, point-of-view cameras, and the like. The model itself, being organic, will also be the most time consuming, so we’ll save that for last.
Summary Developing a complex 3D game model is definitely a time-consuming process that must be well-planned in order for your model to be successful and presentable in a gaming environment. The development can be broken down into several basic steps, beginning with an initial concept sketch to provoke modeling ideas (which leads to creating the model itself in a 3D modeling program), followed by U-V mapping, texturing, possibly applying a bones system to deform the mesh, and finally outputting to a game engine of choice. Lars provided some great sketches that you can use as you create the models and textures for this game. Of course, you don’t have to stick like glues to the sketches (although it should be close); feel free, by all means, to make up your own models as you go. The techniques I’ll show you—from modeling, to U-Ving, to skinning and animation—will still apply. The next step in the development process is creating the actual object meshes, and in this part of the book, I’ve broken down the creation of the plasma gun and slogre mesh objects into their own chapters (Chapters 3 and 4, respectively). Using the modeling techniques I will describe, you should be able to make just about anything!
Team-Fly®
CHAPTER 3
Modeling the RF-9 Plasma Gun with trueSpace 9
3. Modeling the RF-9 Plasma Gun with trueSpace 6
26
I
n the previous chapter, where I introduced you to the logical structure of creating game assets, I envisioned and generated (with the help of my sketch art colleague, Lars) a draft of a cool weapon that I’ll now show you how to create in 3D. In this chapter you will ■ ■ ■ ■ ■
Set up the trueSpace 6 environment in preparation for game modeling. Logically plan out the modeling attributes for the RF-9 plasma gun. Build the RF-9 step-by-step using primitives and point-editing techniques. Optimize the RF-9 mesh and check for errors. Export the model.
An Overview You’ve fleshed out the concept for the RF-9 plasma gun and generated some detailed sketches. The next step is mesh creation, as indicated by the workflow depicted in Figure 3.1. To give you a quick review, Figure 3.2 shows the RF-9 plasma gun sketch that you’ll be using to model the plasma gun; you probably remember from Chapter 2, “Getting Ready to Model: Concept Art,” that this sketch was generated by me and my colleague Lars Ricaldi. Figure 3.1 The next step in compound-asset development: mesh creation.
An Overview
Figure 3.2 The RF-9 you’ll be modeling in this chapter (sketch courtesy Lars Ricaldi).
NOTE
When you’re finished, you should end up with something like the mesh shown in Figure 3.3.
The sections that follow explain how to modify the trueSpace 6 environment for modeling, as well as other items you should consider before you begin. If you’re already familiar with trueSpace and want to jump right into the modeling, go ahead and skip to the section titled “Modeling the RF-9.”
Figure 3.3 The completed plasma-gun mesh.
27
28
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Setting Up the trueSpace 6 Environment In case you have not yet installed any version of trueSpace on your computer, I’ve provided a demo of trueSpace 6 on the CD-ROM that accompanies this book. Install it as you would any other program, and then copy the file G-LoK.tsc (as well as truespace.key and keylist.txt if you want to adhere to my keyboard shortcuts) from the CD-ROM to the \trueSpace6\ folder of your program’s installation directory. After the G-LoK.tsc file is copied, it’s time to load this custom modeling configuration. To do so, click on the Configuration Library button, rightclick in the library’s blank space, and choose Import. Then browse to G-LoK.tsc file and click OK. You should end up with a configuration that looks like the one shown in Figure 3.4. G-LoK, by the way, is my game artist ‘handle’, so if you ever see art with my “GLK” logo, you know it’s yours truly.
NOTE G-LoK.tsc is an interface-configuration file that will set up your modeling environment my way, displaying three orthogonal views (Left, Front, and Top) as well as a background Perspective view. Over the years I’ve found that this is a fairly optimal way to model, but by all means, you should arrange the environment to your liking.
The next few sections explain other settings that help with your modeling environment.
Changing the World and Object Units Generally speaking, one meter in the trueSpace modeling environment equals one meter in the world of the video game you’re creating. (It’s a good idea to use the metric system because most game engines are based on it.) To ensure that your modeling environment is set to use the metric system, do the following: 1. Right-click the Object button (with the white arrow) to open the Object Info panel (see Figure 3.5).
Setting Up the trueSpace 6 Environment
Figure 3.4 Changing the modeling-interface configuration by importing the G-LoK.tsc file.
Configuration Library button
Figure 3.5 Setting the modeling units in the Object Info panel.
The Object button
29
30
3. Modeling the RF-9 Plasma Gun with trueSpace 6
2. Click the red triangle in the upper-right corner of Object Info panel to expand it. 3. Set the World field to Meters. 4. Set the Object field to Meters.
TIP Rather than closing the Object Info panel, it’s a good idea to move it over to the corner of the screen; that way, you can reference your polygon count as you model.
Setting the Dynamic Rendering Mode trueSpace (and most other modeling programs) allows you to apply various settings to the video mode of your modeling environment, such as wireframe, solid, transparent, and so on. I find it easiest to create mesh objects in Transparent Wireframe mode, which means your models are see-through, and that both the edges and vertices of the model are displayed at the same time. To switch to this mode, do the following: 1. Click on the Display Options button in the bottom-right portion of the screen (see Figure 3.6).
Figure 3.6 Setting the dynamic rendering modes.
The Display Options: DirectX button The Draw Objects as Transparent Outline button
Modeling Considerations
2. Select either DirectX or OpenGL mode. (One mode might outperform the other depending on your video card, so check your video-card manufacturer’s documentation for more information.) 3. Select the Draw Objects tool, and press and hold down your mouse button. Then, choose the Draw Objects as Transparent Outline button.
31
NOTE The rendering options described here will apply only to the active window.To activate a window, leftclick on it.
Texture Resolution If you apply bitmaps to any object in your dynamically rendered world, you’ll need to crank up the dynamic texture resolution—otherwise, your textures will appear pixelated. Do this by right-clicking the Draw Objects tool (or by clicking File, Display Options), and setting the Txt Res option to 512×512.
Keeping the Point Edit Tools Handy Much of the modeling you’ll be doing is based on point editing—that is, building or modifying your objects at the vertex (point) and face level. I like to keep the Point Edit tools right next to the Eye Rotate and Eye Move tools, at the middle-right of NOTE the screen, to make them easily accessible. To make a copy of these tools, press and The Point Edit tools will be visihold the Ctrl key as you drag the Point Edit ble only when an object is present and you’re in Point Edit tools to the desired area (see Figure 3.7). If mode (obtained simply by rightyou click once on the tool’s anchor bar (just clicking on a mesh object). to its left), it will expand the tool list and anchor it to that area.
Modeling Considerations If you saw the movie Final Fantasy, you were probably struck by the incredible detail of the characters, weapons, environments, and so on. That photorealistic detail was the product of the extraordinarily high polygon meshes used to make the models used in the film; indeed, a typical character model’s face alone had well over
32
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Figure 3.7 Locating and anchoring the Point Edit tools.
The Point Edit button
50,000 polygons. Sadly, however, if you were to use such high polygon meshes for your game, the player’s computer would come to a screeching halt trying to render all of the detail. In fact, what you saw in Final Fantasy was the result of countless hours of post-production rendering on very powerful computers (most likely in a rendering array, with dozens of computers linked together, sharing the rendering process). Models for games are different from models for production, such as cover art, television, and movies. That’s because games have dynamic rendering environments; that is, as a player moves around in 3D space, all 3D mesh objects are rendered to screen at least 30 times per second. That means the player’s computer’s CPU and graphics processors must constantly transform the game world and render it at the same time—which in turn limits the number of polygons your models may contain. Models with high levels of polygonal detail may look better, but will be so slow to render on a player’s computer as to make them unusable. Put simply, models for games must be created to accommodate the average computing power of home computers on the market. These days, that equates to designing your models to work with computers in the Pentium IV and V range, at about 2.5 to 3.0 GHz. That means rather than creating character models with 50,000–100,000 polygons, as seen in the film Final Fantasy, you’ll need to create
Modeling the RF-9
character models with polygons in the neighborhood of 2,000 to 5,000, and weapons possessing only 500–2,000 polygons. This need for a low polygon (poly) count will deeply affect the way you model; with every step you take to shape your object, you’ll work to minimize the count. In addition to considering poly count, you’ll also want to think about texture mapping as you model. By making nice seams in your models in hidden areas, you’ll make the process of unwrapping the U-V texture coordinates much easier. For details on unwrapping U-Vs, see Part II, “Unwrapping U-Vs with DeepUV.”
TIP One way to avoid high poly counts is to apply textures to low-poly-count models for a similar effect. For instance, the RF-9 has a hose-like item running the length of the action, but modeling a hose would require hundreds of polygons. Instead, you can use a simple curved cylinder, and later apply a texture map that features an image of the bumps in a hose to that area. If you can fake something with a 2D map, then it might not be necessary to have high poly counts for certain areas.
Modeling the RF-9 Creating a model of the RF-9 plasma gun will be quick and fairly simple; for overall good looks, you’ll rely more on texturing the weapon than creating a highly detailed mesh. Modeling the RF-9 is, in this case, essentially a seven-step process: 1. Plan the model’s dimensions and poly count, and build reference plane. 2. Build the muzzle. 3. Build the barrel. 4. Build the grip. 5. Build the hoops and hose. 6. Optimize and triangulate. 7. Export the model for texturing. In the sections that follow, I’ll show you how to use trueSpace, which features one of the best modeling interfaces on Earth, to model the RF-9 plasma gun using the steps outlined here. Of course, you can use any modeling program you wish, including 3D Studio Max (a demo of which is included on the CD-ROM); the modeling techniques I’ll show you can be ported to other programs. It’s up to you to know how those programs and their tools work, however.
33
34
3. Modeling the RF-9 Plasma Gun with trueSpace 6
NOTE
AM FL Y
In the event you need a primer on using trueSpace, I’ve included on this book’s CD-ROM a tutorial covering trueSpace 4. I focused the tutorial on trueSpace 4, rather than trueSpace 6, because version 4 is clean and considerably less complicated than version 6, but uses the same basic modeling environment. Once you have a handle on using version 4, it’s less likely you’ll be confused and overwhelmed by the plethora of advanced modeling tools in version 6.
TE
Step 1: Planning the Model’s Dimensions and Poly Count, and Creating a Reference Plane Before you start dropping objects all over your scene, it’s a good idea to plan your model and set up your environment so that you can avoid the most frustrating mistake that modelers make all the time: getting halfway finished with your model and having to scrap it all or backtrack because you didn’t plan ahead. Following are a few things to consider.
The RF-9: Pea Shooter or @$$-Kicker? I mentioned in Chapter 2 that the slogre stands at about four meters (13 feet) tall. Given that the slogre is more than twice the size of an average human male, the RF-9 can be big and heavy, despite the fact that, as illustrated in the sketches you saw in Chapter 2, the slogre carries it in one hand. I figure a beast that possesses the size and strength of a slogre can handle a weapon that’s roughly two meters in length—half of his height—with the height from the gun’s strap hoop to the bottom of the handle being about one meter (refer to Figure 3.2). Knowing the dimensions of the weapon will sure come in handy as you proceed with creating the model!
Target Polygon Count Until your computer hardware lets you make objects suitable for The Matrix, you’ll have to devise a target polygon count for your model. To give you a framework to
Team-Fly®
Modeling the RF-9
Levels of Detail When you build a game, you’ll typically need several versions of the same weapon model, each with different levels of detail (LOD). One, which will have very high resolution, will be seen only by the player as he holds his own weapon (because the player will be able to see the model up close, a higher level of detail is required); one or several lessdetailed versions will feature a lower polygon count, and will be seen being held by other players.These polygon counts may also vary with distance. For information on creating LODs, see Part IV, “Preparing Assets for Games with 3D Studio Max.”
work from, 3D FPS games from the late 1990s had weapons that hovered around 300 polygons, while more recent games feature weapons in the 700-polygon range. Keeping with this linear growth, you can safely target your weapon’s poly count to be around 1000. That’s pretty good detail, allowing you to include more 3D and less texture. Of course, with good texturing, an expert modeler can keep the poly count well below that, but for the sake of expediency, let’s not worry about that just yet.
NOTE There aren’t really any rules to modeling; some techniques, such as point editing, are more efficient, producing fewer polygons. Other techniques, such as Boolean operations with primitives and NURBS, accelerate the process. Of course, accelerating the modeling process may require you to clean up any unnecessary polygons at the end. See Chapter 4 for details on advanced modeling with NURBS (non-uniform rational b-spline) objects.
The Reference Plane Unless you’re making models on-the-fly, which will happen occasionally, you’ll need to reference a sketch or picture as you model. You can do this in one of several ways, such as taping a hard copy to the edge of your monitor, flipping back and forth between trueSpace and another program that houses the image, or—my personal preference—creating a reference plane (a 2D plane you create in trueSpace that has the actual sketch painted on it).
35
36
3. Modeling the RF-9 Plasma Gun with trueSpace 6
To set up a reference plane, do the following: 1. Add a plane primitive to the scene (the primitives are found among the libraries at the bottom-left of the screen). If you’re not familiar with performing simple object operations in trueSpace, such as adding and manipulating primitives, please review the trueSpace 4 tutorial located on this book’s CD-ROM. 2. Right-click the Object tool (the white arrow at the bottom of the screen) to open the Object Info screen. 3. Scale the primitive to two meters by one meter by entering the dimensions in the Object Info screen. You’ll see a Size field in this screen; just enter these values for X and Y (length and width, respectively). 4. Enable the Grid Snap tool. This is the icon with a blue colored grid located at the bottom of the screen. 5. Using the Object Rotate tool (X on your keyboard), rotate the plane 90 degrees so it runs the length of the RF-9. This operation is best done in an orthogonal view, such as Left, and right-clicking and dragging until the plane is rotated so it stands upright in your scene. 6. Use the Move tool (Z on your keyboard) to move the plane up so the bottom is flush with the scene’s reference grid. 7. Use the Material Editor in conjunction with the Paint Face tool to paint the face of the plane with the image in the file RF-9 Plasma Gun.jpg, located in the Chapter 3 Data section on the CD-ROM (see Figure 3.8). Because the default perspective space of trueSpace is huge, you’ll need to use the Eye Move tool to reposition your view as I have in Figure 3.8. Notice that the grid’s units are one meter square; your plane should be proportionate to it. (If you’re a little confused up to this point, just load TIP the step1.scn file on the CD-ROM.) I’ve saved the individual modeling steps as trueSpace .scn files in the Chapter 3 Data section on the CD-ROM in case you get confused.
Modeling the RF-9
37
Figure 3.8 Painting the face of a properly scaled and rotated reference plane with the RF-9 Plasma Gun.jpg image.
Step 2: Build the Muzzle Now that you’ve determined the model’s dimensions and established a poly count, it’s time to start building the model. The part of the RF-9 plasma gun that’s easiest to model is the muzzle. Notice how the muzzle is really just a large, egg-shaped sphere primitive with two adjoined cylinders on the top sides. This is the resonating chamber, where the charged energy pellet enters a plasma-injection chamber and gets superheated in a fraction of a millisecond, before annihilating a NOTE nearby targeted object. The modeling techniques I use for the rest of this chapter can be applied by anyone using trueSpace version 4.0 and later. In the next chapter, however, when you model the slogre and other objects, you’ll use some of the new tools included with trueSpace 6.
38
3. Modeling the RF-9 Plasma Gun with trueSpace 6
To build the muzzle, do the following: 1. Add a 12-segmented sphere primitive to the scene. You can set the segments manually by rightclicking any of the primitives, or you can use the Magic Ring. (I don’t use the Magic Ring, and have disabled it in the Preferences dialog box.) 2. Rotate the sphere 90 degrees.
TIP To open the basic Primitives panel, press 6. If you use trueSpace version 5.x or higher, you can also open the Primitives panel by clicking on the Primitives Library button, located in the vertical toolbar in the bottom-left portion of the screen.This contains a more extensive and helpful list of primitives.
3. Using the Scale tool (C on your keyboard), scale, elongate, and move the sphere so it matches the one in the reference plane (see Figure 3.9). Again, this is best done using the orthogonal views (such as Left, Front, and Top) to help with the scaling and positioning. 4. Right-click the sphere to enter Point Edit mode. 5. Right-click the Select Using Rectangle tool and enable the Backside option. The Backside option will allow you to make selections on your model that include polygons nearest your point of view and those hidden behind it, or on the model’s backside. 6. With the Select Using Rectangle tool, select the first four segments of the sphere as shown in Figure 3.10. This selection operation is best done in an orthogonal window; I did it in Front view.
Figure 3.9 Add a 12-segment sphere primitive, rotate it 90 degrees, and elongate it to match the sketch.
Modeling the RF-9
Figure 3.10 Use the Select Using Rectangle tool to select the first four segments of the sphere.
7. Click the Erase Vertices tool, located within the Point Edit tools, to delete the selection from the sphere, as shown in Figure 3.11. (From now on, when I want you to remove something, I’ll simply say “Select, and delete.” That’s your cue to repeat this step.)
TIP If you’re having trouble finding the various tools mentioned throughout this chapter, check out trueSpace tutorial on the CD-ROM that accompanies this book.
8. Press Ctrl+C to make a copy of the sliced sphere. In trueSpace 6, your cursor will change to an arrow with a plus sign beneath it—just left-click once in the scene to add the copy, and immediately right-click to exit the copy mode. 9. Scale and position the copy as shown in Figure 3.12; it should line up with the reference plane’s sketch.
Figure 3.11 Use the Erase Vertices tool to delete the selection.
39
40
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Figure 3.12 Make a copy of the existing sphere object, and then scale and position it as shown.
10. Right-click the copy to enter Point Edit mode. 11. Select and delete the first two segments of the new copy, as shown in Figure 3.13. 12. Using the Point Edit: Faces tool, select the front face of the copied sphere. 13. Use the Sweep tool to extrude the object; extend the extrusion until it’s even with the lower sphere by dragging it to the left in an orthogonal view (see Figure 3.14). It will help to lock the X axis for this operation to keep it straight. 14. Use the Object Union tool to join both sphere objects together. If both objects’ faces were aligned evenly before the union, you should get one solid object with only one front face (see Figure 3.15). 15. Select the front face of the muzzle; you’ll extrude this to form the muzzle’s flare (see Figure 3.16). Figure 3.13 Select the first two segments of the top sphere object and delete them.
Figure 3.14 Sweep the front face of the sphere and continue the extrusion until it matches the face of the lower sphere.
Modeling the RF-9
Figure 3.15 Use the Object Union tool to fuse both sphere objects together.
Figure 3.16 Select the front face of the muzzle.
16. Use the Sweep tool to extrude the face of the muzzle. 17. Move and scale the extrusion in an orthogonal view so that it matches the reference plane sketch, as shown in Figure 3.17. (Remember to use the Point Edit: Move, Rotate, and Scale tools to do this, and not the Object Move, Rotate, and Scale tools. These tools are located in the Point Edit tools that pop up when in Point Edit mode.) Figure 3.17 Sweep the front face of the muzzle, then move and scale the extrusion to match the sketch.
41
42
3. Modeling the RF-9 Plasma Gun with trueSpace 6
18. Sweep the face again, and then move, rotate, and scale the new extrusion to match the sketch (see Figure 3.18). 19. The top six edges of the muzzle’s end must be tapered down slightly. Use the Point Edit: Edges tool to select them, and scale and/or move them down a bit, as shown in Figure 3.19. 20. To hollow out the muzzle, you could use the Object Subtract tool to subtract a cylinder from the inside of the muzzle—but doing so wastes polygons, because by subtracting a cylinder the hollowed result is in the shape of a cylinder, including the back face that constitutes about 10 polygons. Because players generally won’t be peering deep into the end of the RF-9, you can get away with subtracting a cone primitive instead—this will save you those 10 polygons since a cone is shaped to a single vertexed tip. To do so, add, rotate, scale, and position an eight-sided cone primitive to the scene, and position it as shown in Figure 3.20. 21. Select the muzzle object, click on the Object Subtraction tool, and then click the cone to hollow everything out (see Figure 3.21).
Figure 3.18 Sweep the face again and move, rotate, and scale it to match the sketch.
Figure 3.19 Select the top six edges near the muzzle’s end and scale/move them down.
Modeling the RF-9
Figure 3.20 Add an eight-sided cone primitive. Scale and position it as shown.
Figure 3.21 Use the Object Subtraction tool to remove the cone from the muzzle.
Voilá! A muzzle! Obviously, you could do a lot more to make it more closely resemble the sketch, but I want to keep things simple for now. Interestingly, however, the twenty or so steps it took to create the muzzle constitute more than 80 percent of the modeling operations required to create most objects; that means you’re well on your way to creating niftier, more complicated models.
CAUTION Occasionally, when performing Boolean operations such as Object Union and Object Subtraction, trueSpace will encounter an error because the objects are positioned in such a way that the operation is not doable. If this happens, reposition the target object slightly and try again. You may also need to slightly adjust the Identity value in the tool’s Options panel for things to work smoothly.This value is what trueSpace uses to determine what vertices between the two objects should be included or subtracted from the resulting Boolean operation.
43
44
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Step 3: Build the Barrel The barrel is the acceleration chamber for the charged energy pellet. See the circular device at the back of the chamber, just above the grip and trigger? That’s the removable pellet clip, holding up to 100 rounds of static energy pulse modules that, when activated by the trigger, bolt forward and begin expanding along the length of the barrel. Once a static energy pulse module hits the resonating chamber (muzzle), it gets superheated with plasma, and all hell breaks loose.
AM FL Y
Modeling the barrel requires a simple cylinder primitive that has a bunch of Boolean subtractions applied to it, with a bit of point editing to finish it off. Here goes: 1. Add an eight-sided cylinder to the scene.
2. Using the Grid Snap tool, rotate the cylinder 90 degrees.
TE
3. Scale the cylinder along the long axis using an orthogonal window, and squash it a bit vertically so it has more of an oval shape. 4. Align the cylinder with the reference plane, as shown in Figure 3.22. (If you prefer, you can build the cylinder away from the muzzle and join the two later.) 5. The underside of the barrel has some sharp angled lines to it; to eliminate them, you can use a cube (or any other object) to subtract from an existing object, a procedure called drilling. Add a cube primitive to the scene, and scale and position it where you want to hack away from the barrel. 6. Select the barrel, click the Object Subtraction tool, then click the cube to subtract it (Figure 3.23). Continue drilling additional angles and dents in the barrel, but stop at the middle where the barrel curves; you’ll use a cylinder primitive for that. Figure 3.22 Add an eight-sided cylinder, rotate it 90 degrees, and scale it to match the sketch.
Team-Fly®
Modeling the RF-9
Figure 3.23 Use cube primitives in conjunction with the Object Subtraction tool to chisel away at the barrel.
7. Repeat steps 5 and 6 using a 10-sided cylinder as a drill to carve out an arcshaped area under the barrel, as shown in Figure 3.24. 8. Select the back face of the barrel and use the Sweep tool to extrude it. 9. Reposition the face in relation to the sketch using the Point Edit: Move tool (see Figure 3.25).
TIP When performing multiple object subtractions using the same object as a drill, it helps to click the Keep Drill option in the tool’s Options panel.That way, the drilling object does its job but remains in the scene.
Figure 3.24 Use a 10-sided cylinder to carve an arc in the bottom of the barrel.
45
46
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Figure 3.25 Sweep the back face of the barrel to match the sketch.
10. To bevel the top-rear of the barrel, begin by selecting the top two faces toward the back. To do so, use the Point Edit: Faces tool, and press and hold down Ctrl key as you click each face to select it (see Figure 3.26). 11. With the two faces selected, click the Bevel tool.
TIP Locking the X or Y axes (bottomright corner of the screen) when extruding faces or performing other point-edit operations will keep your movements aligned with the orthogonal views.
12. Click and drag slightly anywhere in the scene to adjust the bevel as I have done in Figure 3.27. 13. To carve out the notches in the top of the barrel, begin by adding, scaling, and positioning a cube primitive as shown in Figure 3.28. Align it so it matches the sketch.
Figure 3.26 Select the top two faces at the rear of the barrel.
Modeling the RF-9
47
Figure 3.27 Bevel the faces using the Bevel tool.
Figure 3.28 Add a cube primitive and position it as shown.
14. Use the cube primitive to drill out a notch in the barrel. Repeat to create the other two notches, as shown in Figure 3.29. 15. Add a 10-sided cylinder primitive to the scene, and scale and position it as shown in Figure 3.30. When you’re satisfied with the position (make sure you view it from Front, Top, and Left orthogonal views), use the Object Union tool to weld it into place. Figure 3.29 Use the cube to drill notches in the barrel.
48
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Figure 3.30 Add, scale, and position a 10-sided cylinder primitive to the barrel. Use the Object Union tool to weld it in place.
This completes the barrel. Don’t worry about the holes along the cooling jacket in the sketch; we’re going to fake those with some slick texturing later on in Part III, “Texturing with Photoshop and Deep Paint 3D.” You can now position the entire barrel unit behind the muzzle and Object Union the whole thing together.
Step 4: Build the Grip Because the slogre’s hand is huge, and features 10-inch-long nails for slashing enemies, his dexterity is hindered, which is why the grip and trigger are oversized and simplified. For added mayhem, the end of the grip features a twin blade that our lovely behemoth can use to impale the heads of unfortunate saps that get too close. Here’s how to build the grip: 1. Add a 10-sided cylinder primitive to the scene. 2. Position, scale, and squash the cylinder laterally so it takes on the shape of the grip in the reference plane (see Figure 3.31). Don’t worry about the blades for now; we’ll extrude them separately later on.
Figure 3.31 Add a 10-sided cylinder to the scene, scale it, and position it in relation to the sketch.
Modeling the RF-9
49
2. Aside from the trigger, you can carve out the front and back of the grip with spheres. To begin, add two 12-segmented sphere primitives to the scene— these will be your drills for the front and back of the grip. 3. Position, scale, and rotate the spheres, using the sketch as a reference. 4. Use the Object Subtraction tool to drill the grip with the spheres (see Figure 3.32). 5. Using a cube primitive, slice the bottom of the grip at an angle (use the reference plane as a guide). This is where the blades will be placed. (See Figure 3.33.) 6. Select the angled face at the bottom of the grip. 7. Using the Sweep tool, extrude the angled face outward. 8. Scale and rotate the resulting face so it’s a bit tapered, as shown in Figure 3.34.
Figure 3.32 Use 12-segmented sphere primitives to carve arcs in the front and back of the grip as per the reference plane.
Figure 3.33 Use a cube primitive to drill an angle in the bottom of the grip.
50
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Figure 3.34 Sweep the bottom face of the grip out, and taper it.
9. Now for the blades. To create them, you’ll split the bottom face of the grip, and then extrude each face individually to form the twin blades. To begin, use the Add Edges tool in the Point Editing group to create an edge between the two vertices, as shown in Figure 3.35.
NOTE This technique is a manual way to create a subdivision surface; you can also create subdivision surfaces with other tools (such as the Quad Divide tools) if you need to add more detail and/or smoothing.
10. Now that the bottom has two faces, use the Point Edit: Faces tool to select the top face. 11. Using the Sweep tool, extrude the selected face. 12. Position and scale the extruded face so that it thins out like a metal blade (see the sketch in the reference plane), as shown in Figure 3.36.
Figure 3.35 Divide the bottom face of the grip using the Add Edges tool.
Modeling the RF-9
Figure 3.35 Divide the bottom face of the grip using the Add Edges tool.
Figure 3.36 Extrude the beginning of the top blade, tapering it a bit.
13. Sweep the face once more, angling it downward via the sketch. Taper it even more so it resembles a sharpening blade. 14. Use the Tip tool to draw the blade to a fine point (see Figure 3.37). 15. Repeat the extrusion and tip process for the lower blade, as shown in Figure 3.38.
Figure 3.37 Finish the blade with a sweep and tip.
51
52
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Figure 3.38 Finish the lower blade using the same techniques as for its cousin.
16. Using the orthogonal views, align the grip to the barrel. 17. Using the Object Union tool, meld the grip and barrel together. 18. Now for the trigger; start by adding a six-sided cylinder primitive to the scene. 19. Scale and position the trigger as shown in the reference plane. 20. Select the front-most edge of the trigger with the Point Edit: Edges tool. 21. Move the edge inward so it starts to form the curved trigger (see Figure 3.39). 22. Position the base of the trigger at an angle into the body of the barrel object, and use Object Union tool to fuse them together. 23. Select the bottom face of the trigger. 24. Sweep the selected face down, angling and tapering it a bit to conform somewhat to the shape in the sketch (see Figure 3.40). 25. Sweep, rotate, and taper (scale) the trigger once more. The grip and trigger assembly should now be complete and resemble the one shown in Figure 3.41.
Figure 3.39 Add a six-sided cylinder primitive for the trigger. Push in the front edge.
Modeling the RF-9
Figure 3.40 Join the base of the trigger to the barrel, and sweep the bottom face of the trigger down.
Figure 3.41 Sweep and taper the trigger end once more to complete it.
Step 5: Build the Hoops and Hose Now it’s time to add those donut-like appendages that give the RF-9 its futuristic, Mad Max look. The top two hoops are meant for big, thick leather straps or a harness, while the hose beneath the gun vents power toward the muzzle’s resonating chamber at the exact moment the energy pellet enters it. Here’s what to do: 1. Let’s begin with the top front hoop. Add a 12-sided torus primitive (the donut shape) to the scene. 2. Rotate the torus 90 degrees, and scale/position it to match the sketch. 3. Right-click the torus primitive in the Primitives panel to access the torus’s Options panel, then adjust the inner radius of the torus to about 0.65 or so. (See Figure 3.42.) 4. Using the Rectangular Selection tool, select the bottom-half of the torus. 5. Delete the selection using the Erase Vertices tool.
53
3. Modeling the RF-9 Plasma Gun with trueSpace 6
AM FL Y
Figure 3.42 Add a 12-sided torus primitive, and scale and rotate it to match the sketch.
6. Add a rounded-cylinder primitive to the scene, as shown in Figure 3.43. This will be the base of the hoop. 7. Using the Object Union tool, fuse the rounded cylinder to the body of the gun.
TE
54
NOTE For trueSpace 4 users, this primitive isn’t an option.Try joining two sphere primitives to the end of a cylinder primitive to achieve this shape.
8. Again using the Object Union tool, fuse the torus to the rounded cylinder. You should end up with a gun that looks something like the one in Figure 3.44. If not, try moving the objects slightly and repeat the union operations. 9. Before adding the hoop at the rear, bevel the back face of the barrel as shown in Figure 3.45. (A bevel is simply a face that is extruded but shrinks in size.) To do so, use the Point Edit: Faces tool to select the face, and click the Bevel tool. Click and drag to adjust the bevel in accordance with the sketch.
Figure 3.43 Cut off the bottom-half of the torus, and add a rounded cylinder primitive as the hoop’s base.
Team-Fly®
Modeling the RF-9
55
Figure 3.44 Object Union the cylinder and torus to the gun’s body.
Figure 3.45 Bevel the rear of the barrel in preparation for the back hoop.
10. Add a 12-segmented torus primitive for the back hoop. 11. Using the torus’s Options panel, adjust the inner radius of the torus to about 0.55 or so. Rotate, scale, and position this over to the back hoop, aligning it with the reference plane. 12. When satisfied, Object Union the torus into place (see Figure 3.46).
Figure 3.46 Add a 12-segmented torus primitive for the back hoop and fuse it to the gun.
56
3. Modeling the RF-9 Plasma Gun with trueSpace 6
13. Now for the last item: the feeder hose underneath the RF-9. I’d like to add caps to start and end the hose for a more authentic look, then sweep the hose manually so it looks more saggy. To create the caps, begin by adding two six-sided cylinder primitives to the scene. 14. Scale, rotate, and position the cylinders as shown in Figure 3.47. 15. Use the Object Union tool to weld the cylinders into place. 16. Select and bevel the exposed face of the top cylinder. This taper will begin the hose (see Figure 3.48). 17. Use the Sweep tool to extrude the beveled face of the upper cylinder. With every sweep, rotate and position the face so it moves toward the other cylinder (see Figure 3.49). 18. When the end of the hose is close to the bottom cylinder, it’s time to join the two. Because they are technically the same object (due to the Union operation you did just before), you can’t just use the Object Union tool to fuse
Figure 3.47 Add two six-sided cylinder primitives and weld them into place.
Figure 3.48 Select and bevel the face of the top cylinder.
Modeling the RF-9
57
Figure 3.49 Sweep the face of the cylinder several times to make the hose. Make sure it moves over toward the other cylinder.
them. Instead, you’ll have to use the Add Edges tool to link vertices from the hose to the cylinder (see Figure 3.50). This tool is also located within the Point Edit tools. When this tool is active, simply clicking on a vertex from the end of the hose, then a vertex on the cylinder nearest it will join the two with an edge.
NOTE Once an edge is created, trueSpace may or may not install a face that defines a closed boundary. If you don’t see a shaded area come to life after you add an edge, you may need to use the Add Face tool to add the face manually.To do so, click the Add Face tool then click the questionable area to add a face. Usually if a hole exists in your model the Add Face tool will highlight the area when you move your mouse cursor over a hole.
Figure 3.50 Join the hose to the lower cylinder by linking the two with the Add Edges tool. Use the Add Faces tool if necessary to close up the model.
58
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Figure 3.51 Finished with the basic construction of the RF-9.
Alrighty then! You’re finished with the basic construction of the RF-9, and it’s looking good (see Figure 3.51).
Step 6: Optimize and Triangulate Although you’ve finished the basic construction of the RF-9, there are a few things you need to handle before you can consider this model complete. First, the polygon count is almost twice the target; you can tell by right-clicking on the Object tool, which reveals stats on the vertici and face counts of the model. Mine has a little over 700 faces—a lot, considering that at bare minimum, each face requires two triangles (polygons), and sometimes more depending on the shape of the face. If you determine that your model’s polygon count is high, you can reduce it by cleaning up all the unnecessary faces, edges, and whatnot that are a negative side effect of Boolean object modeling. You see, welding all those fancy primitive objects to make a model is quick and dirty, but leaves a trail of excess polygons. To begin, it helps to paint the model with a basic, bright color, and set the wireframe to a contrasting color. To do so, use the Paint Object tool in the Material Editor panel to paint the model with a color such as a bright green, as I have done in Figure 3.52. To change the wireframe color, switch to Point Edit mode, choose File, Display Options, and change the Edit color. Next, so that you can clearly see the wireframe of your solid object without seeing the non-visible wireframe of the opposite sides of the model, set the render mode to Draw Objects as Solid Outline (the second tool from the left, on the bottommost toolbar on your screen). Using the Object Rotate tool (X on your keyboard), move around the object and search for areas with a bunch of vertices clumped together. One such area is the side of the muzzle, as shown in Figure 3.53. Notice that there are several faces that
Modeling the RF-9
59
Figure 3.52 Paint the RF-9 with a color that helps you to discern the details of the model.
The Paint Object tool
are just slivers of detail—totally unnecessary, as they do not contribute any significant detail to our model. To eliminate excess vertices, right-click the model to enter Point Edit mode, choose the Point Edit: Vertices tool, hold down the Ctrl key, and click the individual vertices you want to combine into one. Once they’re highlighted, click the Weld Vertices tool. Alternatively, use the Point Edit: Edges tool to select the edge between two very close vertices, and click the Weld Vertices tool. Either way, you should end up with a clean area, as shown in Figure 3.54. After you’ve reduced polygon counts in the obvious areas, switch to plain wireframe mode and zoom really close into areas of high mesh concentration, or into parts where one primitive object was united with another. In Figure 3.55, I’ve zoomed to a typical area that has an obnoxious number of stray vertices and insignificant edges. These aren’t errors, mind you, but details that no player could possibly discern in a game. As before, select the excess vertices that are close to each other, and click the Weld Vertices tool to unite them. Lastly, while in Draw Objects as Solid mode, spin your model around and see if you can spot any holes. They’ll show up only in solid mode, and will display an open
60
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Too much detail here
Figure 3.53 Small, insignificant faces that only add to the polygon count of the model.
Ah, much better.
Figure 3.54 Get rid of the unnecessary faces by welding vertices together.
Modeling the RF-9
Figure 3.55 More minute details that need welding.
face through which you can see into your hollow model. As shown in Figure 3.56, I found a hole where we joined the hose to the resonating chamber. To fix this problem, use the Add Edges tool to link vertices across the hole, and/or use the Add Face tool. Once you’ve performed these steps, you should at least be close to the target poly count. If you want to see my results, open the step6.scn file on the CD-ROM (see Figure 3.57).
NOTE For every superfluous face you eliminate, you reduce the polygon count of the model by at least two. If this is a significant model for your game, it would be wise to spend an hour or two optimizing your model in this manner; get rid of details people won’t see, and reduce the poly count to a reasonable number.
61
62
3. Modeling the RF-9 Plasma Gun with trueSpace 6
Figure 3.56 Check your model for holes while in Draw Objects as Solid mode.
Open face
Figure 3.57 The cleaned-up RF-9 plasma gun.
Apply the Triangulation When you export the model for 3D Studio Max, all faces get triangulated, meaning all vertices are interconnected at the rudimentary level, so that the entire model is made up of three–sided polygons. This triangulation dictates the final polygon count. (Mine came to over 1,800 polygons before I cleaned it up!) What you see during the process of modeling are ordinary faces—a polite way of trueSpace
Modeling the RF-9
hiding edges to make your model easier to manipulate. Triangulation is the last phase, which reverts the mesh into its raw polygon form.
CAUTION The triangulation operation, which you perform by clicking the Triangulate Object tool, is NOT undoable.You should save your model before performing this operation.
First save your scene, then click the Triangulate tool, located among the Quad Divide tools. Your mesh should suddenly appear a bit entangled, but this is only the result of the faces being divided into their constituent triangles. Checking the polygon count of your model one final time now will show you the grand total your game engine will be dealing with.
Export the Model At this point, your mesh object should be clean, tidy, and complete. The next logical step is to prepare it for texturing by unfolding the U-V texture coordinates and laying them out flat so the texturing process happens in two dimensions. There are a number of ways to unwrap U-Vs. The way I do it is popular, fun, and easy: I use 3D Studio Max in conjunction with Right Hemisphere’s DeepUV. Before you can use these programs, you must first export your model to a file format that they can understand. trueSpace 6 has a number of formats available from which you may choose; the best format for our needs is STL. Short for stereolithography, this format is used in the modeling industry for machines designed to carve an actual, physical model based on your 3D mesh. The STL format is raw and straightforward, presenting just the mesh object and the faces it contains. As an added bonus, 3D Studio Max has a nice STL import feature that checks the model for duplicate vertices, holes, and other possible errors, and fixes them. In addition, once you’ve imported your model into Max, you can run an STL Check modifier that will analyze your mesh for any other errors. This way, you can assure your game engine that the model you’re preparing is nice and clean and won’t cause a system crash! Exporting the RF-9 to STL is easy: Just click File, Save As, Object, and choose .STL from the Save As Type list at the bottom of the dialog box. Then just give it a name and click Save. If you’re ready to proceed with UV unwrapping at this point, skip to Part II, “Unwrapping the U-Vs with DeepUV.” There, I show you how to briefly intercept
63
64
3. Modeling the RF-9 Plasma Gun with trueSpace 6
the RF-9 model with 3D Studio Max, and work with DeepUV to unfold the texture coordinates in preparation for texturing the model. It’s really fun and interesting, and I think you’ll get a kick out of it.
Summary
TE
AM FL Y
In this chapter, I showed you how to set up the trueSpace 6 environment in preparation for modeling the RF-9 plasma gun weapon. More than just building at a whim, game models such as this need to be carefully planned out, including determining dimensions and polygon counts, before building it in a 3D world. Finishing up models with optimization techniques are a vital process as well. All in all, because of these steps your end results and overall modeling operations are smooth, predictable, and work well in a game engine.
Team-Fly®
CHAPTER 4
Modeling the Slogre Character with trueSpace 6
4.
66
Modeling the Slogre Character with trueSpace 6
T
his chapter continues with the modeling techniques and environmental setups as described in Chapter 3, “Modeling the RF-9 Plasma Gun with trueSpace 6.” Figure 4.1 shows your place in the compound-asset creation workflow. In this chapter you will
NOTE If you’re new to modeling with trueSpace, or have skipped straight to this chapter, you will find it beneficial to first read the first few sections of Chapter 3 for information on how to set up your modeling environment and become familiar with the basic interface of trueSpace 6.There is also a trueSpace 4 tutorial located on the CD-ROM, which may be of help as well—much of the functionality from that version has found its way to version 6.
■
Logically plan out the modeling attributes for the slogre. Build the slogre step-by-step using NURBS and point-editing techniques. Analyze and develop proper joint details on the model to allow for smooth animations. Optimize the slogre mesh and check for errors.
■
Export the model in preparation for texturing.
■
■ ■
Figure 4.1 The next step in compound-asset development: mesh creation.
Modeling the Slogre Character
To give you a quick preview, Figures 4.2 and 4.3 show the slogre sketches that you’ll be working from to create the slogre character, as devised by me and my sketchartist friend and colleague, Lars Ricaldi. The first image indicates the approximate height of this character; when squatting, he still lumbers about at a two-meter height. Figure 4.2 The slogre you’ll be modeling in this chapter (sketch courtesy Lars Ricaldi).
Figure 4.3 Another money shot (sketch courtesy Lars Ricaldi).
67
68
4.
Modeling the Slogre Character with trueSpace 6
Figure 4.4 The completed slogre mesh.
Once you’re finished, you should end up with something like the mesh shown in Figure 4.4.
Modeling Pre-Considerations As I mentioned in the last chapter, a decent character model for personal computers with Pentium-IV processors will average 2,000 polygons; with the advent of computers with higher processing capabilities, these numbers will only go up. id Software’s Doom III is said to have characters with polygon counts of 5,000 or more—offering spectacular smoothness to the mesh and adding detail that you previously had to fake in texturing. Because I’d like to see this book extend its use to the middle of the first decade of the 21st century, I’d like to target a Doom III–like game for the slogre model, without going overboard for those computers not capable of handling huge polygon counts. Seeing how character models at the turn of the century contained an average of just below 1,000 polys, I’d like to shoot for 3,000 for the slogre. The modeling techniques you’ll employ for this character will be a combination of NURBS modeling (unbelievably impressive and exciting, but extremely taxing on polygon counts) and point-edit modeling. I want to hybrid the model in this manner to show you that you can do this any number of ways—some being better than others—with the end result being a model that comes out decent. Besides, NURBS
Modeling the Slogre
modeling is the future of video-game characters; no doubt in the very near future you’ll be able to create your models completely with NURBS, retaining their spline parameters without converting to a welded-shut polygonal mesh. The future game engines will import your NURBS objects and allow for dynamic B-spline deformations during game play.
Modeling the Slogre As mentioned previously, I’ll show you how to model this character using trueSpace 6, the demo of which is on the CD-ROM. Once installed, you should get a default modeling interface that looks something like the one in Figure 4.5. For our purposes, I have narrowed down this interface, grouped most of the tools needed for this chapter into one small toolbar, and arranged windows so they appear much as they do in other popular modeling programs’ interfaces. I highly recommend that you make your setup the same as mine—just click the Configuration Library icon in the vertical toolbar at the bottom-left corner of the interface to load the configuration file G-LoK TS6.tsc on the CD-ROM (see Figure 4.6). This file is different from the file I had you load in the last chapter. My custom modeling interface loaded, with the essential tools present.
Figure 4.5 The default modeling interface of trueSpace 6.
69
70
4.
Modeling the Slogre Character with trueSpace 6
Figure 4.6 Load the G-LoK TS6.tsc configuration file on the CD-ROM.
Click to load TSC file
NOTE In the NURBS tools group are Patch Edit icons that let you select what type of NURBS element you want to manipulate. In each figure in this section, I’ve included a small icon representation of the tool used to perform the operation discussed.
Step 1: Build the Body To build the slogre’s body, start by adding a NURBS sphere to the scene; you’ll use this single object to create the entire body—and quite literally in record time. To do so, right-click on the NURBS Sphere icon (located in the toolbar at the bottom of the screen) to open its Options panel, and change the latitude to 6 and the longitude to 8. Your cursor will change to an arrow with a yellow primitive icon attached; just left-click once in the middle of the screen to create the sphere (see Figure 4.7). Multiple left-clicks will add more spheres, so just right-click to exit the creation mode. In Figure 4.7, the Object Info panel displays the current number of faces present in the sphere—over 900! That’s because NURBS are very high-density meshes that
Modeling the Slogre
3D Controls The default configuration of trueSpace 6 has 3D controls active; these help you move, rotate, scale, and perform other modeling operations on your objects. I, however, think they clutter my workspace, so throughout this tutorial I have them turned off, except when building the foot using the Draw Panel tool (which requires that 3D controls be turned on).Turn these on and off by clicking File, Preferences, and unchecking the 3D Controls item.
Figure 4.7 Add a NURBS sphere to the scene.
give a beautifully smooth end result. You can change the resolution of the NURBS objects simply by right-clicking on the Convert NURBS Patch to Polyhedron tool to bring up the Patch Options panel, and adjusting the Static Res number. Also, you can right-click the sphere to enter the NURBS modeling/deformation mode. In Figure 4.8, I have the resolution set to 0.3, which will leave the body of the slogre model with about 1100 polygons. The Manipulation Res variable will change the
71
72
4.
Modeling the Slogre Character with trueSpace 6
Figure 4.8 Rightclick the sphere to enter the NURBS modeling mode; rightclick the Convert NURBS Patch to Polyhedron tool to adjust the resolution of the object.
density of the displayed polygons as you model; just decrease this if you notice that modeling is slow and choppy. When you right-click the sphere, another panel opens, containing a small group of NURBS modeling tools. Drag it by its control handle to move it out of the way, while at the same time keeping it handy. Notice that when you pass your cursor over the sphere (assuming you’ve right-clicked it and entered the modeling mode), the curves and vertices of the object become highlighted. The curves are called NURBS isocurves, and are simply pliable spline curves that intersect to form NURBS patches. A patch is sort of like one of the leather pentagons and hexagons that make up a soccer ball—as you manipulate the isocurves or vertices along them, the patches deform and hence you change the shape of your object. Now that you’re oriented, let’s get to work on the slogre’s body (remember to use the slogre sketches at the beginning of this chapter as a reference): 1. Start forming the belly of the slogre by rotating the sphere in a Left orthogonal view so the top is tilted forward slightly. 2. Select a vertical isocurve of the sphere, and drag it slightly downward. (Use the Move, Rotate, and Scale tools located in the NURBS tool group that popped up when you right-clicked on the sphere to move this curve.) Figure 4.9 shows my results.
NOTE Modeling with NURBS may seem a little crazy at first, but in no time you’ll be smooth and quick with it.
TIP If you don’t know how to use the basic object-manipulation functions of trueSpace, read the trueSpace tutorials on the CD-ROM.
Modeling the Slogre
Figure 4.9 Click and drag a vertical curve to begin forming the belly of the slogre.
3. Activate the Patch Edit: Points tool to click on the vertex at the bottom of the sphere, and move it away slightly to form the tail (see Figure 4.10).
TIP Use the orthogonal views (Left, Front, Top, and so on) when modeling with NURBS to help align your modeling actions. Modeling in the Perspective view can cause confusion, particularly if you have 3D Controls turned off.
4. Use the Eye Rotate tool to rotate around to the back of the sphere. While holding down the Ctrl key, click two of the upper points of the sphere and scale them outward, forming the back and shoulders of the beast (see Figure 4.11).
5. Pinch in the sides at the same time by Ctrl+clicking a point on each side of the sphere and scaling them inward (see Figure 4.12).
Figure 4.10 Form the tail of the slogre by dragging the bottom vertex away.
73
4.
Modeling the Slogre Character with trueSpace 6
AM FL Y
Figure 4.11 Scale two points at the top to form the shoulders and back.
Figure 4.12 Push in the sides of the sphere to give the body more definition.
TE
74
6. The top of the slogre character is adorned with a hump. Create this by dragging a single point upwards, as I did in Figure 4.13. Note that if you right-click this point, Control Vertex handles will appear, allowing you to further adjust the spline curve at this point.
NOTE Working uniformly like this is important to symmetrical modeling; in this example, however, it’s not critical because at the end you’ll just be copying half of the slogre and pasting it to the other half.
7. This character has a bizarre, elongated head that protrudes from the hump. Start forming this by dragging the single end point of the sphere as I have done in Figure 4.14. 8. To continue creating the head, you need to increase the resolution of the sphere by increasing the amount of isocurves at the end. To do so, first click on the last curve at the end to highlight it, click the Refine Patch tool, and
Team-Fly®
Modeling the Slogre
Figure 4.13 Drag a single point at top to form the hump.
Figure 4.14 Start forming the head by dragging the top end point of the sphere.
click and drag along the length of the body (you’ll see an orange curve, as shown in Figure 4.15). When you reach the spot where want to place the curve, release the mouse button. You can continue to add curves by leftclicking; for now, however, just right-click to deselect this tool.
Figure 4.15 Create a new isocurve on the head using the Refine Patch tool.
75
76
4.
Modeling the Slogre Character with trueSpace 6
TIP If you’re having trouble switching back and forth between operating on a single point or entire curve, just click the Object tool (white arrow), then right-click the NURBS object to re-enter the edit mode.Then just select the Patch Edit tool of choice to continue modeling.
9. Pinch in two points on either side of the newly created isocurve to further define the head. To do so, Ctrl+click one on each side, then scale them slightly (see Figure 4.16). 10. To increase the hump’s definition, making it more pronounced, right-click one of the top points of the hump to bring up the control handles, and click and drag the handles to change the sharpness at that point (see Figure 4.17). Figure 4.16 Pinch the head a bit to further define it.
Figure 4.17 Sharpen the hump by adjusting the control handles of a point on top.
Modeling the Slogre
11. To extend the head even further, Ctrl+click both the last isocurve and the end point of the head and drag to stretch it. The results are shown in Figure 4.18 (I also rotated and scaled that last curve a bit). 12. Continue refining the head using the Refine Patch tool to create new curves, and move/rotate/scale them, as well as the end point, as I have done in Figure 4.19. 13. Once you’re satisfied with the head, continue making small curve and point adjustments around the body in the same manner until the body is how you want it to be (see Figure 4.20). You don’t have to go nuts adding isocurves; only a few make the body very smooth. 14. When finished, exit editing mode by clicking the Object tool. 15. Save this piece by clicking File, Save As, Object, and name it body.cob. (You’ll need to recall it at the end so you can attach the other pieces.)
Figure 4.18 Pull the end of the head out further.
Figure 4.19 Add and adjust more isocurves to continue refining the head.
77
78
4.
Modeling the Slogre Character with trueSpace 6
Figure 4.20 Continue manipulating the rest of the body’s curves and points to reach the shape you desire.
Step 2: Build the Leg You’ll build this next piece using the Draw Panel tool to explore some other NURBS modeling techniques that trueSpace has to offer. Draw Panel enables you to draw a simple spline curve and then extrude it—only in this case, the extrusion becomes a NURBS object. You’ll start by making the basic foot pattern, and pull the entire leg right out of it! 1. To use the Draw Panel tool, you must turn on 3D Controls in the Preferences panel. To do so, choose File, Preferences, and select the 3D Controls option in the dialog box that appears (see Figure 4.21). 2. Click on the Draw Panel tool, located in the toolbar at the bottom of the screen. 3. To add a panel to the screen, click and drag in the main Perspective view as I have in Figure 4.22. This panel will enable you to draw a 2D spline curve and extrude it. Notice that when you add the panel, an entire suite of tools pops up as well; these offer a multitude of ways in which you can draw curves on the panel. Figure 4.21 Enable the 3D Controls option for this next exercise.
Modeling the Slogre
Figure 4.22 Click on the Draw Panel tool and add a panel to the scene.
The Draw Panel tool
4. Choose the Add Curve tool and create a foot-shaped pattern, as shown in Figure 4.23; when you reach the start point of the curve, right-click to close the shape. (The shape of the foot doesn’t have to be perfect; you’ll adjust it in the next step.)
Figure 4.23 Add a foot-shaped pattern to the panel using the Add Curve tool. Use the slogre sketch as a reference.
NOTE You can switch to a top orthogonal view above the panel by clicking one of the panel’s corner points.
79
80
4.
Modeling the Slogre Character with trueSpace 6
5. Once the general shape has been created, click on any of the curve points to display its control handles, and use these handles to adjust the shape of the curve at that point—as well as to drag those points to new locations (see Figure 4.24). You can also add and delete points using any of the various vertex-edit tools that accompany this operation. 6. When you’re satisfied with your shape, right-click anywhere outside the panel to exit, or click the Object tool. Another small set of tools appears; these enable you to extrude your shape. Click the Extrude tool to display a doubleended control handle, perpendicular to the face of your shape, and then click and drag on the endpoint of one handle to extrude the base of the foot slightly as I have done in Figure 4.25. 7. When the base of your foot is created, right-click to exit extrusion mode. The object you just created is now a modifiable NURBS object, just like the slogre’s body you created earlier. The only difference here is that both ends are open and faceless (don’t worry about that for now; you’ll cap the bottom
Figure 4.24 Adjust the shape of the foot using the control handles of the points.
Figure 4.25 Use the Extrude tool to sweep the face of the foot into 3D.
Modeling the Slogre
later). To begin shaping the foot, use the Refine Patch tool to add an isocurve as you did with the slogre’s body. In Figure 4.26, I created a couple new curves and scaled them to form the foot. 8. For each time you want to extrude your shape vertically, remember to first create an isocurve, and then pull the last curve upward. When the general shape of the foot is done, use the Delete Row of Points tool (opposite the Refine Patch tool) to remove unnecessary curves. Remember, the more curves you have, the higher the number of polygons in the resultant model. Figure 4.27 shows my slogre foot after I killed several superfluous curves. 9. When you’re satisfied with the foot, right-click the last, top curve to edit the points along the edge. Move these points into a circular ankle shape. Then, continue adding isocurves and extruding the ankle portion of the leg (see Figure 4.28).
Figure 4.26 Add new isocurves to the foot object and move and scale them to shape it.
Figure 4.27 Remove unnecessary curves using the Delete Row of Points tool.
81
82
4.
Modeling the Slogre Character with trueSpace 6
Figure 4.28 Move the points at the top into a circular shape for the leg, and continue extruding.
10. Continue extruding the rest of the leg, forming a calf muscle and thigh by scaling and shifting the isocurves at those locations. If the points from the foot made indentations along the leg at any point, simply select the individual points and reposition them. The NURBS properties of the object make things sweet and smooth (see Figure 4.29). 11. When you’re finished extruding the leg and are satisfied, save this object as leg.cob so you can retrieve it later. Figure 4.29 Continue pulling out the rest of the leg, making adjustments to form the calf and thigh.
Step 3: Build the Arm You could create the arm just as you did the leg, but the arm is a lot more complicated—especially around the hand. For this operation, then, it’s best to use plain old point editing to build and sweep the arm. This doesn’t mean a whole lot as far as the resulting model is concerned; in fact, the polygon count will be much lower. The arm will suffer in its organic-ness, however, because point editing has nothing
Modeling the Slogre
83
on NURBS objects when it comes to creating realistic organic shapes. When you bring the model into 3D Studio Max and smooth it out, however, you really won’t be able to tell the difference. I think the most noticeable difference between pointedit modeling and NURBS modeling is the speed. In the time it will take to model this one arm, I could finish the body and leg portions twice over! 1. Let’s start with the wrist area of the slogre. If you refer to the slogre sketch, you’ll notice that he’s wearing slave-like bands with sharp, pointed studs. Create a band by adding a 10-sided cylinder primitive to the scene and scaling it down to size, as shown in Figure 4.30. (The cylinder primitive is also located in the toolbar at the bottom of the screen.) 2. To create the pointed studs, first right-click the cylinder to enter point-edit mode. (This is the same as NURBS mode, but without the NURBS isocurve functionality.) 3. Using the Point Edit: Faces tool, click on a face to select it, and pull it quickly to a tip using the Tip tool. Repeat this process for every other face (see Figure 4.31). 4. The tips of the spikes are too long—use the Point Edit: Vertices tool to select each tip’s point while you hold down the Ctrl key. When all points are selected, scale them down to size (see Figure 4.32).
Figure 4.30 Start the arm off with a 10-sided cylinder primitive.
4.
Modeling the Slogre Character with trueSpace 6
AM FL Y
Figure 4.31 Select every other face of the cylinder and apply the Tip tool.
Figure 4.32 Select all the tips and scale them down.
TE
84
5. To create the rest of the arm, select the top face of the cylinder and use the Sweep tool to extrude it. Continue sweeping this face, scaling each time, until you get a general shape of the arm. Remember to use the slogre sketch as a guide—his arms are massive with huge, bulging biceps. Just like mine.
Figure 4.33 Use the Sweep tool repeatedly to extrude the top face of the cylinder into the entire arm.
Team-Fly®
Modeling the Slogre
6. Make minor adjustments to the arm by selecting a face or multiple faces (by holding down Ctrl and clicking) and moving/scaling them appropriately. In Figure 4.34, I’m selecting a patch of the bicep area and augmenting it. 7. Now for the hand—just as you did with the arm, select the face on the other side of the cuff and sweep it several times, adjusting the width to conform to a hand shape as I have done in Figure 4.35. 8. Select a pad of faces on the inside of the hand and move, rotate, and/or scale them to make a palm (see Figure 4.36). 9. When the palm portion of your hand is complete, start adding fingers by first breaking the end face into four smaller sections. To do so, use the Add Edges tool (part of the tool group that pops up when you enter point-edit mode) to create an edge between opposite vertices on the face (see Figure 4.37). 10. The fingers can’t just be extruded from these new faces you’ve just created. Instead, select each face and apply the Bevel tool (Figure 4.38).
Figure 4.34 Enhance the muscles of the arm by selecting faces and moving or scaling them to size.
Figure 4.35 Begin sweeping the hand on the other side of the cuff.
85
86
4.
Modeling the Slogre Character with trueSpace 6
Figure 4.36 Form the palm of the hand by manipulating a small set of faces.
Figure 4.37 Start the fingers by creating new edges at the end of the palm.
Figure 4.38 Bevel the new faces so you can add the fingers.
11. With the new bevels in place, the fingers can be pulled out of them. However, the faces are too square for my standards—use the Add Vertex tool to add four new vertices to the edges of each face, and move each new vertex away from the center to round it out. When you’re finished with each face, create the fingers by using the Sweep tool on each (see Figure 4.39).
Modeling the Slogre
87
Figure 4.39 Add vertices to the square faces and round them out. Sweep them to start the fingers.
12. Continue sweeping the faces of each finger, scaling them as you get closer to the tip. In Figure 4.40, I also moved the faces away from each other so that from a short distance, a player can discern each individual finger. 13. To form the long, slashing nails that embellish your behemoth, add a small edge at the tip of each finger, effectively creating a triangular face, and use the Tip tool to pull that out. Then, grab the tip and pull it out further—the nails should be long, according to the sketch, about the length of the entire hand (see Figure 4.41). 14. Form the thumb the same way you created the fingers in steps 11, 12, and 13—though there’s no need to bevel the first face. Make the thumb curve outward slightly so it can hold the RF-9 plasma gun (see Figure 4.42). That’s it for the arm. Notice that this took much longer than the other body parts, but the tradeoff is in the face count–to-smoothness ratio. In Figure 4.43, my arm model shows only 341 faces, even with all of the minute detail, whereas the leg object was more than 600; that said, the leg looks much more organic and realistic Figure 4.40 Continue sweeping the faces to form the fingers.
88
4.
Modeling the Slogre Character with trueSpace 6
Figure 4.41 Form the nails by adding small edges to the fingertips and tipping them.
Figure 4.42 Create the thumb using the same steps as you did with the other fingers.
than this arm. (You’ll fix the choppiness in 3D Studio using a Smooth modifier— more on that in Chapter 6, “ U-V Mapping the Slogre with DeepUV,” when you import the slogre model and prepare to unwrap the U-V coordinates.) For now, save this object as arm.cob.
Step 4: Complete the Model (Well, Half of It) Now it’s time to bring the fruits of your labor together into a working slogre model. There are a number of ways to finish up a model, but I think the best way to handle this one is to create only half of it since this beast is basically symmetrical. If you were to union the legs and arms to both sides of the object and then optimize it in 3D Studio Max, however, the mesh would be smooth but the polygons would be a jumbled mess—that is, the optimization process in Max would make the mesh uneven throughout the character’s body. Instead, let’s union one arm and one leg to the body, slice the sucker in half, and let Max take care of the rest, since its suite of optimization tools is far more advanced.
Modeling the Slogre
Figure 4.43 The completed arm. Notice the low polygon count and high detail, but sacrifice in smoothness.
To load into one scene the three separate body components that you created in previous sections, start a new scene and choose File, Load, Object to load each component individually. (If you like, you can load my components instead of the ones you created by choosing the arm.cob, leg.cob, and body.cob files from the Chapter 4 Data section on the CD-ROM.) Once these components are loaded, the scene should consist of two NURBS objects (the body and leg) and a regular polyhedron object (the arm). Your job is to align the ends of the appendages to the body and Boolean Union them together. First, however, you need to resize the body parts and adjust the NURBS resolution. 1. Click on the body object to select it, and then right-click on the NURBS Patch to Polyhedron tool to bring up the Patch Options panel. I have the Static Res set to 0.3, which will result in the TIP body object having just over 1,100 faces. When you convert a NURBS Click on the Patch to Polyhedron tool object to a regular polygon, to permanently convert the body to a the operation is not undoable! regular mesh (see Figure 4.44). Be sure to save your work before performing this action!
89
90
4.
Modeling the Slogre Character with trueSpace 6
Figure 4.44 Use the Convert Patch to Polyhedron tool to turn the NURBS object into an ordinary mesh.
2. Repeat step 1 for the leg object, only set its Static Res to 0.2. This will make it contain just over 600 polygons. 3. After the leg object is converted, scale it evenly so its proportion is accurate when placed next to the slogre’s body, and rotate it into position where it should protrude. 4. Repeat step 3 for the arm object (it doesn’t need to be converted; you built it from an existing polyhedron mesh). Figure 4.45 shows my arrangement. 5. Make sure the arm and leg objects extend fully into the body of the slogre, or you’ll get holes in the final mesh. To do so, rotate around the body and zoom in close to be sure they’re all the way in. (If you have your rendering environment set to Solid mode you can see the mesh move in and out of one another much more easily.) 6. When you’re satisfied that the appendages are, indeed, all the way in, save your scene, and use the Object Union tool to fuse the three body parts together. Figure 4.45 Convert the NURBS leg, and scale and position it—and the arm—on the body.
Modeling the Slogre
Figure 4.46 Fuse the arm and leg to the body using the Object Union tool.
NOTE Should trueSpace proclaim that an error has occurred, rightclick on the Object Union tool to bring up a Booleans options panel (see Figure 4.46). In this panel, you can adjust the Identity value and try the union operation again.This value represents a distance in 1/100ths of a millimeter between near coincident vertices—that is, vertices that happen to be on top of one another. Adjusting this value will tell trueSpace to recalculate the operation and try to avoid invalid geometric fusion.
7. If the union operation was successful, you should have one solid, goofylooking mesh with a single arm and leg sticking out of it; the next step is to split the slogre’s body in half. To begin, create a cube primitive in the scene and scale it so it’s much bigger than the slogre itself. 8. Position the cube so it intersects the half of the body that has no arm or leg (see Figure 4.47). Be sure that the edge of the cube is as close as possible to the middle seam of the body. 9. Select the slogre mesh, click the Object Subtraction tool, and click the cube. You should end up with a half mesh.
NOTE If trueSpace issued a warning, right-click the tool and change the Identity value a bit, and then try again.
91
92
4.
Modeling the Slogre Character with trueSpace 6
Figure 4.47 Add a cube primitive to the scene, scale it, and position it so it covers the entire half of the slogre’s mesh.
10. Rotate around to the foot. When you created the leg, the foot was extruded from a spline curve and had no end cap; notice that in solid-render mode, it appears open. To fix this, right-click on the mesh to enter point-edit mode, choose the Point Edit: Add Face tool, and click on this open area to close it up (see Figure 4.48). 11. Rotate around to the flat side of the slogre, where it was cut; as a result of the Boolean operation, there’s a solid face there. For you to be able to fuse a copy of the finished side of the slogre to the other side, the slogre mesh needs to be a hollow object. To make it so, select the Point Edit: Delete Face tool and click once on the abovementioned flat area to remove it (see Figure 4.49). As soon as you delete the face, right-click to deselect the Delete Face tool.
Figure 4.48 Subtract the cube object from the slogre, and cap the hole on the foot using the Add Face tool.
Summary
Figure 4.49 Delete the flat, cut surface from the side of the slogre’s body with the Delete Face tool.
Export the Mesh You’re finished with your half-shell slogre mesh and are ready to save it as an STL file and bring it over to Max for completion and U-V mapping, just as you did with the RF-9 plasma gun. To do so, choose File, Save As, Object; from the Save As Type list, select Stereolithography (*.STL). To finalize the slogre mesh and continue mapping, move on to Chapter 6.
Summary In this chapter you learned how to create a character mesh object using new and powerful NURBS modeling techniques that allow your creation to look very realistic, with a more natural, organic feel. There are pros and cons to using NURBS; on the positive side the resulting model can be created in only a fraction of the time it would take using older modeling techniques such as shaping with primitives and point editing. The negative side is the resulting polygon count, which, for now, can be fairly high. However, with the steadily evolving computing technology, the need to be keenly aware of polygon counts in models will no doubt diminish.
93
TE
AM FL Y
This page intentionally left blank
Team-Fly®
PART TWO
Unwrapping the UVs with DeepUV
5
U-V Mapping the RF-9 Plasma Gun with DeepUV
6
U-V Mapping the Slogre with DeepUV
CHAPTER 5
U-V Mapping the RF-9 Plasma Gun with DeepUV
5.
98
U-V Mapping the RF-9 Plasma Gun with DeepUV
E
very 3D model you create consists of a finite set of vertices, or points, defined in 3D space by X, Y, and Z Cartesian coordinates. These points are connected by lines, or edges, which then define the faces of the object, giving the object the appearance of a solid surface. When you finish creating a model, you have a choice: Either paint the faces with plain, boring colors (which any 3D modeling program can do using simple paint tools), or texture the model by utilizing a special set of points called U-V coordinates. When you paint the faces of a mesh object, all you’re doing is telling the vertices what colors to become, and to fill in the spaces between them with a blend of their neighboring vertices’ colors. If you want to wrap a texture, or skin, around the object, you must use U-V coordinates to align it properly so it wraps without smearing, tearing, or generally looking bizarre. All 3D models are created with a default set of these U-V coordinates, which are simply invisible duplicates of the model’s mesh vertices. Your modeling program of choice will use these U-V coordinates to dictate how a texture map should be applied to the surface. The way this process works is, you create a 3D object, unwrap only the U-Vs, lay them out flat on a blank bitmap surface, and arrange them in a way that makes the texture creation process easy. Then you paint the texture according to the newly adjusted U-V map, and finally apply the texture map to the model. Sound confusing? It really isn’t! In this chapter, you will ■
■
■
■
TIP
Enter the realm of texture-coordinate If you’re totally new to this U-V manipulation with DeepUV. stuff, see Appendix A, “A 3D Learn to use rudimentary projection Modeling Primer,” for more techniques to unfold complex 3D texdetailed information on the basics of U-V coordinates. ture coordinates. Practice by example unfolding the texture coordinates of a simple widget object. U-V map the texture coordinates of the RF-9, step-by-step, in preparation for its texturing.
This chapter assumes you’ve finished creating your model from Chapter 3, “Modeling the RF-9 Plasma Gun with trueSpace 6,” and are moving along the logi-
Installing the Software
cal route of game-object creation, as shown in Figure 5.1. This chapter represents the next step in creating a 3D game asset: manipulating the U-V coordinates of your mesh object in preparation for texturing.
Installing the Software Included in the Programs section on the CD-ROM is a demo version of DeepUV (although the demo has a 30-day expiration period, it does feature all of the functionality of the full version). If you haven’t done so already, go ahead and install it. When you do, make sure the plug-in for 3D Studio Max is installed as well. The option for installing the plug-in for Max is part of the installation routine.
NOTE Depending upon your video card and driver, you may need to adjust a setting in DeepUV for it to work properly. Do this by clicking File, Preferences, and in the Rendering tab, select the mode you want DeepUV to use. I have a GeForce 3 card, and have both 3D and 2D rendering set to Software.This allows DeepUV to rely directly on my video card’s driver software. Only experiment with these settings if you’re having graphics problems when running this program.
Figure 5.1 This phase in the sequence of 3D game-object creation.
99
100
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
TIP If you have trouble installing the demo, or need software patches or other support, visit http://www.righthemisphere.com.
Introduction to DeepUV 1.0 The great thing about the U-V coordinates of an object is that you can move them around and position them so that your texture will align itself nicely and look great during render time. The downside is, it’s nearly impossible to manually move the U-Vs around so your texture fits correctly. That’s why the company Right Hemisphere has developed specialized software, DeepUV, to aid in manipulating the U-Vs to your liking. On the surface, DeepUV is a very simple, easy-to-use program (what it does behind the scenes is a different story). It presents you with a modest set of tools to analyze small parts (or the entirety) of your mesh object’s U-V coordinates, and to unfold them flat on a texture map’s surface—without affecting the actual shape of your 3D mesh. These tools allow you to view your U-Vs planarly, cylindrically, spherically, or polarly. Using primarily the first three of these techniques, you can easily and quickly unwrap any object’s texture coordinates, no matter what shape it has. Confused? Pretend that DeepUV has a specialized camera that you can position around your 3D model. You tell DeepUV what technique—planar, cylindrical, spherical, or polar—the camera should use to view the texture coordinates of the area in question; the camera then displays whatever it’s looking at only as a 2D unwrapped map. When you specify a technique other than planar, such as cylindrical, the camera, all-at-once, views the entire selection in a cylindrical fashion, and displays what it sees as a flattened 2D map. For instance, suppose you’re trying to unwrap the U-Vs of the forearm of a character model. You can tell DeepUV to look at the arm cylindrically, since the forearm has that general shape, and the camera simultaneously wraps itself around the entire forearm to display the UVs nice and flat. Still confused? Don’t worry. The best way to see all of this is by example.
Example: Unwrap the Widget
Example: Unwrap the Widget Before you jump into unwrapping the RF-9 plasma gun (or whatever cool object you’ve created), let me give you a quick example that uses the three most common U-V unwrapping techniques in DeepUV: planar, cylindrical, and spherical. Start by firing up DeepUV. When the program starts, it displays a blank interface, with a Tools box and a Command Panel to the right (see Figure 5.2). Notice that there are only a few tools available; they’re all you’ll need to get the job done. Notice also that DeepUV’s tools appear to be very similar to Photoshop’s; as it happens, they work the same way. I’ll go over these and the other features as we use them. For this example, I used trueSpace to create a simple object (I’m calling it a widget) that contains most of the shapes you’ll encounter when unwrapping. Because DeepUV only opens 3D Studio Max (.3ds), Lightwave (.lwo), and Wavefront (.obj) file formats, I saved it as widget.3ds in the Chapter 5 Data section on the CD-ROM. Go ahead and open it (click File, Open); you should see the screen that appears in Figure 5.3.
Figure 5.2 The default DeepUV 1.0 interface.
101
102
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.3 Open the widget.3ds file on the CD-ROM.
Notice that the screen splits into two halves. On the left is the Material screen, which represents your U-V coordinates as they will eventually be laid out flat and bounded by the gray square in the middle. The gray square will contain the final layout of the texture-mapping coordinates, which you will then export to a painting program to begin your texturing. On the right is the Perspective view of the widget, which allows you to rotate your model in 3D space and select coordinates for unwrapping. Notice that the Mapping tab under the Command Panel has expanded to offer you a suite of options for unwrapping your object. Click and drag the widget; notice that it rotates around, letting you view it from any angle. The blue lines of the object represent the portions that are not selected, whereas red signifies an active selection. Also notice that there appears to be a clumpy, blue dot on the upper-left hand of the corner of the Material map—this is the unorganized, jumbled mess of U-V coordinates you need to sort through.
Automatic Mapping Your objective is to lay out the U-V coordinates within the Material area so that painting a texture map in a paint program will be a snap. DeepUV offers an
Example: Unwrap the Widget
103
Figure 5.4 Select everything and click the Box button.
The Box button
Automatic Mapping feature, which unwraps your selection based on several mapping techniques and tries to figure out what makes the most sense. To use it, start by pressing Ctrl+A to select all the points of the mesh. (Note that the widget becomes entirely red, indicating that all texture coordinates have been selected.) Then, under the Automatic section of the Mapping panel, click Box. In a few short seconds, you should see something like what’s shown in Figure 5.4. As plausible as automatic mapping may seem, it almost never unwraps things the way you want it to—although it didn’t work too badly in this case. You can clearly see in the Material screen at the left that the U-V coordinates have been neatly unwrapped, and then packed into the gray square. The cube portion of the widget is nicely unfolded (that’s because you chose the Box unwrapping method), and the cylinder portion (laid out in the upper-left corner) has been flattened, but the sphere portion got chopped up a bit—the result of the Box procedure doing its best to unfold a sphere like a box. From here, you could simply export the map for texturing, but it would be difficult to do a decent texture for the sphere portion because it’s spread all over the place. Instead, click Edit, Undo to undo the mapping operation so you can do it manually.
104
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Manual Mapping: Isolate and Unfold Just as you did when Point Edit modeling in trueSpace, you need to select coordinates using one of DeepUV’s selection tools in order to map it manually. Let’s start with the box at the top of the widget (it’ll be the easiest to map), followed by the cylinder, and lastly the sphere:
AM FL Y
1. In the widget’s Perspective view screen, right-click to open the View menu. 2. Select View, Front to reveal an orthogonal view of the object, as shown in Figure 5.5. 3. Click on the Rectangular Selection tool (the first tool in the Tools group, as shown in Figure 5.6).
TE
4. Notice the four selection-mode options near the top-left of the screen; each one represents a different way of making U-V selections on your object. Click on the Point Selection Mode option so you can select individual coordinates. (The other modes let you select in groups if your object has subobjects and the like, which yours doesn’t.) 5. Enable the Back Faces option, to the right of the selection-mode buttons. This allows you to make selections that include all points, front and back, in the box. Figure 5.5 View the object with the Front view.
Team-Fly®
Example: Unwrap the Widget
105
6. Click to the left and slightly above the cube, and drag a rectangular selection around the cube portion of the widget. The selected area becomes red; because the points contained at the end of the cylinder are selected as well, the red fades to blue towards its other end. This simply indicates that your selection is attached to another part of the widget (see Figure 5.6). 7. With the cube portion selected, it’s time to excise its U-Vs from the rest of the object. Under the Tools section of the Mapping panel, click Cut. This isolates your selection, so you can proceed with unfolding it. 8. Because the shape you want to unfold is a cube, click the Box button under the Mapping panel’s Automatic section. Your selection will neatly unfold, as shown in Figure 5.7. Notice that one side of the flattened cube has a hole in it; that’s where the cylinder portion of the widget attaches.
NOTE It won’t matter that your selection boundary invades the cylinder because the cylinder contains no selectable points in there—except for the cylinder’s end (more on that in a moment).
Figure 5.6 Use the Rectangular Selection tool to select all points of the cube end of the widget.
The Rectangular Selection tool
NOTE None of what we’re doing has anything to do with the mesh object’s vertices, only the U-V coordinates.
106
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.7 Cut the selection away from the rest and click the Box button.
9. As it stands, the cube’s U-Vs consume too much space on the Material map—space that you need for the cylinder and sphere portions of the widget. To scale the cube down, you can press Ctrl+T to use the Free Transform tool, or click Edit, Transform, Scale By, . . . and scale the cube by whatever percentage will shrink it adequately (I scaled by 50 percent). 10. Select the Move tool and move the selection to the upper-right corner, as shown in Figure 5.8. (You can scale and move the cube however you want, as long as the U-Vs stay within the gray area.) 11. Moving on to the cylinder portion of the widget, use the Rectangular Selection tool to select the cylinder, going slightly over the edges into the cube and sphere.
TIP When scaling your individual U-V selections, remember that the larger the scale, the more detail you will be able to have in the texture map for that particular area.
12. Click the Cut button in the Tools section of the Mapping panel to separate the selection from the other U-Vs. 13. Because the shape you want to unfold is a cylinder, click the Cylinder button in the Interactive section of the Mapping panel.
Example: Unwrap the Widget
107
Figure 5.8 Scale and move the U-V selection to fit within the texture map and allow room for the rest of the widget’s U-Vs.
14. In the same area of the Mapping panel, click the Selection button to center the mapping on your selection. You should end up with an unfolded selection as I have in Figure 5.9.
Figure 5.9 Select the cylinder portion of the widget, cut it away, and click the Cylinder button.
The Cylinder button The Selection button The Cut button
108
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
NOTE When you use the Interactive options to map a selection, you’ll notice little multicolored gadgets that hover around the selection.These represent the X,Y, and Z (or, more appropriately, U,V, and W) axes of the mapping technique.You can change the way the mapping technique observes your model’s U-Vs by clicking and dragging them—this creates the same effect as rotating the camera around your model.This enables you to position the unwrapping technique so that it unwraps weird- or odd-shaped areas more effectively, and allows you to align and hide texture seams. I’ll discuss that in more detail later, particularly when I cover unwrapping the slogre model.
15. With the cylinder area unwrapped, scale and position it so it fits on the map, just as you did in steps 9 and 10 (see Figure 5.10). 16. Now for the sphere. As with the cube and the cylinder, use the Rectangular Selection tool to select the sphere.
Figure 5.10 Scale and position the cylindrical selection on the Material map.
The Move button
Example: Unwrap the Widget
109
17. Click the Cut button in the Tools section of the Mapping panel. 18. In the Interactive section of the Mapping panel, click the Sphere button. 19. In the same section of the Mapping panel, click the Selection button to center the mapping technique on the selection. 20. Scale and move your newly unfolded U-Vs; the result is shown in Figure 5.11. That’s it! You’ve successfully unwrapped and nicely aligned the U-Vs for the widget object. From here, you’d typically export the map to a program such as Deep Paint 3D and begin texturing; alternatively, you can send the updated U-V coordinate arrangement to a program like 3D Studio Max, which is what you’ll do for the RF-9 plasma gun. To give you a better understanding of where this operation goes from here, I exported this U-V arrangement to Deep Paint 3D and Photoshop (see Chapter 11 for detailed information on exporting and painting texture maps) and painted a texture on it, using the U-V lines as a guide. Then I placed the texture map back onto the widget model as shown in Figure 5.12.
Figure 5.11 Select and unfold the sphere portion, then scale and move it so it fits on the Material map.
110
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.12 Using the new U-V map to add a skin texture to the widget.
Mapping the RF-9 Ah, the section you’ve been waiting for! I hope the previous section helped acquaint you with DeepUV. I didn’t touch on every aspect of the program, but I think it was enough to get your feet wet and help you to understand what’s involved with texture mapping. The RF-9 is a bit more complicated, so you’ll have to isolate and unpack it with more finesse.
Preparing the Model for Texturing Before you dive into unwrapping and texturing the RF-9, you need to import the STL version of the weapon you created in Chapter 3, check it for problems, optimize it, and map it. (If you don’t have this file, you can find it in the Chapter 5 Data section on the CD-ROM; it’s named RF9.stl.) Instead of using DeepUV to do this, however, you’ll use 3D Studio Max.
NOTE If you don’t have 3D Studio Max installed on your machine, you’ll be glad to know that the CD that comes with this book includes a demo version, located in the Programs section. Install it, as well as the DeepUV plug-ins that come with the DeepUV demo.
Mapping the RF-9
Import the STL To import the STL file into 3D Studio Max, do the following: 1. Start the program. 2. Click File, Import. 3. Select StereoLitho (.STL) from the Files of Type drop-down list. 4. Browse for the RF9.stl file (or whatever you named your model), and click Open. 5. The Import STL File dialog box opens, with various default settings selected. Click on the Quick Weld option (see Figure 5.13). 6. Click OK when you’re ready for 3D Studio Max to do its job. You should now have successfully imported the model into Max.
Figure 5.13 Importing the RF9.stl file in 3D Studio Max.
NOTE The Import STL File dialog box’s default settings allow the program to sniff out any errors such as duplicate vertices, open faces, and the like, and fix them on-the-fly.
TIP If you’re new to 3D Studio Max, or need some guidance using it, see the 3D Studio Max tutorials on the CD-ROM that accompanies this book.
111
112
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Apply the STL Check Modifier Even though the STL Import feature did its best to check your model for problems, you need to further verify that the model is clean by using the STL Check modifier. (If the model does contain errors, such as having holes and whatnot, it may cause DeepUV or the game’s engine to crash.) To use the STL Check modifier, do the following: 1. Click once on the RF-9 to make sure it’s selected, then click on the Modifiers tab at the top-right of the screen. 2. Pull down the modifier list and click on STL Check (see Figure 5.14). 3. When the STL Check modifier has been added to the modifier stack, you’ll see a panel below it displaying the modifier’s options. By default, the modifier will check everything possible within your object, which is fine. To complete the check operation, click the Check button. In a flash the program does its job, and any errors are reported in the Status location (see Figure 5.15). In addition, if any errors are detected, they will show up in red on your mesh object.
Figure 5.14 Pick out STL Check from the modifier list.
The Modifiers tab
Mapping the RF-9
Figure 5.15 Applying the STL Check modifier to detect errors in the mesh.
NOTE
4. If all goes well (and it did for mine), you should have no errors; go ahead and save your scene as a MAX file by clicking File, Save.
If, after running STL Check, you discover that your mesh has problems, you must return to trueSpace (or use 3D Studio Max) and clean up your model. If the model is clean but STL Check still detects a problem, re-import the STL file and adjust some of the options in the STL Import dialog box to see if that fixes the problem.
Run a Polygon Check Notice that since you imported the RF-9 into 3D Studio Max, its mesh no longer appears nice and clean. In fact, there are new lines added all over the place! This is the result of the triangulation I mentioned in Chapter 3. When the model is triangulated, all of its faces are broken down into constituent triangles that represent the elementary faces (three-sided polygons) of the model. This effectively doubles, if not triples, the polygon count, but is necessary because all 3D objects must be processed at the triangular level. To determine just how many polygons your model now has, right-click on it to open the Transform menu, and select Properties. The Object Properties dialog box opens. It relays a number of details about the model, including the total vertices and faces (see the top-left portion of the dialog box). My model chimes in at more than 1,300, which could be better, but will work just fine in a game’s engine.
113
114
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Besides, when it comes time for final preparation of your model for use in a game (see Chapter 13), you’ll generate several different Levels of Detail (LOD’s) for the model, so its polygonal count drops dynamically with distance from other players.
NOTE To put my model’s polygon count into perspective, consider that the characters in id Software’s 2003 release of Doom III are averaging more than 5,000 polygons per model!
AM FL Y
Gone are the days of the slow computer, when you needed to pay attention to every little polygon. Because computers are (finally) picking up the processing pace, we can stop being so finicky and make higher-resolution models. That said, you can, if you like, clean up your model a bit by applying the Optimize modifier, located in the modifier panel’s drop-down list. This will shave off another 50 or so polygons, thus speeding up game play even more!
TE
Map the Selection
Finally, you’re ready to export the U-Vs to DeepUV! If you’ve installed DeepUV correctly, including the Max plug-in, it should be available in 3D Studio Max’s Utilities panel (see Figure 5.16). To access it, click on the Utilities tab and, in the list that appears, click Right Hemisphere. Below that, you’ll see a DeepUV section. With your model selected, click Map Selection. Because you haven’t yet applied any materials to the model in Max, you’ll get a warning to that effect; just click OK. 3D Studio Max applies a default solid-color material to the object just so there’s something to work with. If your programs and plug-ins were installed correctly, DeepUV should pop up and import the RF-9.
TIP Even after you’ve imported the RF-9 to DeepUV, it’s a good idea to keep 3D Studio Max open; when you finish laying out the U-Vs, you’ll want to send a U-V update back to Max. That way, after you send the model’s U-Vs to DeepUV, a dynamic link is established between the programs that allows you to bounce back and forth between the two as you work. If you’re low on system memory, however, don’t fret; this is not an absolute necessity; you’ll just need to manually fetch the updated U-Vs in Max after you finish with them in DeepUV. (I’ll show you how to update both ways.)
Team-Fly®
Mapping the RF-9
115
Figure 5.16 Picking out the Right Hemisphere plug-ins within Utilities.
The Utilities tab The Map Selection button
Plan of Attack In keeping with the U-V mapping example earlier in this chapter, I’d like to break down the RF-9 plasma gun model in the same primitive-style manner. Looking at the weapon, you can see that it is mostly a bunch of spheres, cylinders, and planes all glued together. Even the hoop-shaped objects protruding at the ends are simply bent cylinders. Because the RF-9 is one complete mesh, instead of a bunch of subobjects all glued together, you’ll need to pick off individual components, unwrap them appropriately, and organize the Material map. Here’s my plan of attack (although you can do this in any order): 1. Unwrap the grip and trigger. 2. Unwrap the rear hoop. 3. Unwrap the barrel. 4. Unwrap the front hoop and hose. 5. Unwrap the muzzle. 6. Pack the map. 7. Update the U-Vs.
NOTE I’ve designed this section to be easy and workable, as opposed to efficient.This also applies to the actual model of the weapon; it will have mesh and texture details that won’t be noticed in a video game, but might in up-close shots outside of a game.That’s just to keep things simple as you learn the ropes.
116
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
First, however, you should set up your workspace for easier mapping. Chances are, when you imported the RF-9 into DeepUV, you probably ended up looking at the weapon according to the original axial orientation as established in trueSpace. To switch to Right view, right-click on the RF-9, and select View, Right (Shift+F). You should end up with a screen as in Figure 5.17. Whatever your model’s orientation, the rest of NOTE this tutorial operates under the assumption that the Front view looks at the side of the If you open the start.rh3 file on the CD-ROM, you can model; depending on the axes of your model, start fresh with the model you may need to make a view adjustment by and see things happen exactly choosing View, Front or View, Back. as I explain them. If not, do your best to follow along as I suggest in the figures.
Figure 5.17 The Right view of the RF-9 after importing it into DeepUV.
Mapping the RF-9
117
Step 1: Unwrap the Grip and Trigger The gun’s grip and trigger are two components that will be easy to unfold, because they consist of flat, planar faces joined together like a box (hint, hint!); let’s start with the grip. For starters, notice that the screen is split up into two parts: a Mapping section and the object viewport. As you can see, there’s a tiny blue cluster at the top-left of the Mapping area; that represents every U-V coordinate of the RF-9 all clumped together. It’ll be your job to slowly detangle this cluster and lay it out nice and neat on the texture map (the large gray square in the middle of the Mapping area). Here’s how:
TIP Before you do anything whatsoever, get in the habit of saving your work in DeepUV (and every other program for that matter!). Just click File, Save As; then, within the Save As Type list, select Scene File (.rh3). Give the file a name and click OK. That way, if something goes wrong, you can always reload your scene just as it is now.
1. Using the Pan and Zoom tools, zoom up close to the gun’s grip area. 2. Click on the Rectangular Selection tool; several options appear at the top of the screen. 3. Click the Point Selection Mode button. This allows you to make individual coordinate selections. 4. Click the Back Faces button; that way, you’ll be able to grab those coordinates that are hidden on the other side of the RF-9. 5. Using the Rectangular Selection tool, click and drag over the entire handle. Try to include only points that make up the grip and trigger as I have in Figure 5.18. 6. Using the Rotate tool, twirl the gun over a bit so you can see underneath. 7. As you can see in Figure 5.19, there are red (selected) areas that include points that don’t belong to the grip and trigger. To eliminate them, click the Rectangular Selection tool again, and, while holding down the Alt key on your keyboard, drag an area over the bogus points to deselect them. Notice that Rectangular Selection tool has a tiny minus sign next to it, indicating that it will subtract from the existing selection. (Conversely, if you hold down the Shift key instead of the Alt key, you can add to your selection.)
118
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.18 Select the RF-9’s grip with the Rectangular Selection tool.
The Back Faces button The Rectangular Selection tool The Point Selection button
NOTE Don’t worry too much if you’ve accidentally selected and cut away points outside the grip area; you can always detach and rejoin these points back to their proper portions of the weapon later. Remember, you’re only affecting the U-V points, and not the actual vertices of the object!
8. When satisfied with your selection, look at the upper-left corner of the texture map. A small red dot within the blue cluster is displayed, indicating that you’ve made a selection among those points. Your next step is to cut the points away so you can unfold your selection. Do so by clicking Cut in the NOTE Tools section of the Mapping panel (see Figure 5.20). If you don’t cut the points away 9. Using the Move tool, drag the red dot to the center of the texture map.
before trying to move them, they’ll remain attached to the rest of the group.
Mapping the RF-9
Figure 5.19 Rotate the model to view the underside, and deselect any points not belonging to the grip and trigger.
The Rotate tool
Figure 5.20 Cut the selection away from the rest of the points and move it to the middle of the texture map.
The Cut button
119
120
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
10. Your selection is ready to be unfolded. Because the grip is somewhat boxy, click Box under the Automatic section of the Mapping panel. DeepUV does its best to unfold everything (as you would a cardboard box) and lay it out flat, as shown in Figure 5.21. Notice that you can clearly see both sides of the grip, but that there’s a mess of other pieces lying around it. Those are the back and front faces of the grip, along with pieces of the trigger. You’ll organize those in a moment. 11. Using the Pan and Zoom tools, zoom in to the area containing the back and front faces of the grip. 12. With the Lasso tool, drag your mouse to draw a selection around one side of the grip. When you release your mouse button, only those points belonging to that side of the grip in the 3D view should be highlighted (see Figure 5.22).
TIP If you accidentally select points not belonging to the face, just press and hold the Alt key and drag a circle around the bogus point with the Lasso tool to deselect it. Just as with the Rectangular tool, holding Shift will add points.
Figure 5.21 Click the Box button to unfold the grip and trigger.
The Box button
Mapping the RF-9
Figure 5.22 Make a Lasso selection around one face of the grip.
13. To keep your workspace uncluttered, use the Move tool to move the selection away from the map, as I have done in Figure 5.23. 14. Repeat the Lasso selection process for the other side of the grip, and move it next to its kin. Figure 5.23 Move the selection away from the texture map to make space. Do the same for the other side of the grip.
The Move tool
121
122
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
15. Now for the trigger. Use the Lasso tool to circle the trigger area, but this time within the 3D viewport (see Figure 5.24). 16. Notice that several areas in the texture map have become highlighted, indicating the pieces that belong to the trigger. If you accidentally grabbed a portion of the barrel, it will show up as a red dot in that little blue cluster at the top-left of the Material map. To subtract them, hold down the Alt key on your keyboard and use the Rectangular Selection tool to deselect them. 17. Notice the small portion of the trigger’s selection that’s attached to the rest of the grip. To cut the group away, click Cut under Tools in the Mapping panel. 18. Using the Move tool, move the selection away, as I have in Figure 5.25. 19. Your trigger components are already isolated and unfolded; let’s pack them together and set them aside using the Packing and Type section in the Command Panel. Click on the Rectangle (Medium) option in the Type section, and then click Pack Selection above it. You should now have a packed selection, as shown in Figure 5.26. 20. Choose Edit, Transform, and scale the huge selection down to size to make it small and manageable.
Deselect these
Figure 5.24 Lasso the trigger to display its components in the texture map. Be sure to deselect any red that shows up in the blue clump at the top left.
The Lasso tool
Mapping the RF-9
123
Figure 5.25 Cut the trigger selection away from the group and move the selection away.
The Cut button
Figure 5.26 Pack the selection using the Rectangle option in the Command Panel.
The Pack Selection button The Rectangle (Medium) button
21. Using the Move tool, move the scaled selection over to the grip’s location (see Figure 5.27). 22. Rotate the RF-9 so you can see the back side of the grip. 23. Use the Rectangular Selection tool to select the area (see Figure 5.28). If you grabbed bogus points by accident, deselect them in the texture map.
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
AM FL Y
Figure 5.27 Scale the trigger selection down to size and move it next to the grip’s faces.
Scale and move
TE
124
Figure 5.28 Select the curved notch in the back side of the grip.
24. Click Unfold in the Automatic section of the Command Panel to lay the selected area out flat, as in Figure 5.29.
Team-Fly®
Mapping the RF-9
Figure 5.29 Click the Unfold button under Automatic in the Command Panel to group and flatten the notch area.
Automatic: Unfold
25. Rotate the RF-9 so you can see the front of the grip. 26. Repeat steps 23 and 24 for the notch in the front, just behind the trigger (see Figure 5.30). Figure 5.30 Scale and position the curve selection, and do the same for the front of the grip.
125
126
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
27. Using any of the selection tools, select the remaining bits and pieces all at once, and pack, scale, and move them over to the rest of the grip and trigger group (see Figure 5.31). These pieces represent texturing detail so minute that you don’t need to do much except apply a general painting later on, so don’t bother trying to organize them (unless you really want to).
Figure 5.31 Select the remaining pieces, and pack, scale, and move them to the rest of the group.
Pack, scale, and move
Sharing U-V Space Notice that the two halves of the grip are nearly, if not perfectly, identical. In such cases, if any texture coordinates cross or overlap each other, the texture at that point on the texture map will duplicate (or smear, if the points are crossed) itself on the 3D model once the texture is applied.This is known as sharing U-V space. In the case of identical coordinate sections, like the sides of the grip, you could flip one side to match the other, and then place one exactly on top of the other.That way, you only have to texture one side, and the texture would be placed onto both. Although this will save space on your texture map, I’d rather have a model that has unique texture on all sides.
Mapping the RF-9
That concludes the unwrapping of the grip and trigger! No doubt you’re freaking out about now due to all the steps required to unwrap such as small area. Most of the U-V mapping from here on out involves the same repetitive stuff, but you’ll get the hang of it in no time.
127
NOTE In case you’re having trouble, I’ve saved each of the steps as individual .rh3 files in the Chapter 5 Data section on the CD-ROM.
Step 2: Unwrap the Rear Hoop It’s time to unfold the top hoop at the back of the barrel. Because this is one of those goofy shapes that’s one solid piece, I’d like to keep the U-V map for it together. The problem is, because DeepUV doesn’t come with a torus-style unwrapping technique, you’ll need to split the hoop TIP into two parts, flatten the sections, and then Before you unwrap the rear hoop, re-attach them. Here’s how: remember to save your work. 1. Pan and zoom over to the rear hoop. 2. Use any one of the selection tools to select all points of the hoop (make sure the Back Faces option is checked), up to and including where the hoop meets the barrel. 3. Using the Rotate tool, rotate around the model, selecting/deselecting points until you’re satisfied. 4. Click Cut in the Tools section of the Command Panel, then drag the red clump away from the rest at the topleft corner of the texture map (see Figure 5.32).
Clicking File, Save, doesn’t do the trick if the program bails for any reason; instead, click File, Save As, and overwrite your previous .rh3 file. Make sure you save it to this format so all information is retained!
NOTE Even though it’s most efficient to have both 3D Studio Max and DeepUV open at the same time, both of these programs are memory hogs. If you’re running low on space, try shutting down all other programs. Otherwise, you can always manually fetch the updated U-V coordinates later, but only if you’ve saved your .rh3 file!
128
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.32 Select all points of the rear hoop, click Cut, and drag the cluster to the center of the texture map.
Cut hoop from group
5. There are two ways to map this selection: Interactive: Planar and Automatic: Planar 2. For the sake of expediency, let’s use the Automatic: Planar 2 method. To do so, click Planar 2 in the Automatic section. You should end up with a side view of the selection, as in Figure 5.33.
NOTE When you map interactively, you perform the operation manually.The great thing about interactive mapping is that you can manually specify the way DeepUV uses the selected technique when viewing the U-Vs.The Interactive mapping options, like their Automatic counterparts, are located in the Command Panel, but may be collapsed; just click the + sign in the section’s top-left corner to view them.
6. Select only one half of the hoop, and cut it away from the other half. To do so, start by rightclicking on the RF-9 in the 3D viewport, and selecting View, Right (or whatever view will produce a perpendicular view to the hoop). 7. Pan and zoom over to the hoop.
8. Click the Rectangular Selection tool, and uncheck the Back Faces option at the very top of the screen. This enables you to grab only those points that are visible in the viewport. 9. Drag a rectangle around the entire hoop, thereby selecting one half of the hoop (see Figure 5.34).
Mapping the RF-9
129
Figure 5.33 Select Automatic: Planar 2 to start mapping the hoop.
The Planar 2 button
Figure 5.34 View the RF-9 from the right and use the Rectangular Selection tool with Back Faces unchecked to select one half of the hoop’s points.
Uncheck Deselect
10. In selecting the hoop, you may have grabbed points on the barrel, which will show up as a tiny red dot in the tiny blue cluster in the top-left portion of the texture map. To deselect them, hold down the Alt key and apply any of the selection tools to that area. 11. Notice that the hoop in the texture map is now red and blue, indicating that half of the points have been selected. Click Cut in the Command Panel to separate them from the other side of the hoop. 12. Using the Move tool, drag one half away from the other (see Figure 5.35).
130
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.35 Deselect any bogus points, excise half of the hoop from the other half, and move it away.
Cut half and move
13. The two halves of the hoop are the U-Vs as viewed by DeepUV straight on from the right, in a planar fashion, but they are not relaxed—that is, the halves are not taking on their natural volumetric form as they would in 3D space. To see what I mean, with all points of only one half selected, click Relax in the Tools section of the Command Panel. In a few seconds you’ll see DeepUV gently relax the points so they even out.
NOTE Relaxing the points at this time is not required; I just wanted you to see the Relax feature in action. Relaxing is a way to get your U-V mapped portions to rest naturally on the texture map.That way, when it comes time to actually texture, the bitmap won’t distort or smear when applied to the model.
14. Repeat step 13 for the other half (see Figure 5.36). 15. Next, join the two halves to create a single, 2D map representing the hoop. To begin, with the top half selected, choose Edit, Transform, Flip Horizontal. This flips the back portion of the hoop, so it faces toward you. 16. Position both halves as I have in Figure 5.37. You want to join the outer edges of both halves, because these represent the top of the hoop. 17. Use the Lasso tool to select the points at the joined edges of both halves.
Mapping the RF-9
Figure 5.36 Choose Relax for each half so the points spread themselves proportionately.
Figure 5.37 Select the outer points of each half.These points represent the top of the hoop.
18. Here’s the cool part: With the edge points selected, click Join in the Tools section. Because the selected points actually neighbor/belong to each other, DeepUV will allow them to re-join each other, just as they were joined before you cut the one half away from the other. Figure 5.38 shows the halves joined as one.
131
132
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.38 Click Join in the Tools section to join the two halves together.
The Join button
19. Select the entire hoop in the texture map area, and once again click Relax. This will relax all the points naturally, and you should end up with a nicely unfolded hoop as shown in Figure 5.39. 20. That’s it for the hoop; scale it down and move it aside. (Just try to keep track of where things are so you know what’s what when you arrange your texture map at the end!)
Figure 5.39 Select all of the hoop’s points and click Relax.
The Relax button
Mapping the RF-9
Seams Now is a good time to quickly explain seams.When you paint the textures on your completed texture map, the U-Vs as laid out will correspond to locations on your 3D model. In the previous example, the hoop’s halves were joined at the top halves, and not the bottom halves.That way, when DeepUV relaxed them and the whole thing became flat, the outer edges represented the seam, underneath the hoop.You could just as well have joined the halves together using the bottom points, but that would leave a noticeable seam at the top half. It’s better, if you have the option, to re-join halves in a way that puts the seam in a location that’s difficult to see, if not totally invisible, to the players in the video game.
Step 3: Unwrap the Barrel The barrel is the long shaft that connects the front muzzle to the grip and back hoop. Normally, for a shape like this, you could use Interactive: Cylinder mapping to quickly unwrap the thing, but I’d rather isolate and unfold the back and bottom first, because they will get separate texture detail, TIP before unfolding the rest of the barrel. 1. Select the Rectangular Selection tool, and check the Back Faces option to select it so you can see all points of the barrel.
Remember, before you unwrap the barrel, save your work by clicking File, Save As, and overwriting your previous .rh3 file.
2. In the 3D window, switch to a side view of the RF-9 so you can see it perpendicularly. 3. Create a rectangular selection around the entire barrel. 4. Chances are, your selection includes points from the grip and rear hoop (and muzzle, but hold off on that a second). Deselect them by dragging around them while holding down the Alt key, as I have done in Figure 5.40.
133
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
AM FL Y
Figure 5.40 Select all points of the barrel in the Front view, and then deselect the points in the grip and trigger group.
Deselect these
TE
134
5. Zoom into the model and deselect any other bogus points that are part of the muzzle (remember, press and hold the Alt key as you click to deselect, or press and hold the Shift key as you click to add to your selection). Be sure to rotate the model around and zoom in close so you don’t miss anything. 6. When you’re satisfied with your barrel’s selection, click Cut to separate it from the rest of the weapon. 7. Use the Move tool to drag the red clump that represents the barrel’s U-V coordinates away from the small blue dot at the top-left of the texture map. 8. In the Right view, zoom in on the back of the barrel. 9. Using the Rectangular Selection tool, select the back end of the barrel. 10. Deselect any points of the grip or top hoop that you may have inadvertently selected. 11. When satisfied with your back selection, click Cut (see Figure 5.41). 12. The back end can be planarly mapped, but the Automatic: Planar 1 and Planar 2 options won’t know to project the planar mapping toward the rear of the gun. For this reason, you’ll need to map the back end interactively. To begin, expand the Interactive section and click the Plane button.
Team-Fly®
Mapping the RF-9
135
Figure 5.41 Cut the barrel selection away from the rest of the gun; select the back end and cut it away too.
Cut and move barrel group
13. You’ll see three gizmos float along the X, Y, and Z, axes of the gun; these allow you to manually rotate the projection to your liking. Because the rear face of the gun is along the Z axis, however, all you need to do is tell it to look along that axis. To do so, click the Selection button under Centering in the Command Panel. 14. Pull down the Align axis drop-down list and select +Z (see Figure 5.42). You should end up with a nice planar mapping of the back end along the positive Z axis. 15. Relax, scale, and move the newly unfolded rear face away from the texture map.
NOTE If your model’s axial orientation is different from mine, you may need to align your mapping techniques along axes other than those I’ve specified. For this reason, if I tell you to align the axis on a particular coordinate, such as −X, you may need to experiment with other axes, such as +Z, to get the same results.
16. The rest of the barrel is now essentially a hollow tube with no end caps—or, more precisely, a cylinder. To map it, click the Cylinder button in the Interactive section of the Command Panel.
136
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.42 Apply Interactive: Plane mapping along the positive Z axis to the rear face of the RF-9.
The Plane button The Selection button
17. Click the Selection button under Centering to tell DeepUV to center its analysis on the selection. 18. Pull down the Align axis drop-down list and select +Z to tell DeepUV to perform the cylindrical projection along the positive Z axis. You should end up with a nicely unwrapped barrel, as in Figure 5.43. 19. The barrel has unwrapped itself wonderfully. Thinking ahead, however, I’d like to texture this weapon such that both sides of the barrel are attached to
Figure 5.43 Apply Interactive: Cylinder mapping along the positive Z axis to the rest of the barrel.
The Cylinder button
Mapping the RF-9
either side of its top, leaving the bottom portion dangling off to one side. You can accomplish this by clicking and dragging the Y axis’s control handle (the green dot with two arrows encircling it in the 3D model) to rotate the projection along the Z axis. As you’re dragging, look to the left of the screen at the unwrapped barrel; you should see the map slowly shift. Stop when the bottom portion of the gun is all the way to one side (see Figure 5.44). 20. Scale and move your unwrapped barrel away from the texture map.
137
NOTE The Y-axis control rotates itself perpendicularly to the Z axis, which is why you’re rotating that one instead of the other two. If you were to rotate the Z-axis control, all hell would break loose and your mapping would be ruined.
TIP If you’re scaling this stuff using the Free Transform method, make sure to hold down Ctrl during the scaling.That way it will scale proportionally without distorting the mapping.
Figure 5.44 Rotate the Y-axis gizmo so that the bottom face of the barrel is positioned on the outside of the barrel’s U-V map.
Click and drag to reorient the seams
138
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Step 4: Unwrap the Front Hoop and Hose The front hoop and hose are just two bent cylinders, like the rear hoop; you can isolate and unfold them in the same manner. (I’ll walk you through this one quickly since you already know how to do it.) 1. Create a rectangular selection around the top hoop (be sure the Back Faces option is checked). 2. Deselect any bogus points not belonging to the hoop. 3. Choose the Cut button in the Command Panel’s Tools section.
TIP Before you unwrap the front hoop and hose, save your work by clicking File, Save As, and overwriting your previous .rh3 file.
4. Move the red dot away from the group at the upper-left of the texture map. 5. You’ll need a planar view of the hoop from the side; I clicked the Planar 2 button in the Automatic section of the Command Panel (see Figure 5.45). 6. There will be shared points that bridge both ends of the hoop; these belong to the top of the muzzle. Carefully select the points on both ends and cut them away. 7. Move the excised points to the top-left portion of the map so you can reassign them with the rest of the muzzle in the next section (see Figure 5.46).
Figure 5.45 Select the top hoop, cut it away, and choose Automatic: Planar 2 as a mapping technique.
Mapping the RF-9
Figure 5.46 Select and cut away the bogus points belonging to the top of the muzzle.
8. Click the Rectangular Selection tool. 9. Uncheck the Back Faces. 10. Select half of the hoop in a perpendicular 3D view, just as you did with the back hoop. 11. Cut the hoop in half, moving one half of it away from the other. 12. Relax both halves of the hoop (see Figure 5.47).
Figure 5.47 Select half of the hoop in a perpendicular 3D view, cut it away, and relax it. Relax the other side as well.
139
140
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.48 Select the edge points of each side, join them, and then relax the entire structure.
13. Click Edit, Transform, Flip Vertically to flip one side of the hoop upside down so you can get the edges to meet. 14. Using the Lasso tool, select the edge points of both sides, and click Join. 15. Select the entire hoop and click Relax (see Figure 5.48). 16. Repeat the steps in this section to unwrap the hose.
Step 5: Unwrap the Muzzle The remaining, unmapped points all clumped together at the top-left of the texture map represent the muzzle. This is the most difficult portion of the RF-9 to unwrap, because it’s awkwardly shaped and has an inner area representing the plasma TIP chamber. After you’ve removed and mapped the front portion, however, the Before you unwrap the front hoop and hose, save your work by remaining part of the muzzle is somewhat clicking File, Save As, and overcylindrical, which dictates what type of mapwriting your previous .rh3 file. ping technique you’ll use. 1. Select the clump that represents the muzzle, along with those stray points from the top of the muzzle. 2. Move the selection to the center of the texture map and click Join. This will re-join all those stray points of the muzzle. 3. Click the Plane button in the Interactive section of the Command Panel. 4. Click Selection to center the mapping on the selection. 5. Pull down the Align axis drop-down list and select −X to have the projection aim at the muzzle from the side, or X axis. (I selected −X instead of +X to flip the muzzle upside down, as shown in Figure 5.49.)
Mapping the RF-9
141
Figure 5.49 Select the remaining, unmapped points of the muzzle and apply Interactive: Plane mapping along the X axis.
6. Before you unwrap the muzzle like a cylinder, let’s remove the front face so it can be textured separately. Zoom in on the front points, select them, and click Cut. 7. Apply Automatic: Planar 1 mapping to the excised points. You should end up with the front face of the muzzle. 8. Click Relax to put the muzzle’s face in its natural form, scale it, and move it away from the map (see Figure 5.50). 9. The cone inside of the muzzle is next. Zoom in close to the single point that makes the tip of the cone and select it. 10. The point fades from red to blue as it shoots out toward the end of the muzzle; this gives you a good indication as to what points to select at the front. 11. With the inner cone’s points selected, click the Cut button. 12. Apply an Automatic: Planar–style mapping to the inner cone (see Figure 5.51). It won’t be necessary to relax this cone section, since it represents the inside of the weapon and will get textured mostly with black color anyway. 13. Select the rest of the muzzle.
142
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.50 Select the front points of the muzzle and cut them away. Then, choose Automatic: Planar 1 to map the front face flat.
Figure 5.51 Select and cut away the inner cone of the muzzle, and apply an Automatic: Planar mapping to it.
14. Click the Cylinder button in the Interactive section of the Command Panel, and center the mapping on the selection.
Mapping the RF-9
143
15. I’d like to use the seam instead of hiding it this time, so let’s put it on top (that is, the outer edges of the mapping should represent the top of the gun). To make the top of the muzzle visible, pull down the Align axis dropdown list and select −Z (because you’re looking at the z-axis underneath). 16. You may need to roll the cylindrical mapping over so that the bottom of the muzzle is in the center of the flattened map. To do so, click and drag one of the gizmos that’s aligned with the long axis of the barrel (mine’s the green Yaxis gizmo) in the 3D view. You should end up with a map that looks like the one in Figure 5.52. 17. That’s it! Now, just relax the muzzle selection and move it out of the way.
Step 6: Pack the Map
TIP Of course, you should save your
Now it’s time to arrange all of the unfolded work by clicking File, Save As, pieces of the RF-9 into the gray square (this and overwriting your previous square, remember, represents the actual tex.rh3 file before you pack the ture map you’ll be painting later on). The map into the texture-map area! tough part is getting everything to fit within the area! You can do this one of two ways: either let DeepUV automatically pack them in for you (which I don’t recommend, because it might not arrange things to your liking) or do it yourself. Figure 5.52 Map the rest of the muzzle with Interactive: Cylinder mapping. Align the projection so that the seam is on the top of the gun.
The Cylinder button Drag to rotate seam
144
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
For the sake of example, click the Pack All button in the Command Panel to instruct DeepUV to pack the model automatically. Notice in Figure 5.53 how DeepUV crammed everything together into the map? Of course, you have some say in how DeepUV packs your model—namely, those settings found in the Type and Options sections. For instance, choosing Rectangle- or Organic-style packing instructs the program to take more time arranging the pieces to fit better (but it’s much slower). Even so, at the end of the day, I’d rather just do it all myself!
AM FL Y
By arranging and scaling the pieces manually, you can determine how you’ll paint the texture on the various pieces, as well as decide which pieces will get the most texturing detail. (To apply more detail to a particular piece, just scale it up in the texture map to provide more area on which to paint.) In the RF-9’s case, most of the detail will reside on the barrel and muzzle, so those two pieces can take up most of the map.
TE
To arrange the pieces manually, simply select each item that you unwrapped, scale and rotate it if necessary, and place it on the map to your liking. You don’t have to fill every little gap; in fact, having some space will make it easier when texturing. (Figure 5.54 shows how I packed my map; if you want to see how it looks in DeepUV, just open the step6.rh3 file on the CD-ROM.) Take your time with this step, because the way you pack your map will determine how you texture your model. Figure 5.53 DeepUV packs all the RF-9’s components into the texture map.
The Pack All button The Options section
Team-Fly®
Mapping the RF-9
145
Figure 5.54 Packing the RF-9 my way.
Take one last moment here to note the way I arranged the weapon’s grip and trigger. You could still keep just the sides and back of the grip neatly arranged as you did earlier in this chapter, but I decided to put in a little more effort and join the remaining pieces to the grip’s edges. This way, the grip itself is now unfolded as one entire piece, which will help to provide some extra detail when texturing.
Step 7: Update the U-Vs It’s time to update the model! You can do this one of two ways. If you’ve kept 3D Studio Max open from the beginning, and nothing went awry, you can simply click File, Export, Send UV Update. This will update the U-V mapping for the RF-9 model in Max by adding a DeepUV modifier onto the stack. Switch back over to Max to see that in action. If, however, you had to close and reopen Max during the mapping process, you’ll need to fetch the map manually. Here’s how: 1. Start 3D Studio Max and load the RF-9 file. (If you don’t have it, there’s an RF9.max file on the CD-ROM.) 2. In the Utilities panel, choose Right Hemisphere from the list. 3. Click on the Import UV’s button; as shown in Figure 5.55, a second DeepUV modifier is added to the Modifier stack, containing the updated U-Vs. (Click on the Modifier section to see this.)
146
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
Figure 5.55 Importing the U-Vs from DeepUV and adding them to the modifier stack.
The Import UV’s button The Modifier tab
Time Count Once you’ve established your skills with unwrapping and manipulating U-V coordinates, you should keep track of how long it takes you to complete this task for a particular model. As an example, the first time I unwrapped the RF-9, which included several instances of backtracking because I found one or two better techniques as I worked, I spent a total of one hour from the time I sent the model’s coordinates over to DeepUV to the time I finished organizing the texture map.The map-packing portion of it took the longest because I wanted it to be neat and well organized (for the most part). Once you get into this stuff, you’ll find a regular pace; then, when it comes time to handle your workload at a game-development company, you can properly budget your time.
Summary
147
4. Save the Max scene file. You can always bounce back to DeepUV by clicking Map Selection in the Utilities tab. Do make sure, however, that your U-Vs were, in fact, updated properly in Max by adding an Unwrap UVW modifier to the stack, and clicking Edit in that modifier’s parameter section below (see Figure 5.56). You should see an identical map to that in DeepUV.
NOTE I’ve saved my updated model as RF9_mapped.max on the CD-ROM for your convenience.
Figure 5.56 Adding an Unwrap UVW modifier to view the freshly updated U-Vs. Add an Unwrap UVW modifier to the stack Click Edit
Summary U-V mapping is an essential part of preparing your 3D models for texturing. U-V coordinates are invisible points that correspond 1:1 with the actual vertices of a 3D model, and programs like DeepUV allow you to isolate portions of the U-V points and unfold them nicely on a texture map. There are many different ways these pieces can be manipulated, and DeepUV offers a suite of projection techniques that aid you in this process.
148
5.
U-V Mapping the RF-9 Plasma Gun with DeepUV
The next step in creating your model is to texture it based on the new U-V map. You can texture one of several ways. The poor man’s way is to take a screen shot of the UVW map in 3D Studio Max and paint over it in a program like Photoshop. Alternatively, you can export the U-Vs to Deep Paint 3D and use that in conjunction with Photoshop to paint your map. To proceed with this technique, skip to Chapter 11, “Skinning the RF-9 Plasma Gun with Deep Paint 3D and Photoshop.”
CHAPTER 6
U-V Mapping the Slogre with DeepUV
6.
150
U-V Mapping the Slogre with DeepUV
N
ow that you’ve finished creating your slogre model (that is, half of it), it’s time for the next logical step in game object creation, as shown in Figure 6.1. In this chapter, you’ll learn how to manipulate the U-V coordinates of your mesh object in preparation for texturing. The difference between this chapter and the previous one (“U-V Mapping the RF-9 Plasma Gun”) is that you need to unify and optimize your character model in 3D Studio Max before pushing it over to DeepUV. In this chapter, you will ■ ■ ■
Use 3D Studio Max to complete the slogre model. Use Max to fix, optimize, and smooth the model’s mesh. Import and efficiently texture map the U-V component of the slogre model using DeepUV.
Figure 6.1 The next phase in the sequence of 3D game object creation.
Completing the Slogre Model in 3D Studio Max 5
151
Completing the Slogre Model in 3D Studio Max 5 The first thing you need to do before unwrapping the U-Vs of your slogre character is to, well, have a complete mesh. If you recall, you created precisely 50 percent of the character model in Chapter 4, “Modeling the Slogre Character with trueSpace 6.” To complete your mesh, fire up 3D Studio Max (the demo of which is on the NOTE CD-ROM) and choose File, Import. The 3D Studio Max demo on the Choose the Stereolitho (*.STL) file type CD-ROM is version 5. However, and import the slogre.stl file you exported the tutorials in this book work from trueSpace (alternatively, use the slothe same in 3D Studio Max 4. gre.stl file in the Chapter 6 Data section on the CD-ROM). The first screen to pop up will be an Import STL File menu, shown in Figure 6.2. In this menu, select the Quick Weld option in the Weld Vertices section and click OK. Quick Weld fuses any vertices that are reasonably close to one another; you should end up with a screen that displays the slogre half, as shown in Figure 6.3.
Figure 6.2 The Import STL menu in 3D Studio Max (versions 4 and 5).
Quick Weld option
152
6.
U-V Mapping the Slogre with DeepUV
Figure 6.3 The Max interface containing the imported slogre half.
Optimize the Mesh When your slogre half is in Max, locate the Command Panel at the far right and click on the Modifier tab (if it isn’t selected already). This panel is called the Modifier Stack, and offers the best way to make changes to your mesh objects. Any operation you perform on your model gets stacked in this list, allowing you to peruse the model’s history and remove or add changes simply by deleting items from or adding items to the stack. Click the Modifier List down arrow, and select the Optimize modifier (see Figure 6.4) to instruct Max to examine your slogre half and remove any unnecessary vertices, edges, and/or faces. The results of this operation are displayed in the Last Optimize Status area at the bottom of the panel; the Before/After area indicates how many polygons appeared before the operation versus after it. In this example, the modifier has effectively reduced the polygon count from more than 2,100 faces to about 1,600, without removing any noticeable detail in the model.
Edit the Mesh The default settings for the Optimize modifier are quite satisfactory (you could play around with some of the settings to push the envelope on the optimization, but it’s not necessary). You’re targeting around 3,000 polygons for this character,
Completing the Slogre Model in 3D Studio Max 5
153
Figure 6.4 Once you import the slogre half, apply an Optimize modifier to cut out tons of unnecessary polygons from the mesh.
Results of optimization operation
and so far you’re pretty much on par. Your next step is to edit the mesh a bit further, because the Optimize modifier is slightly indiscriminate when it comes to deciding how to perform the optimization. For instance, your model might contain extraneous vertices—particularly along the seams where the arm or leg meet the body—that could be welded together. In order to manipulate the vertices directly, however, you need to convert the mesh back to its editable mode. The only problem is, the Optimize modifier is sitting on top of the Editable Mesh modifier (which is the default), and if you return to that modifier, you’ll lose the optimization. Instead, make the mesh editable by adding an Edit Mesh modifier (located in the same list as the Optimize modifier) to the stack. Once on the Edit Mesh modifier is in the stack, expand it and select Vertex from its list (see Figure 6.5). With the Edit Mesh modifier in place on top of the Optimize modifier, you can now edit the already optimized mesh. Using the Pan, Arc Rotate, and Zoom tools in the bottom-right portion of the screen, zoom in close to areas where the appendages meet the body of the slogre and check for vertices that are simply not needed. When you spot a cluster that should just be combined as one vertex, rightclick to exit pan/rotate/zoom mode, and then Ctrl+click each vertex in the cluster to select it. Then, in the Edit Mesh modifier’s panel, click the Weld: Selected button (see Figure 6.6).
6.
U-V Mapping the Slogre with DeepUV
AM FL Y
Figure 6.5 Apply an Edit Mesh modifier to the stack so you can edit the vertices of the mesh.
TE
154
Figure 6.6 Zoom into the mesh at the seams and weld clumps of unnecessary vertices.
Weld unnecessary vertices at body joints
TIP Don’t go nuts welding vertices all over the place.Take your time, and be sure that what you’re welding is two or three vertices that simply don’t add any noticeable detail to the model.You can jump back and forth between wireframe and smooth-render mode by pressing F3; that way, you can see if your weld negatively affected the area.
Team-Fly®
Completing the Slogre Model in 3D Studio Max 5
155
NOTE The joint between the leg/arm and the body needs to have a nice, even number of vertices around the entire seam, so when you deform the mesh during animations the seams won’t crease bizarrely.Think of it this way: If the shirt you’re wearing only had a few rigid stitches around the seam where the sleeve met the body part, what would happen when you flexed your arm? The portions not stitched would bulge awkwardly away from the rest of the shirt and expose your skin underneath.
Clone and Attach Once you’re finished combing through the model half and welding vertices, it’s time to make your big guy feel complete. First, however, save your work. Then, compile your changes, including the optimization, by right-clicking the top-most item on the stack and choosing Collapse All from the menu that appears. You might get a warning; just click OK. The stack should now be reset to its default, but will retain all the results of your work. Next, with the mesh selected, make a mirrored copy of it by choosing Tools, Mirror, and, in the Mirror Options dialog box, select Copy and click OK. A mirrored copy will be placed in your scene; use the Move, Rotate, and Scale tools (located at the top of the screen) to move it so its seam lines up with the other half (see Figure 6.7)— use the Zoom tool to align them as tightly as you can.
TIP When you move the item in any orthogonal view, make sure you select the axis on which you’d like to move it so it stays in the same line as the other half.The axis gizmo will light up when you place your cursor over it.
Now it’s time to attach the two mesh pieces so they become one single mesh. Notice that the only item in the list in the Modifier panel is Editable Mesh; below it is an Attach button. Click it, and then click the other, non-selected half to weld them together. Once they are attached, apply an STL Check modifier to the list (this option is located in the same Mesh Editing section as the modifiers you’ve already used) and click the Check option at the bottom of the STL Check modifier’s panel to execute the operation. This will check the mesh for errors, which is
156
6.
U-V Mapping the Slogre with DeepUV
Figure 6.7 Use the Mirror tool to create a mirrored clone of the other half, and move it directly next to its twin.
an absolute necessity! If your mesh has holes, open edges, and the like, there’s a 99.9-percent chance it won’t work properly in any game engine. Due to the complexity of the welding process, you’ll almost certainly end up with a bunch of errors (errors are indicated by red areas, as shown in Figure 6.8). No big deal; you’ll fix that in a flash with another modifier.
Figure 6.8 Attach both sections of the slogre together, and then apply an STL Check modifier to check for errors.
Completing the Slogre Model in 3D Studio Max 5
157
Figure 6.9 Apply a Cap Holes modifier to fix residual errors in the mesh that resulted from the Attach operation.
Status of the mesh
To fix errors resulting from the attach operation, apply a Cap Holes modifier to the stack. To see if this fixed the errors, apply yet another STL Check modifier on top of the Cap Holes modifier, and re-run the check. Figure 6.9 shows my fixed mesh. If you still have errors, you might need to zoom into the red problem errors and manually weld coincident vertices, or possibly apply another Optimize modifier. The attach operation will most definitely have generated another handful of unnecessary vertices along the center seam of the mesh; just take a few minutes to go along them and weld vertices.
Add Some Tusks The original slogre sketches included some versions of the slogre character without tusks and some with. I really liked them, but decided not to include them until this point. If you wish, import the tusk.stl file located in the Chapter 6 Data section on the CD-ROM, or create your own. In Figure 6.10, I aligned the tusks to the front area of the slogre mesh and attached them. I think this model looks great with them. (Ever see the movie Relic? Your slogre character looks somewhat like the hideous monster in that movie with these menacing things sticking out of its face.)
158
6.
U-V Mapping the Slogre with DeepUV
Figure 6.10 If desired, attach tusks to the character to highlight its ferocity.
Smooth Out the Bumps To complete the mesh portion of your model, apply a Smooth modifier to tone down the harsh angles inherent with the way the faces of the model neighbor each other, particularly along the point-edited arm. With the Smooth modifier in place, a Smoothing Groups cluster will be presented in that modifier’s panel. Just click button #1 in the cluster to see its beautiful results (see Figure 6.11).
Figure 6.11 Apply a Smooth modifier to finalize and beautify the slogre mesh.
Completing the Slogre Model in 3D Studio Max 5
159
Export to DeepUV! With your slogre mesh looking awesome, you can now U-V map the model. First, fire up DeepUV, the demo of which is on the CD-ROM. Make sure this program is properly installed, along with the 3D Studio Max plug-ins that come with it. Then click on the Utilities tab in the Command Panel, and click the Map Selection button under the Right Hemisphere utility (see Figure 6.12). Note that you must have DeepUV started in order for 3D Studio to send the mapping information over to it. Once the model is successfully imported into DeepUV, you should see the slogre floating comfortably in the right of the scene, with the fresh new blank Material map on the left. The small blue cluster at the top-left of the Material map contains all the unmapped U-V points that you need to sift through (see Figure 6.13).
NOTE
Figure 6.12 Start DeepUV and click on the Map Selection button in the Right Hemisphere utility.
The Right Hemisphere utility The Map Selection button
If you’re new to U-V mapping, please read the beginning of Chapter 5, “U-V Mapping the RF-9 Plasma Gun with DeepUV,” where I explain the essentials of mapping with DeepUV.
160
6.
U-V Mapping the Slogre with DeepUV
Figure 6.13 The slogre U-Vs imported into DeepUV.
Unmapped U-V particles
Unwrap the Slogre's U-Vs Now it's time to create the U-V texture map. I'll break this process down by focusing on one body part at a time, and since the slogre is symmetrical, all you have to do is repeat the process for the other side of him. Then it's just a matter of stacking the identical U-Ved sections on top of one another to make the texturing job in Chapter 12 much easier.
Step 1: Unwrap the Legs Let’s start by getting the feet and legs unfolded and stashed away. The entire model can be symmetrically stacked for texturing—that is, you can unwrap both sides of the model, and place each unfolded part on top of the other so in Chapter 12, “Skinning the Slogre with Deep Paint 3D and Photoshop,” you only have to texture half of the model. 1. Zoom in to one of the legs of the slogre and click on the Lasso tool. 2. At the top of the screen, activate the Back Faces button so your selection will include points on the other side of the model as well. 3. Draw a selection completely around the leg (see Figure 6.14).
Unwrap the Slogre’s U-V’s
Figure 6.14 Use the Lasso tool with the Back Faces option checked to select a leg of the slogre.
Figure 6.15 Deselect points that don’t belong to the leg. Deselect points from body
4. Zoom in very close to where the leg meets the body and, again using the Lasso tool, press and hold down the Alt key as you circle points that aren’t part of the leg to subtract them from the selection. As shown in Figure 6.15, the red areas are selected, while the blue are deselected. (Note that a selected point causes the edge between itself and a deselected point to fade from red to blue).
161
162
6.
U-V Mapping the Slogre with DeepUV
5. With the entire leg selected, choose Cut in the Command Panel to cut those points away from the rest of the group. 6. Use the Move tool to move the red cluster away from the general group of points (see Figure 6.16). 7. Repeat steps 1–6 for the other leg. 8. Before you attempt to unfold the newly isolated legs, let’s cut and unfold the bottom of the feet. (That way, the legs can be unfolded purely with cylinderstyle mapping.) Zoom in close to one of the feet and create a lasso selection along the end as I have in Figure 6.17.
TIP Remember that anything you do to the texture points in this program does not physically affect the actual vertices of the mesh model itself. You’re only messing with the model’s texture coordinates, which, before unwrapping, represent a 1:1 correspondence with the mesh’s vertices.
9. If your selection of the bottom of the foot included points on the foot itself, deselect them.
Figure 6.16 Cut and move the leg points away from the group. Repeat for the other leg. Cut and drag
The Cut button Left leg
Right leg
Unwrap the Slogre’s U-V’s
Figure 6.17 Create a lasso selection around the bottom of one foot.
10. Click Cut to cut the points of the bottom of the foot away from the rest of the leg, and click the Planar 1 mapping button in the Command panel to unfold it as in Figure 6.18. 11. Click the Relax button so the coordinates settle naturally and prevent texture streaking.
NOTE The Planar 1 and 2 mapping buttons offer two simple orthogonal mapping techniques that you’ll use occasionally. If one doesn’t do the trick, try the other.
Figure 6.18 Cut the bottom of the foot away and choose Planar 1 mapping to unfold it. Relax the points when finished.
The Planar 1 button
163
6.
U-V Mapping the Slogre with DeepUV
12. Repeat steps 8–11 for the bottom of the other foot, and then position one piece on top of the other as shown in Figure 6.19 (you’ll have to click Edit, Transform, Flip Vertical to get both pieces to match). 13. When the pieces are aligned, choose Edit, Transform, Scale, and scale the group down so it isn’t so big, and then move it out of the way.
AM FL Y
14. Now for the feet. I’d like to unwrap the feet separately since they’re awkwardly shaped and won’t unwrap nicely along with the rest of the leg. Notice, however, that there’s a long, unbroken face that runs from the foot to the leg. I like that detail, but it will make it difficult to select the foot evenly (see Figure 6.20). Here’s where the advantage to working between 3D Studio and DeepUV comes into play; let’s go back to Max and create an edge that breaks this face in half. First, choose File, Export, Send UV Update to send your changes to the U-V coordinates back to Max (assuming you’ve kept Max and the slogre model open during this entire procedure). 15. When the update is complete, switch to 3D Studio Max and expand the Editable Mesh item in the Modifier stack. Select Edge and, in the stack’s panel, click on the Cut button.
TE
164
16. Click on the middle of the obnoxious edge and drag to a nearby perpendicular vertex. Right-click to close the edge. 17. Repeat step 16 for the other side of the edge. While you’re at it, break the faces below this edge to make them nice and continuous (see Figure 6.21). 18. Repeat steps 16 and 17 for the other foot.
Figure 6.19 Repeat steps 8–11 for the other foot, and flip/align the two.
Team-Fly®
Unwrap the Slogre’s U-V’s
165
Figure 6.20 Before attempting to cut the feet away, fix the geometry problem obvious here.
Problem area
Figure 6.21 Go back to 3D Studio Max and create a few new edges to break the problem faces in half. Cut edge in half Cut across these faces, too
19. When you’re finished creating the new edges, go to the Utilities tab and click Map Selection. (Remember, you’ve altered the mesh by adding new edges and vertices, and therefore have changed the U-V map slightly—the U-V points correspond to the physical locations of the model’s vertices.) 20. The newly fixed map should now appear in DeepUV; zoom in and lasso the foot (see Figure 6.22).
166
6.
U-V Mapping the Slogre with DeepUV
Figure 6.22 With each foot’s geometry fixed, lasso a selection around one.
21. After you’ve selected a foot, cut it away and apply Planar 1 mapping. When finished, relax this area. 22. Repeat steps 20 and 21 for the other foot. 23. Align both maps and set them aside (see Figure 6.23).
Figure 6.23 Cut the foot away and apply a Planar 1 mapping. Planar 1 mapping
Relax
Unwrap the Slogre’s U-V’s
167
CAUTION If at any point you try to relax your cut selection and something out of the ordinary happens (for instance, the selection suddenly becomes enormous, or DeepUV crashes), then something is wrong with the mesh of the object itself.The only thing you can do is return to 3D Studio Max and fix the problem. Usually, the problem is something as simple as an open face, an isolated vertex that’s attached to nothing, and so on. Just zoom close to the mesh and you’ll usually see the problem.
24. Now for the legs. Select one of the two small clumps that represent the legs in the middle of the Material map. 25. Click the Interactive: Cylinder button. 26. Click the Centering: Selection button to center the mapping gizmos on the center of the leg. 27. Because the leg is off at an angle, you’ll have to interactively align the projection along the long axis of the leg as I have done in Figure 6.24. Do so by clicking and dragging any of the x-, y-, or z-axis gizmos to rotate them. Also, look to the left at the unfolded map of the leg—you want to make sure that the map is unfolded in a way that makes the seam (that is, the edges of the texture map) align itself with the inside of the leg. That way, when you apply your texture to the model, the seams are placed in the most unnoticeable location. See Table 6-1 for a quick guide on mapping techniques and where to align seams for most character models. 28. When you’re satisfied with your leg’s mapping, click the Relax button. Notice that the U-V map relaxes weirdly, away from the nice and rectangular shape it once had. That’s because the relaxed shape now appears natural, as if you took a pair of scissors and cut the mesh down the seam, like a pants leg, and laid it out on a table. This is exactly what you’re trying to achieve here, so when you texture the map, none of your work will smear or distort. 29. Repeat step 28 for the other leg, and align the maps of both legs and move them out of the way (see Figure 6.25).
168
6.
U-V Mapping the Slogre with DeepUV
Figure 6.24 Use Interactive: Cylinder mapping for the legs. Make sure the seams are aligned with the inside.
Outer edges of map represent seam inside of leg
Rotate gizmos to align to leg, then align to seam
Table 6.1 Seam-Alignment Suggestions Mesh Portion
Mapping Technique
Seam Location
Head (normal)
Spherical
Top/back
Head (oblong)
Planar/Cylindrical
Top
Face
Planar
n/a
Body
Planar/Cylindrical
Sides
Tail
Cylindrical
Bottom
Arms/Legs
Cylindrical
Inside, facing body
Feet
Planar/Cylindrical
Inside, facing body
Bottom of feet
Planar
n/a
Unwrap the Slogre’s U-V’s
169
Figure 6.25 Relax the leg’s mapping and repeat for the other leg.When finished, align both maps and move them out of the way.
Both leg components, completed and overlapped
This concludes the mapping of the legs. Normally, I’d just say “Repeat for the arms.” Your character’s arms, however, are quite different from those of other characters, so you’ll need to handle them a bit differently. Before you continue, though, choose File, Export, Send UV Update to transfer your work back to 3D Studio Max. It’s also a good idea to switch back over to Max and save your file so you won’t lose your work.
Step 2: Unwrap the Arms The most complex part of the slogre’s arms are its fingers. There’s a lot going on there, what with the long fingernails and all. But because there won’t be a whole lot of texture detail on them, you’ll just stack ‘em and skip ‘em. After all, nobody will notice the itsy bitsy finger detail in a video game, so why bother? 1. Right-click on the 3D view of the slogre and select View, Front. 2. Zoom in close to one of the slogre’s hands and use the Rectangle selection tool to select it (see Figure 6.26). 3. Make sure the Back Faces option is checked so you get all the points, and then cut the hand away. 4. Apply Planar 2 mapping to the newly cut hand (see Figure 6.27).
170
6.
U-V Mapping the Slogre with DeepUV
Figure 6.26 Select and cut away one of the hands in the Front view.
Figure 6.27 Apply Planar 2 mapping to the hand.
5. The top and bottom of the hand itself are what you’re interested in here, so you’ll need to isolate them. In a Top view of the model, select and cut away the thumb (see Figure 6.28). With the thumb away, you’ll have an easier time tackling the rest of the hand. 6. Switch to a Back view of the model and zoom in close to the back side of the hand (where the nails face you).
Unwrap the Slogre’s U-V’s
Figure 6.28 Cut the thumb away in the Top view.
7. Uncheck the Back Faces option, and create another rectangular selection around the hand. Do this in the 3D view, and not in the Material view. That way, you’ll get all the points on the back of the hand and not on the front. 8. Deselect any points that were wrongfully selected in the thumb and arm (see Figure 6.29), and cut the selection away. 9. Once the back side of the hand is cut away, move it next to the other side of the hand so you can work on both (see Figure 6.30).
CAUTION Don’t relax the hands yet, or everything will get messed up.
Figure 6.29 In the Back view, select the points on the back of the hand.
Back Faces button
171
172
6.
U-V Mapping the Slogre with DeepUV
Figure 6.30 Move the front and back of the hands away from each other.
10. Use the Rectangle selection tool to select and cut the fingers away from each part of the hand (see Figure 6.31). After the fingers are away, select each part of the hand and relax it. 11. Notice that after you relax the top and bottom of the palm, a small piece sticks out of one that apparently belongs to the other. Select the piece, cut it away, and move it over to the other part of the palm like a jigsaw puzzle. Then, select the points that each piece shares, click the Join button, and reselect the hand and relax it, as shown in Figure 6.32. (This operation is exactly the same as the one I described in Chapter 5 when operating on the RF-9’s hoops.) Figure 6.31 Cut the fingers away from each part of the hand.
Unwrap the Slogre’s U-V’s
173
Figure 6.32 Relaxing the palms displays a piece of one palm that belongs to the other. Cut it away and rejoin it to its rightful owner.
12. Repeat steps 1–11 for the other hand. 13. Stack the top parts of the two palms together as one piece, and repeat for the bottom parts. That way, you can texture the top and bottom of the hand separately. (The fingers can all be stacked in one clump, to which you’ll apply subtle detail.) 14. Use the Rectangle selection tool to select the cuff on one arm—be sure to check off the Back Faces option at top. 15. Apply Interactive: Cylinder mapping, centering it on the selection, and align it along the x axis (see Figure 6.33). 16. Repeat steps 14 and 15 for the other cuff. 17. Relax the cuffs, and stack them on top of the other. 18. Select the arm in the same manner as you did the leg, and apply Interactive: Cylinder mapping to it. 19. Align the seam on the −y axis (see Figure 6.34).
NOTE To get a handle on the axial alignments, look at the xyz axes in the lower-left corner of the 3D Perspective screen, and note that the arm is pointing down the x axis. Note, too, that the y axis is up and down, so if you want the seam of the arm on the inside, you’d tell DeepUV to align the seam along the −y axis.
6.
U-V Mapping the Slogre with DeepUV
AM FL Y
Figure 6.33 After stacking the hand parts, unwrap the cuffs of the arm using Interactive: Cylinder mapping.
20. Relax the arm.
TE
174
21. Repeat steps 18–20 for the other arm. 22. Stack these two arm pieces on top of each other (one side will have to be flipped to match).
Figure 6.34 Unwrap the arms using Interactive: Cylinder mapping.
Team-Fly®
Unwrap the Slogre’s U-V’s
175
That completes the arms. Just move the components away for now, and at the end you’ll organize the map neatly. Before you continue, choose File, Export, Send UV Update to transfer your work back to 3D Studio Max. It would also be a good idea to switch back over to Max and save your file so you won’t lose your work. Now let’s move on to the head portion of the slogre, which represents the most detail of the model.
Step 3: Unwrap the Head and Body Normal human characters have fairly spherically shaped heads, and therefore an Interactive: Sphere mapping would suffice. However, ‘tis not this case for this lovely beast, which will require a combination of Interactive: Sphere mapping plus some cutting and stitching to get it just right. I also want to get more of the neck in there because, according to the sketches in earlier chapters, the underside has a very snake-like appearance. 1. In a Top view, lasso one of the tusks as shown in Figure 6.35 and cut it away. Be sure to deselect any points of the head that you may have accidentally grabbed; if you cut the wrong points, however, you can always re-join them with the rest of the head’s U-V mesh and try again.
Figure 6.35 Select a tusk in the Top view.
176
6.
U-V Mapping the Slogre with DeepUV
2. Once the tusk is cut away, apply Planar 2 mapping. Because the tusk won’t get much detail other than a cloudy, off-white texture, you don’t have to unwrap or relax it. 3. Repeat steps 1 and 2 the other tusk, stack them, and set them aside (see Figure 6.36). 4. The remaining cluster of points at the top-left of the Material map represents the entire head and body. Select that, and apply Planar 2 mapping (see Figure 6.37). This will give you a nice profile of the character with which to work. 5. Use the Lasso tool to select the forward portion of the head, which will require the most detail on your behalf. Zoom in to the neck region and select the points that spill downward from the head as well (see Figure 6.38); just be sure to uncheck the Back Faces option when doing this or you’ll grab points through the mesh. Once it is selected, cut and move the head away. 6. Apply Interactive: Sphere mapping to the head, again centering it on the selection. Align the mapping technique along the +z axis, and align the seam along the −y axis. (Don’t do this manually; use the alignment control panel in that mapping section!)
Figure 6.36 Apply Planar 2 mapping to the tusk. Repeat steps 1 and 2 for the other tusk, and stack them.
Unwrap the Slogre’s U-V’s
177
Figure 6.37 Select the remaining points on the Material map and apply a Planar 2 mapping.
Figure 6.38 Select the forward portion of the head and cut it away.
178
6.
U-V Mapping the Slogre with DeepUV
7. Relax the selection (see Figure 6.39). 8. The lower portion of the map has points that could be joined, so select them and click the Join button. Then, reselect the entire head and relax it again (see Figure 6.40). 9. The face in the center of the map may be a little scrunched, even after relaxing. This is due to the fact that there is a sharp transition between the face points and the rest of the head, and DeepUV is doing its best to relax it all proportionally. This is why I kept the top portion of my map unjoined, so DeepUV didn’t have to wrestle with it. Zoom into the face area and select it, and click the Relax button again to see it smooth out a bit (see Figure 6.41).
Figure 6.39 Apply an Interactive: Sphere mapping to the head and relax the selection.
Figure 6.40 Join the broken portion of the neck area and relax the head again.
Unwrap the Slogre’s U-V’s
179
Figure 6.41 Select the face portion of the map and relax it.
10. You’re finished with the head and face; move that map out of the way for now. 11. Select the rest of the body in the Left view, with Back Faces unchecked (this allows you to select just one half of the body, as shown in Figure 6.42). 12. Cut the selection away from the other half of the body and relax it. 13. Select the other half, and relax it as well. Stack the two pieces together (see Figure 6.43). Figure 6.42 In the Left view, select one half of the body with Back Faces unchecked.
180
6.
U-V Mapping the Slogre with DeepUV
Figure 6.43 Cut, relax, and stack the two body halves together.
Pack the Map As I mentioned in the previous chapter, it’s best to pack these maps manually so you can give preference to items that need more detail. The logic is thus: The larger the scale of an individual map item on the Material map, the more texture detail you’ll be able to apply to it. If you were to scale the head portion of the map down to a tiny little piece, how much texture detail TIP would show up once the texture skin was When you place and scale the reduced to 256×256 pixels? Not a lot, my pieces on the map, use Edit, friend. So in this case, the pieces that need Free Transform in conjunction the most detail are the head, followed by the with the Shift key to scale the body, arms, legs, and so on. Figure 6.44 shows pieces uniformly. my map, packed with preferences to those pieces mentioned.
Update and View the Results in Max Once your map is packed, choose File, Export, Send UV Update to send your completed work back to 3D Studio Max. Then, switch back to Max and click on the Modifier tab to see all the stacked updates you’ve sent. The topmost update is the
Update and View the Results in Max
Figure 6.44 The completed slogre U-V mapped, packed, and ready to texture.
latest—to view it, add an Unwrap UVW modifier to the stack, and in its panel, click the Edit button (see Figure 6.45). Now you’re ready to texture the slogre. To commence this process, save your scene in Max, then skip to Chapter 12.
Figure 6.45 Export the final version of the map back to Max.View the completed mapping in Max using an Unwrap UVW modifier.
181
182
6.
U-V Mapping the Slogre with DeepUV
Summary In this chapter, I showed you how to import your slogre mesh from Chapter 4 and complete it using 3D Studio Max attaching, optimizing, and smoothing techniques. The U-V coordinates, which represent the way the skin texture for the model will be wrapped around it, were exported to DeepUV. This program allowed us to isolate and unwrap individual portions of the slogre’s U-V’s, thereby generating a twodimensional and easily texturable skin map. The combination of Max and DeepUV rendered this entire operation painless and swift and prepared the model for its texturing phase, which is covered in Chapter 12.
PART THREE
Texturing the UV’s with DEEPUV
Game Texturing
8
Inorganic Texture Tutorials with Photoshop
9
Advanced Texturing Examples
11
12
Organic Texture Tutorials with Photoshop
TE
10
AM FL Y
7
Skinning the RF-9 Plasma Gun with Deep Paint 3D and Photoshop Skinning the Slogre with Deep Paint 3D and Photoshop
Team-Fly®
CHAPTER 7
Game Texturing
7.
186
I
Game Texturing
n this chapter I’ll introduce you to the vast world of game texturing. This will be a primer, so to speak, for the chapters that follow. Specifically, this chapter covers ■ ■ ■ ■
The game texturing arena Different types of textures Texturing techniques Application of textures
Introduction to Game Texturing I think you’ll find that the art of designing textures for games has become a field in itself. (In fact, my next book might be solely about game textures.) I wish I had more room in this book to cover every gritty detail, but I’m going to do my best to show you the median of what you should be familiar with in each of the texturing categories. You see, a good game (especially a 3D one) has quite an amalgam of different types of textures, from ones made from scratch, to “scripted” ones via filters, to photo-based . . . all to deliver some eye candy to the player.
Types of Textures Even though we’re headed towards pure photorealism in games (hmmm, I’d say around the year 2012), not every game that’s developed now or in the future will require an environment that appears purely photorealistic. In fact, sometimes it’s cool to create a game that appears cartoon-like or bizarrely unreal—so don’t panic too much when trying to make things look perfectly real. I’ll be covering many different types of textures as this book progresses, many of which simulate the real world, but also others that would fit nicely with Hanna-Barbera! That said, let’s discuss the various texture categories: ■
Hand-drawn textures
■
Seamless textures
■
Photo-based textures Compositing textures
■
Animated textures
■
Types of Textures
187
Hand-Drawn Textures For the most part, I’ll show you how to create textures from scratch using either Photoshop versions 6 or 7 (both are nearly identical in general functionality and tool locations). Of course, it’s easier to get a picture of something real, clean it up, and make a texture out of it; however, I want you to be able to make just about anything by hand should the need arise.
Inorganic Versus Organic Throughout this book, I tend to categorize models and textures as inorganic and organic. By inorganic, I mean that, whatever it is, it’s most likely portraying something carved from steel, wood, or even rock—mostly inanimate objects. By organic, I mean objects or other entities that have fluidity to their shape, or are in fact alive. Organic, to me, are things that relate directly to living things. Rock-based textures I like to contain within the inorganic category, despite their worldly origins, because they represent materials used more for building things. I believe inorganic textures (rocks, metals, walls, floors, and the like) to be the easiest and most fun, as well as being the most realistic. For example, I made the Mars rock texture shown in Figure 7.1 in under a minute using only a handful of the default filters that come with Photoshop. I couldn’t believe how realistic it was; I honestly didn’t expect it to look that good (I’ll show you how to make it in the next chapter). Figure 7.1 A quick Mars rock texture.
188
7.
Game Texturing
Organic textures—that is, any living (or once alive) carbon-based life form or part of something living—can be either unbelievably easy or a total pain to create. Animal and reptile skins are usually easy to make by hand because they take the same path as rock-texture creation—usually you can achieve a great base texture for them using only a handful of Photoshop’s filters. Textures for humans, insects, or anything else with complex detail, however, can be a real challenge for someone like me who has limited freehand artistic ability. Figure 7.2 shows a weak example of a texture map I made for a butterfly . . . I’ll show you how to make skin textures for the Slogre model later on in Part III.
Photo-Based Textures No doubt you’ll encounter many occasions when using a photograph of a brick wall, tree bark, a rusted pipe, or whatever to create your texture will be easier than creating it from scratch. A good example would be if your game called for you to create a texture for the side of an old train car. Just get a really good snapshot of the car in broad daylight, clean it up a bit, and slap it on the side of a 3D model— it’s much easier than spending a couple hours trying to make something real. The most common case of photo-based texture usage probably is with brick walls. Games sometimes have a gazillion of them, and you want the widest variety possible. So grab your digital camera, head into the big city, and go nuts. Figure 7.3 shows a seamlessly tiled brick wall texture I made from a picture I took of the side of a building. I toned it down and cleaned it up a bit so it would be more appropriate for a video game.
Figure 7.2 A freehand texture map applied to the skin of a butterfly model.
Types of Textures
Figure 7.3 A brick texture created from a photograph.
Compositing Textures Compositing is simply mashing two or more textures together, but typically it’s the careful combination of a photo and a hand-drawn image. I like to make composites, often because a flat-out photo can be too, well, dorky. Integrating a part of a live picture with something you’ve created by hand or adding some layer effects to a picture can make a texture work very well in a game. Check out Figure 7.4—I took the brick texture from Figure 7.3 and, in Photoshop, applied a stucco look to parts of it. Now it looks like someone tried to cement over the wall, and over time it broke away.
Figure 7.4 Compositing a real picture with a handdrawn image to make a viable texture.
189
190
7.
Game Texturing
Seamless Textures Seamless textures are an art form in themselves. I don’t think there’s a 3D video game out there that doesn’t have hundreds of seamless textures—that is, textures that can be tiled side-by-side (and sometimes above and below) each other without a noticeable seam. The basic technique for making a texture seamless is to first create the texture, and then offset it evenly using the Offset filter in Photoshop. But here’s the trick: A good seamless texture has little noticeable repetition in the overall pattern. That is, when the texture is tiled, nothing stands out to make you say, “Oh, I see. It’s just a simple brick wall copied over and over again.” Making a 256 × 256-pixel wall texture for a game is fairly easy—however, a good artist will spend time weeding out the “sore thumbs” in the image. For instance, the top seamless brick wall texture in Figure 7.5 has obvious shadows that stand out as its tiled—every other row seems much darker and has a brick with stains where its ends meet. After playing with it a bit, toning down some of the colors here and there, I managed to make the wall look nice, smooth, and even.
Figure 7.5 A seamless brick wall fixed for proper continuity.
Summary
Animated Textures Often in games you’ll see random belches of steam coming out of a pipe, or a flow of water gushing down a drain. Both are cases of texture animation, but the first might be considered a sprite, or a series of 2D textures (with transparency, meaning that all areas surrounding the smoke are transparent in a game engine) chained together to give the illusion of steam. The latter could simply be a flat-out AVI of rushing water that’s overlaid onto a 3D object in the shape of water, then looped ad infinitum. Animated textures can also be as simple as a blinking light on a control panel–two textures are created; one for the light being on, and one for off. The game engine will handle alternating the two during game play (see Chapter 9, “Advanced Texturing Examples,” where I show a simple on-off animation of two textures that creates the illusion of a power switch being activated).
Summary The texturing world is truly divided between two different categories: inorganic and organic. Inorganic textures are those that represent man-made objects in this world, such as metal, whereas organic textures are those that represent living or natural things. As most artists paint images based on real life, textures are many times the result of compositing photographs with filtering effects in Photoshop. Whether your texture is seamlessly tileable for a large wall, or animated as a sprite to simulate steam, the next few chapters will guide you through these detailed processes so you can generate your own outstanding game textures.
191
This page intentionally left blank
CHAPTER 8
Inorganic Texture Tutorials with Photoshop
8.
194
Inorganic Texture Tutorials with Photoshop
J
NOTE
AM FL Y
ust what are inorganic textures anyway? Inorganic textures are those textures that resemble materials such as stone or wood that may or may not be carbonbased, but are not “alive”—at least, not in their final building-material stage. All the textures I’ll cover here can be created by using the filters that come by default with Photoshop versions 6 and 7, and by using images of real objects I took with my digital camera.
TIP
TE
Unfortunately, I can’t detail every little inorganic texture that might go into a typical video game. Fear not, though; by the time you’re finished practicing the textures in this chapter, you’ll be saturated with information to get you rolling with your own texture creations.
This chapter assumes you’re proficient in Photoshop; for this reason, the instructions in each tutorial may not spell out the details of how to accomplish each task. If you have trouble following along, check out the Photoshop tutorials found on this book’s CD-ROM.
This chapter starts with some simple procedures, which you may find a bit boring. Soon, though, things will speed up. (Try to pay attention to the particular details of each tutorial, because I’ll be going over some of the advanced features that Photoshop has to offer.) In particular, you will learn ■ ■
■ ■ ■ ■ ■
How to create the base material for most types of textures How to use Photoshop’s default filters, pictures, or combinations of both to create inorganic textures How to create seamlessly tileable textures How to create tileable texture sets How to prepare textures for games How to Automate texture procedures using actions How to combine and composite images
Team-Fly®
Texture Creation
195
Texture Creation Texture creation is not a random process. A good artist will spend time creating and organizing textures to fit a particular scene or level so that everything comes together somewhat fluently, and that nothing will seem out of place. Textures are usually created in sets—that is, if you’re creating a dungeon, you’ll create a “dungeon set” by grouping appropriate artwork for the stone walls, floors, and ceilings; and wood textures for the doors, stretching racks, torches, and the like. Here’s a quick guideline/overview of what you should think about before embarking on any texture-creation projects: ■
■
■
■
■ ■
■ ■
■
The more time you spend on a texture, the better (or more realistic) it will look. On the other hand, as with any business, time is money. Work fast, but work well. There’s more than one way to skin a cat. Always think of the fastest or best way to do any particular step while creating your textures. No one way is the absolute correct way! Work large and reduce. Don’t try to create a tileable stone wall that starts off the size of your thumb. By putting in details on a large image and then reducing the whole thing, you’ll get how-did-you-do-that results. Understand everything that each room or scene is trying to convey. Is it happy or sad? What decade or era is it set in? Have detailed knowledge of what your game company wants, and then research the materials you’ll be creating before you begin. If you’re not sure, don’t just try to come up with a texture in your head. Use life as your reference! Break out your camera and go to town. Literally. Group and work with textures in sets. Don’t work randomly. Don’t make any texture stand out unless it needs to. Blend it nicely with its surroundings. Be patient. A game’s graphic content can make it sell. Don’t re-invent the wheel. If a texture exists in some picture, use that instead of recreating it from scratch. Don’t be too detailed unless the game’s engine calls for it. In fact, the average game’s texture is around 256×256 pixels in size; not a whole lot of detail can be crammed into that.
196
8.
Inorganic Texture Tutorials with Photoshop
With that in mind, all the following procedures can be mixed and matched and placed just about anywhere in a room, on an outside surface, or on an object. Use this chapter to get a good feel for creating the base material for things; then, in the next chapter, you’ll bring it all together and make some blue-ribbon textures.
TIP As you begin to develop your own games, you’ll probably discover that you use certain textures on a routine basis. Rather than re-creating those textures from scratch each time, try recording the creation process in the Actions palette.Then, the next time you need to use that texture, you can simply re-play the procedure.
Brick Textures Brick textures are among the most often created of all textures, and there are a gazillion ways of doing every type. In this section, I’ll show you the foundations for texturing brick, give you some cool tricks and examples, and let you fly on your own. In no time, you’ll make the transition from texturing bricks like the ones in Figure 8.1 to creating walls like the one in Figure 8.2. Figure 8.1 A rudimentary brick wall.
Figure 8.2 A brick wall that’s far cooler.
Brick Textures
197
Brick Procedure #1: From Scratch To texture the type of brick typically found on the outside of houses, buildings, stores, and whatnot, do the following (note that rather than making an entire brick wall, you’ll make a single, seamlessly tileable pattern to fill any 2D space with a brick texture): 1. In Photoshop, choose File, New Image to open a new 7×4-inch image (see Figure 8.3). Figure 8.3 Start a new 7×4-inch image.
File, New Image Width: Height: Resolution: Mode: Contents:
7 inches 4 inches 72 RGB Transparent
2. Using the Color Picker, set the new image’s foreground to bright red (hex# CE0000) and its background to dark red (hex# 900202), as shown in Figure 8.4. Figure 8.4 In the Color Picker, set the foreground and background colors to bright and dark red.
Hex
198
8.
Inorganic Texture Tutorials with Photoshop
3. Choose Filter, Render, Clouds. The Clouds filter creates a cloudy blend of the foreground and background colors, as shown in Figure 8.5. Figure 8.5 Apply the Clouds filter to a canvas with a bright red foreground and dark red background.
Filter: Foreground:
Render, Clouds hex# CE0000
Background:
hex# 900202
4. To add some noise to break up the pattern, choose Filter, Noise, Add Noise (see Figure 8.6). Figure 8.6 Apply the Noise filter.
Filter: Amount: Distribution: Monochromatic:
Noise, Add Noise 22% Uniform (checked)
Brick Textures
199
5. Choose Filter, Texture, Craquelure to add some, er, texture to the texture (see Figure 8.7). Figure 8.7 Apply the Craquelure filter.
Filter: Crack Spacing:
Craquelure 12
Crack Depth: 3 Crack Brightness: 10 6. You now have the base of the brick texture; now it’s time to put in some mortar, which is usually a medium-gray color. To begin, use the Color Picker to set your foreground to hex# 767676. 7. Add a new layer. This is important, because you’ll be adding an effect to the mortar to make it appear to have depth. 8. Turn on your rulers by choosing View, Show Rulers (or pressing Ctrl+R). 9. Select the Line tool, and make sure its options are set as follows, from left to right (this will enable you to draw a thick gray line on the image): Create Filled checkbox (third from left)
Enabled
Weight
25 pixels
Mode
Normal
Opacity
100%
200
8.
Inorganic Texture Tutorials with Photoshop
10. Using the rulers as a guide, draw a horizontal line across the middle of the image at the 2-inch mark. Draw another line from the horizontal line’s center (the 3.5-inch mark) to the bottom of the canvas, as shown in Figure 8.8.
TIP To constrain the Line tool to 45degree increments, press and hold down the Shift key on your keyboard as you drag to draw the line.
Figure 8.8 Use the Line tool to draw dividing lines in the texture.
11. Draw four more lines along top, bottom, and top sides of the image, but this time draw them so that only half of the line’s width is displayed. (That way, when the texture is tiled, the opposite edges will combine to form a whole width.) To do so, align your cursor along each edge of the image, press and hold down the Shift key, and drag (see Figure 8.9). Figure 8.9 Draw half-width lines along the top, bottom, and top sides of the image.
Brick Textures
12. Double-click the mortar’s layer to bring up the Layer Styles screen, click the Bevel and Emboss effect, and add an inverted outer bevel (see Figure 8.10). Figure 8.10 Add an inverted outer bevel to the mortar’s layer.
Style, Bevel and Emboss Style: Technique: Depth: Direction: Size: Soften:
Outer Bevel Smooth 100% Down 5 pixels 10 pixels
13. Still in the mortar layer, choose Filter, Noise, Add Noise, using the same noise settings as before. 14. Choose Filter, Texture, Craquelure, using the same settings as before (see Figure 8.11). Figure 8.11 Finish the mortar by adding Noise and Craquelure.
15. Flatten the image (that is, combine the layers) by clicking Layer, Flatten Image.
201
202
8.
Inorganic Texture Tutorials with Photoshop
16. That’s it! The pattern is complete. It is, however, really big, so you’ll need to click Image, Image Size and change the width to 128 pixels (or however small you want). When you change the width, the height will proportionally adjust automatically, so long as the Constrain Proportions option is checked. 17. Choose Edit, Define Pattern to add the pattern to the existing pattern list. 18. Fill any blank space on any new or existing image with the pattern; Figure 8.12 shows the result. Figure 8.12 Reduce the image to a reasonable size and add it to your pattern list. Finally, try filling a blank space in an image with it.
TIP You could have created the brick wall shown in Figure 8.12 by simply drawing all the mortar lines in the wall by hand instead of tiling a smaller image, but doing so would be quite time consuming.Tiling is a great way to save time as you create textures, but not all objects tile evenly the way the bricks in this image do.To figure out how uneven patterns tile, just look at the real-world object you’re trying to create to determine how the elements in the pattern repeat.
If you think this first tutorial seems a bit lengthy, wait until you start doing some of the high-end stuff. Instead of 18 steps and 10 minutes, try 500 steps and two days! Good textures take some time.
Brick Textures
203
Brick Procedure #2: From an Existing Image More often than not, you’ll create a texture using a photograph of the real McCoy—or at least using portions of a photograph to create a seamless pattern, and then combining that with patterns you’ve made by hand. In this example, you’ll isolate the repetitious pattern in a digital photograph, and then fill a blank canvas with it to see it in action. 1. In Photoshop, open the brick01.jpg file in the Chapter 8 Data section on the CD-ROM (see Figure 8.13). Figure 8.13 Open the brick01.jpg image on the CD-ROM.
2. Notice that the image is slightly tilted clockwise by about 1 degree. To fix this, click Image, Rotate Canvas, Arbitrary. Then, type 1 in the Angle field, select CCW (counter-clockwise), and click OK. The bricks (not the canvas) should be somewhat level now (see Figure 8.14). Figure 8.14 Straighten out the image using the Rotate Canvas feature.
8.
Inorganic Texture Tutorials with Photoshop
AM FL Y
3. Using the Crop tool, select an area in the image that includes a single brick on top with two half bricks beneath, like the pattern you created in the preceding section. Remember to include one-half of the mortar that surrounds these bricks so when the pattern is tiled, the halves will constitute a whole (see Figure 8.15). Figure 8.15 Use the Crop tool to isolate a tileable pattern from the brick wall.
TE
204
4. Click Edit, Define Pattern, give the pattern a name, and click OK. 5. Open a new, big, blank image—say, 1024 × 1024. 6. Click Edit, Fill. 7. Under Contents, select Pattern. In the Custom Pattern list, select your new brick pattern, and click OK. You should now have a filled image similar to the one in Figure 8.16. Figure 8.16 Define your brick selection as a pattern and fill a blank image with it.
Team-Fly®
Brick Textures
205
8. In my filled image, I see a handful of imperfections that repeat all over the place (see Figure 8.17). To eliminate these flaws in your image, return to the first image from which you created the pattern, and use the Clone Stamp tool to cover the blemishes. In addition, you can use the Clone Stamp tool to eliminate the shadows on the mortar (copy over shadowed areas with nonshadowed mortar). Alternatively, you can use the Dodge tool with a low exposure setting to do the trick. 9. As you make adjustments and clean up your pattern, re-define the pattern and fill your test image with it to see your progress (see Figure 8.18). Figure 8.17 Notice any repeating blemishes on your pattern and get rid of them using the Clone Stamp tool.
Eliminate noticeable blemishes
Figure 8.18 Keep cleaning up your pattern until it’s nice and even. Fill the pattern on an image to make sure it looks good.
8.
206
Inorganic Texture Tutorials with Photoshop
Of course, the more time you spend cleaning up the texture, the better it will look. That said, don’t go overboard—just make sure nothing sticks out like a pimple on your nose! Here are some things to keep in mind when creating tiling textures like this: ■
■ ■ ■ ■
Use the Clone Stamp tool avidly to copy good areas and paste them over bad ones. Use the Clone Stamp tool to even out the texture itself. Dodge (and burn) shadows and highlights out of (or into) the image. Zoom in on your work to aid in detailed operations. Take your time. This is a small piece of work to make a huge wall!
Brick Procedure #3: A Quick Composite (Yeah, Right) As I mentioned earlier, you’ll often use part of a real image (or images) in combination with an object you’ve created from scratch in Photoshop to produce a final texture. In this section, you’ll take your brick texture from the last example and add a cement/stucco look over portions of it—kind of like you’d see chipping away from brick walls in big cities: 1. The pattern you made in the last example is too big for tiling onto a typical game-texture image. To resize it, begin by clicking Image, Images Size. 2. Under Pixel Dimensions, set the width to 64 pixels. The height will proportionally readjust as long as the Constrain Proportions checkbox is checked. 3. Click Edit, Define Pattern, and add the new pattern to your pattern list. 4. Create a new 512×512 canvas. 5. Click Edit, Fill, and fill the image with the custom brick pattern you just created. This will be your base wall, which on its own would fit (or scale down and fit) nicely for a video game (see Figure 8.19).
Brick Textures
207
Figure 8.19 Fill a blank 512×512 image with the reduced brick pattern you created earlier.
6. This brick wall is way to bright, perfect, and hazy for my tastes; to fix it, begin by clicking Image, Adjust, Levels. 7. A histogram of the input levels (the general balance of shadows, midtones, and highlights) appears. Slide the left black triangle toward the center of the histogram. Notice that the wall takes on a nice, rich, crisp red texture, much like a normal brick wall (see Figure 8.20).
NOTE Levels are a very important feature in Photoshop to aid you in adjusting your images and channels.You’ll use levels more as you progress.
Figure 8.20 Enrich your texture by readjusting the shadows using levels.
208
8.
Inorganic Texture Tutorials with Photoshop
8. Now that the color is okay, desaturate it a bit by clicking Image, Adjust, Hue/Saturation. 9. Drag the Saturation slider to −30 or so; the results are shown in Figure 8.21. Figure 8.21 Desaturate the texture so it won’t burn a hole in your eye.
10. Save your image so you can use it later as a plain brick wall. I recommend you save the image as a PSD file in a separate folder called \Textures\Brick\ or something similar. 11. Start a new layer. This will be your cement/stucco layer.
NOTE If the wall you just created were ready for a game, you’d typically reduce it, if needed, to your game’s wall proportions and save it as an 8-bit bitmap. I’ll go into that in the next example.
12. You could use a cement sample from a digital photo, but let’s fool around with filters so you can have some fun instead. To begin, set your foreground to a grayish cement color, like hex# 7D7D7D, and set your background to a pukey yellow-green, like hex# 525035. This will constitute the disgusting blend of your cement mix (feel free to use whatever colors you want, however).
Brick Textures
TIP Finding the right colors for a texture can be difficult; that’s why when you do find a color that works, you should save it.Try storing colors in the Swatches palette as you go, or keeping a color list (with each color’s hex#); that way, you can easily locate the colors you want.
13. Choose Filter, Render, Clouds to blend the colors on your new layer (see Figure 8.22). Figure 8.22 Render clouds using cement colors.
Filter: Foreground: Background:
Render, Clouds hex#7D7D7D hex# 525035
14. Choose Filter, Noise, Add Noise to make the texture grainier.
209
210
8.
Inorganic Texture Tutorials with Photoshop
15. Choose Filter, Texture, Grain to break the texture up even more (see Figure 8.23). Figure 8.23 Add noise and grain to break up the texture.
Filter: Amount: Distribution:
Noise, Add Noise 5% Uniform
Monochromatic: Filter: Intensity: Contrast: Grain Type:
(checked) Texture, Grain 6 13 Horizontal
16. Now you have the base composition of the cement mixture. (This doesn’t have to be perfect, by the way!) From here, you want to hack away at the cement to expose the underlying brick, as though the cement has been there for a while and now it’s falling away. Using the Lasso tool, select a jaggy, diagonal pattern from the bottom-left to the top-right of the TIP canvas. Once you get to the top-right edge, If you mess up, just press move your cursor outside the image and up, Ctrl+Alt+Z to undo the over, and back down to your starting point selection and try it again. (see Figure 8.24).
Brick Textures
Figure 8.24 Use the Lasso tool to select a diagonal pattern across the cement.
17. The selection represents what will be hacked away in a moment, but it’s too clean at the edges. To roughen things up, begin by pressing Q to enter Quick Mask mode. The pink area represents the non-selected area of your texture. 18. Apply a filter to the mask itself to re-define the selection boundary. To do so, choose Filter, Brush Strokes, Spatter (see Figure 8.25). This is a good technique for chipping the edges on just about anything. Figure 8.25 Enter Quick Mask mode and apply the Spatter filter.
Filter: Brush Strokes, Spatter Spray Radius: 15 Smoothness: 4 19. Exit Quick Mask mode by pressing Q again.
211
212
8.
Inorganic Texture Tutorials with Photoshop
20. Your marquee selection should take on the form of the mask you just messed with. Press Delete to delete the selection on the cement and expose the underlying brick, and then press Ctrl+D to deselect the marquee (see Figure 8.26). Figure 8.26 Exit the Quick Mask mode and delete the selection.
21. Switch to the background layer (the brick wall). 22. Press Ctrl+A to select the entire layer. 23. Press Ctrl+C to copy the layer to the Windows buffer. 24. In the Channels palette, click on the Create New Channel icon to create a new Alpha channel that you can use as a bump map. (I’ll get more into that later). 25. Press Ctrl+V to paste the brick wall into the new channel (see Figure 8.27). Figure 8.27 Copy the contents of the brick-wall layer and paste them into a new Alpha channel.
Brick Textures
213
26. Click Image, Adjust, Invert to invert the black-and-white colors on the Alpha channel. The white areas represent the raised portions of the brick wall, and the black areas represent the lower portions. 27. Click Image, Adjust, Levels, and slide the middle (midtones) slider way over to the right so that most of the white in the image is washed out; all that’s left should be a vague representation of the brick wall (see Figure 8.28). Figure 8.28 Invert the colors and adjust the midtone levels so that most of the white is washed out.
28. The darkened Alpha channel represents the bumps in the cement created by the underlying bricks. Any white you see will define these bumps. To apply this effect, return to the Layers palette and click on the cement layer to select it. 29. Click Filter, Render, Lighting Effects to begin rendering the layer using a light source and the Alpha channel as a bump map. 30. Choose Directional from the Light Type list. 31. Check the preview area on the left side of the dialog box to view the effect. The preview area also illustrates the light source, which, in this case, is a line with a white circle on one end and a square at the other. By grabbing either end, you can position the light source to point in the direction you wish, and by elongating it you can intensify it. (See Figure 8.29 to see how I set mine up.) 32. Pull down the Texture Channel list at the bottom of the dialog box and choose Alpha 1 (this is the Alpha channel you made a few steps ago).
8.
Inorganic Texture Tutorials with Photoshop
NOTE Notice the White is high checkbox near the bottom of the Lighting Effects dialog box. As I mentioned earlier, any white in your Alpha channel represents the raised portion in the final rendering with the filter.The more intense the white, the higher things will appear.
AM FL Y
33. Adjust the Height slider to 7 or something similar; you want the cement to appear as though the bricks beneath it are just slightly pushing it up. Then click OK.
Figure 8.29 Apply the Lighting Effects filter to the cement layer to give the texture an aligned bump map.
TE
214
34. The cement appears to be very thin, and the bricks’ surfaces are pushing it up. To break up the repetition of the cement, choose Filter, Brush Strokes, Spatter and use the settings noted near Figure 8.30. 35. To give the entire texture a more realistic masonry look, choose Filter, Noise, Dust & Scratches. Figure 8.30 Apply the Spatter filter to the cement to break up the pattern a bit.
Team-Fly®
Brick Textures
215
Filter: Brush Strokes, Spatter Spray Radius: 5 Smoothness: 7 Filter: Noise, Dust & Scratches Radius: 9 Threshold: 35 36. If you like, you can give the chipped edges of the cement a bit of a 3D effect to make it look rather thick; simply apply an outer-bevel style to the cement layer. (I changed the Highlight Mode setting to a grayish color, set it to Normal, and set the Opacity to 100%, as shown in Figure 8.31.) Click OK. Figure 8.32 shows the final texture, ready to be plopped into a game. Figure 8.31 Apply an outer bevel to the cement layer to give the edges a 3D look.
Figure 8.32 The final texture panel.
8.
216
Inorganic Texture Tutorials with Photoshop
Fini! I know this example may seem a bit tedious, especially if you haven’t done texturing like this before, but get used to it. If it makes you feel better, the steps you took constitute a large portion of techniques that normally go into most textures.
NOTE None of the settings in any step are cast in stone; try adjusting things all over the place to vary your results to your satisfaction!
Here’s a quick recap of some of the things that went into this texture, and that comprise most textures I create: ■
■
■
■
■
My textures almost always have some photograph of the real thing from which to extract a tangible base layer, either from directly copying portions of the picture or recreating the texture using the picture as a reference. Textures are generally highly