ebook img

Complete Maya Programming, Vol. II: An In-Depth Guide to 3D Fundamentals, Geometry, and Modeling (Morgan Kaufmann Series in Computer Graphics and Geometric ... Morgan Kaufmann Series in Computer Graphics) PDF

737 Pages·2005·2.15 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Complete Maya Programming, Vol. II: An In-Depth Guide to 3D Fundamentals, Geometry, and Modeling (Morgan Kaufmann Series in Computer Graphics and Geometric ... Morgan Kaufmann Series in Computer Graphics)

A great follow-up to Volume Lt Volume II is an in-depth guide to the mathematical and geometric concepts indispensable to advanced Maya programmers. ~Larry Gritz, Exluna/NVIDIA From Volume I of Complete Maya Programming. David's book is an excellent learning tool and reference for novice and veteran Maya developers alike. Maya developers can become more productive with MEL and the Maya API by applying what they learn from this book. Tracy Narine, Maya API Technical Lead, Alias David Gould is an expert at using, programming, and teaching Maya, and it shows. People who need to program Maya will find this book essential. Even Maya users who don't intend to do extensive programming should read this book for a better understanding of what's going on under the hood. Compact yet thorough, it covers both MEL and the C+ + APL and is written to be informative for both novice and expert programmers. Highly recommended,t --Larry Gritz, Exluna/NVIDIA, co-author of Advanced RenderMan This book should be required reading for all Maya programmers, novice and expert alike. For the novice, it provides a thorough and wonderfully well thought-out hands-on tutorial and introduction to Maya. The book's greatest contribution, however, is that in it David shares his deep understanding of Maya's fundamental concepts and architec- ture, so that even the expert can learn to more effectively exploit Maya's rich and power- ful programming interfaces. ~Philip J. Schneider, Industrial Light & Magic, co-author of Geometric Toolsf or Computer Graphics Having provided a technical review of David Gould's Complete Maya Programming, I must say that this book is the definitive text for scripting andplug-in development for Maya. Never before has there been such a concise and clearly written guide to program- ruing for Maya. Any user smart enough to pick up this book would be better offf or it. ~Chris Rock, technical director at "a Large Animation Studio in Northern California" I f you ever wanted to open the Maya toolbox, this is your guide. With clear step-by-step instructions, you will soon be able to customize and improve the application, as well as create your own extensions, either through the MEL scripting language or the full C+ + APL ~Christophe Hery, Industrial Light & Magic The Morgan Kaufmann Series in Computer Graphics and Geometric Modeling Complete Maya Programming Volume II: Computer Animation: Algorithms and Techniques An In-depth Guide to 3D Fundamentals, Geometry, Rick Parent and Modeling The Computer Animator's Technical Handbook David A. D. Gould Lynn Pocock and Judson Rosebush High Dynamic Range Imaging: Advanced RenderMan: Data Acquisition, Manipulation, and Display Creating CGIf or Motion Pictures Erik Reinhard, Greg Ward, Sumanta Pattanaik, Anthony A. Apodaca and Larry Gritz and Paul Debevec Curves and Su~Caces in Geometric Modeling: MEL Scriptingf or Maya Animators, Second Edition Theory and Algorithms Mark R. Wilkins and Chris Kazmier Jean Gallier Advanced Graphics Programming Using OpenGL Andrew Glassner's Notebook: Tom McReynolds and David Blythe Recreational Computer Graphics Digital Geometry: Andrew S. Glassner Geometric Methods for Digital Picture Analysis Warping and Morphing of Graphical Objects Reinhard Klette and Azriel Rosenfeld Jonas Gomes, Lucia Darsa, Bruno Costa, Digital Video and HD TV[: and Luiz Velho Algorithms and Intofaces tim Blinn's Corner: Charles Poynton Dirty Pixels Real- Hme Shader Programming Jim Blinn Ron Fosner Rendering with Radiance: Complete Maya Programming: The Art and Science of Lighting Visualization An Extensive Guide to MEL and the C+ + API Greg Ward Larson and Rob Shakespeare David A. D. Gould Introduction to Implicit Surfaces Texturing & Modeling: Edited by Jules Bloomenthal A ProceduralApproach, Third Edition Jim Blinn's Corner: David S. Ebert, E Kenton Musgrave, Darwyn A Trip Down the Graphics Pipeline Peachey, Ken Perlin, and Steven Worley Jim Blinn Geometric Toolsf or Computer Graphics Interactive Curves and Surfaces: Philip Schneider and David H. Eberly A Multimedia Tutorial on CAGD Understanding ½rtual Reality: Alyn Rockwood and Peter Chambers Inte~Cace, Application, and Design Waveletsf or Computer Graphics: William B. Sherman and Alan R. Craig Theory and Applications tim Blinn's Corner: Eric J. Stollnitz, Tony D. DeRose, Notation, Notation, Notation and David H. Salesin Jim Blinn Principles of Digital Image Synthesis Level of Detail for 3D Graphics Andrew S. Glassner David Luebke, Martin Reddy, Jonathan D. Cohen, Radiosity & Global Illumination Amitabh Varshney, Benjamin Watson, and Robert Francois X. Sillion and Claude Puech Huebner User Interface Management Systems: Pyramid Algorithms: Models and Algorithms A Dynamic Programming Approach to Curves Dan R. Olsen, Jr. and Surfacesf or Geometric Modeling Making Them Move: Mechanics, Control, and Ron Goldman Animation ofA rticulated Figures Non-Photorealistic Computer Graphics: Edited by Norman I. Badler, Brian A. Barsky, Modeling, Rendering, and Animation and David Zeltzer Thomas Strothotte and Stefan Schlechtweg Geometric and Solid Modeling: An Introduction Curves and Surfacesf or CAGD: Christoph M. Hoffmann A Practical Guide, Fifth Edition An Introduction to Splinesf or Use in Computer Gerald Farin Graphics and Geometric Modeling Subdivision Methodsf or Geometric Design: Richard H. Bartels, John C. Beatty, A Constructive Approach and Brian A. Barsky Joe Warren and Henrik Weimer COMPLETE MAYA P RO GRAMMI N G VOLUME I 1 , David A. D. Gould AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO ELSEVIER Morgan Kaufmann Publishers is an imprint of Elsevier M 0 R G A N K A U F M A N N P U B L I S H E R S Senior Editor Tim Cox Publishing Services Manager Simon G. Crump Senior Project Manager Angela G. Dooley Assistant Editor Richard Camp Editorial Assistant Jessica Evans Cover Design Direction Cate Rickard Barr Cover Illustration Sean Platter, Studio Splatter Text Design Direction Julio Esperas Composition Integra Software Services Pvt. Ltd., Pondicherry, India Technical Illustration Dartmouth Publishing Inc. Copyeditor Daril Bentley Proofreader Phyllis Coyne et al. Indexer Northwind Editorial Interior Printer Maple-Vail Manufacturing Group Cover Printer Phoenix Color Corp. Morgan Kaufmann Publishers is an imprint of Elsevier. 500 Sansome Street, Suite 400, San Francisco, CA 94111 This book is printed on acid-f?ee paper. © 2005 by Elsevier Inc. All rights reserved. Designations used by companies to distinguish their products are often claimed as trademarks or registered trademarks. In all instances in which Morgan Kaufmann Publishers is aware of a claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means---electronic, mechanical, photocopying, scanning, or otherwisemwithout prior written permission of the publisher. Permissions may be sought directly from Elsevier's Science & Technology Rights Department in Oxford, UK" phone: (+44) 1865 843830, fax: (+44) 1865 853333, e-mail: To Agnes, my foundation. About the Author With over thirteen years of experience in the computer graphics industry, David Gould has pursued the dual paths of programmer and artist. This rare ability to combine both the technical and artistic has won him many awards and credits. He has played a key role in the development of an eclectic mix of technology, including an award-winning laser rendering system for Pangolin. He developed software for controlling the Kuper motion-control rig, as well as the Monkey stop-motion puppet. He personally devel- oped Illustrate, the market leading toon and technical illustration renderer. This renderer is used by NASA, British Aerospace, Walt Disney Imagineering, and Sony Pictures Entertainment, among others. David's career has spanned a wide variety of companies and continents. In Paris, he supervised the production of 3D stereoscopic scientific films, including the award winning film Inside the Cell. In London he developed a patented facial animation system. Further broadening his experiences, he worked in New York in the post- production industry where he contributed to many high-profile commercials. While at Walt Disney Feature Animation, Los Angeles, David developed cutting- edge animation and modeling technology that was used in the production of their animated feature films. He diversified further by joining Exluna, Berkeley, the soft- ware company founded by former Pixar rendering researchers, including Larry Gritz. While there, he played an active role in the design and development of Entropy, the Renderman-compatible renderer, as well as other products. David continued his rendering development efforts while at NVIDIA, in Santa Clara, California, by aid- ing in the design of their future 3D graphics chips. David has since joined the academy awarding winning studio WETA Digital in New Zealand. Having completed work on The Lord of the Rings trilogy he is currently working on King Kong. His varied roles in production include research and develop- ment, shader writing, lighting, and effects. Contents Preface xiv 1 Introduction I 1.1 Example Files 3 1.1.1 Compiling Example Plug-ins 3 1.1.2 Sourcing Example MEL Scripts 3 1.2 Executing MEL Code in the Script Editor 5 2 Points 9 2.1 Dimensions 9 2.2 Cartesian Coordinates 9 2.3 Homogeneous Coordinates 10 2.4 Polar and Spherical Coordinates 11 2.5 Conversions 12 2.5.1 Cartesian to Homogeneous 12 2.5.2 Homogeneous to Cartesian 13 2.5.3 Cartesian to Polar 13 2.5.4 Polar to Cartesian 13 2.5.5 Cartesian to Spherical 14 2.5.6 Spherical to Cartesian 14 2.6 MEL 15 2.7 C++API 16 2.8 Locators 17 .j Vectors 19 3.1 MEL 19 3.2 C++API 20 3.3 Adding 21 3.4 Subtracting 22 3.5 Scaling 22 3.6 Length 23 3.6.1 MEL 25 3.6.2 Ct+ API 26 3.7 Distance Between Points 26 3.7.1 MEL 26 3.7.2 C++A PI 27 3.8 Normalizing Vectors 27 3.8.1 MEL 27 3.8.2 C t t API 28 3.9 Dot Product 28 3.9.1 Angle Between 29 3.9.2 Length Squared 31 3.9.3 Perpendicular Projection 31 3.10 Cross Product 35 3.10.1 Perpendicular Vector 35 3.10.2 Area ofTriangle 38 3.1 1 Points Versus Vectors 40 Rotations 43 4.1 Angles 43 4.1.1 MEL 43 4.1.2 C++A PI 44 4.2 Rotations 44 4.3 Orientation Representations 47 4.3.1 Euler Angles 47 4.3.2 Quaternions 57 Contents IX 5 Trans format ions 61 5.1 Matrices 62 5.1.1 Matrix Multiplication 63 5.1.2 MatrixT ranspose 65 5.1.3 Identity Matrix 67 5.1.4 Inverse Matrix 68 5.1.5 MEL 69 5.1.6 C++API 71 5.2 Transforming Points 72 5.2.1 MEL 72 5.2.2 C++API 74 5.3 Transforming Vectors 74 5.3.1 MEL 74 5.3.2 C++API 75 5.4 Transforming Normals 75 5.4.1 MEL 77 5.4.2 C++API 77 6 Transform N o d e s 79 6.1 Pivot Points 79 6.2 Transformation Matrices 84 6.2.1 Querying Transformation Matrices 90 6.2.2 EditingT ransformation Matrices 93 6.3 Hierarchies of Transformations 97 6.3.1 Transformation Spaces 98 6.3.2 MEL 99 6.3.3 C++API 100 ~...v.. C o o r d i n a t e Frames 103 7.1 Up Axis 103 7.1.1 MEL 104 7.1.2 C++API 104 7.2 Handedness 104 7.3 Custom Coordinate Frames 106 7.3.1 C++API 109

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.