You are on page 1of 449

3ds Max

Architectural Visualization
One Project From Start to Finish
Authorized Publisher

Autodesk

) .}DATS
30 ARCIIITECTURAL TRAINING SOUITIOHS

An comprehensive production guide for all skill levels Create an award winning visualization project Every step detailed from start to finish

3ds Max 2011


One Project from Start to Finish

3ds Max 2011 One Project from Start to Finish


Copyright 2010 by 3DATS All rights reserved. No part of this work 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 the prior written permission of the copyright owner and the publisher. ISBN-13: 978-0-9792811-5-0 ISBN-10: 0-9792811-5-6 Printed in China Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Distributed to the book trade worldwide by 3DATS, LLC. 3DATS is a subsidiary of 3DAS. Phone 800-240-7675, fax 1-866-258-5534, e-mail 3dinfo@3dats.com, or visit www.3dats.com. The information in this book is distributed on an as is basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor 3DATS shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The downloadable content for this book is freely available to readers at www.3dats.com\books

Credits
Authors Sergey Vasilev Andrew Rubejansky Vladislav Yakovenko Sergey Kravchenko Eugene Dontsov Project Manager Brian L. Smith Technical Editors Alex Gorbunov Mark Gerhard Michele Bousquet Padhia Romaniello Translator Alex Gorbunov Compositor Dina Quan Proofreader Kelly Winquist Foreword Michele Bousquet Front Cover Image cat-a-pult

The inspiration for everything I do in the 3D world has always been my wonderful wife Shari and our two kids Laken and Kegan. I would not be doing what I do without their support. Brian Smith

Contents

About the Authors .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

vii ix xi

About the Project Manager Acknowledgments . Foreword

About the Technical Editors .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

xiii xvii xxi 1-1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Frequently Asked Questions Technical Considerations . Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2D to 3D Modeling . Terrain Creation . Tree Creation Scarecrow .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2-1 3-1 4-1 5-1 6-1 7-1 8-1 9-1 A-1 B-1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Water Elements . Animation . Lighting . Rendering

Background and Site Elements .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Appendix A Critical V-Ray Settings .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Appendix B A Gallery of Images by cat-a-pult . Index

About the Authors

T he above image was Taken during a dinner meeTing during a visit to cat-a-pults hometown of Odessa, Ukraine in December 2009, early in the production of One Project. From left to right: Brian Smith, Andrew Rubejansky, Sergey Kravchenko, Sergey Vasilev, Eugene Dontsov. Not pictured, Vladislav Yakovenko. Odessa visualization house cat-a-pult was founded in 2004 by a group of four freelancers with a similar vision. We decided to unite our visualization forces and start working on large-scale projects, which would have been impossible if each of us continued to work individually. Different attempts were made to try our potential in a few visualization directions: illustration, industry design, advertisement, and 3D visualization of architectural objects became the main direction of our work. In the last few years the number of employees has grown to 15 people; we have worked with clients from all around the globe, including Europe, Asia, and the U.S.; and weve received numerous awards from specialized CG industry resources. We do not stop at our current level of achievement: we are always striving to be up-to-date with the latest technology and software news, and thus, we are always ready to impress our clients with the speed and quality of our work. Currently, our team is working on multiple architectural presentations for a number of clients, including our long term friend, 3DAS.

vii

viii About the Authors

Sergey Vasilev (caesar) is 29 years old and married. He graduated from Odessa Polytechnic University with a specialty in Intellectual Systems and Networks. In 2001, he began developing architectural and design projects as a freelancer. In 2004, he founded cat-a-pult and currently works in management, supervising, post production, and quality control.

Andrew Rubejansky (Avium) is 32 years old and married. He graduated from Odessa National University with a specialty in Psychology. In 2005, he began developing architectural and design projects as a freelancer and has worked for cat-a-pult since 2005. His current tasks include management and visualization.

Vladislav Yakovenko (Vlado) is 25 years old and married. He graduated from Odessa National Cryogenics Academy with a specialty in technical programming. He worked in game development from 2002 to 2006 and since 2006 has worked for cat-a-pult. His current tasks include animation and visualization.

Sergey Kravchenko (qwerty) is 33 years old and married. He graduated from National Academy of Architecture and Constructions and began working as a freelancer in architecture and design in 1999. Since 2004, he has worked with cat-a-pult and current tasks include management, visualization, and renderfarm management.

Eugene Dontsov (Jackson) is 26 years old and married. He graduated from Odessa National Academy of Communications with a specialty in Informational networks. From 2000 to 2004 he was a freelancer in the architecture and design industry and since 2004 has worked for cat-a-pult. His current tasks include research and development, and visualization.

About the Project Manager


Brian Smith began his 2D and 3D CAD studies in the early 90s and worked as an animation specialist in architectural, engineering, and landscap ing firms in southwest Florida. He started his own company in 2001, specializing in the production of architectural animations and renderings, and a few years later cofounded the production company 3D Architectural Solutions (3DAS) in Sarasota, Florida. In 2006, he founded the publishing company 3DATS and in 2008, 3DATS teamed up with CGarchitect and Spine3D to form CGschoolthe worlds leading visualization training company. He divides his time between production and training, and in his free time looks for big mountains to climb. Brian graduated from the U.S. Military Academy at West Point with a major in Aerospace Engineering. He served on active duty, including two years as a Battery Commander, responsible for a short range air defense battery of over 100 soldiers. Follow ing 9/11, he served in Washington, D.C. as an Air Defense Artillery Fire Control Officer, working closely with the U.S. Secret Service, the U.S. Air Force, and the FAA to provide air defense coverage of our nations capital. He is currently a Major in the Florida Army National Guard.

ix

About the Technical Editors


Mark Gerhard is a 3ds Max guru. He is currently employed by TurboSquid, as Director of the Artist Division. He has worked with 3ds Max since its inception as 3D Studio in 1990 and was one of the first artists hired to test the software while collaborating with the original development team including Gary Yost, Tom Hudson, and Dan Silva. He was one of the first 3D Studio instructors, training most of the original resellers and educators around the world. While working for Autodesk, he served as product manager for the 2D Animation program, Animator Studio, and was one of the first Autodesk Application Engineers devoted to 3ds Max. He spent six years as a Senior Technical Writer, and was the lead writer for the 3ds Max tutorials for versions 3 through 6. In addition to his work at Autodesk, he has been a technical editor for numerous books on 3ds Max including the Inside 3ds Max series for New Riders, the Mastering Visually series for Wiley/ Sybex and each architectural visualization book by 3DATS. He has authored chapters in books on 3ds Max, including Focal Press Foundation series, Learning 3ds Max 2008. Along with Jeffery M. Harper, he is co-author of the official Autodesk Certification guide, Mastering 3ds Max Design 2011. He holds a degree in painting and sculpture from UC Berkeley and has worked in the field of design visualization, graphic design, and commercial art for over 30 years. He has taught countless individuals 3d animation at institutions such as Napa Valley College, Santa Rosa Junior College, Academy of Art University, and Sonoma State University. He is also the author of the childrens book, The Elf of the Shelf Sees Himself (Push Press, 1983). He lives in California with his wife Rhonda, the joy of his existence for the last 26 years. He has four delightful children and two grandsons. Michele Bousquet is an Autodesk Certified Instructor who has been using 3ds Max since its first beta version in 1990. After several years in the international production environment (including a stint at the Australian Broadcasting Corporation), Michele went solo and settled into regional television in New England. Her animation work has led to numerous awards, the most recent a Bronze Remi at the 40th Annual Worldfest Film & Video Festival. Michele, who has authored more than 20 books on 3ds Max, is currently employed at TurboSquid.com.

xi

x i i A b o u t t h e Te c h n i c a l E d i t o r s Padhia Avocado Romaniello is an artist who had the fantastic fortune of stumbling upon the 3d world in 1997. Although originally starting off in character modeling & animation using Maya, she has worked for the last several years in architectural visualization using 3ds Max and V-Ray. In 2001 she founded Avocado Digital Design Inc., and has worked on the 3d production, branding, web design, and collateral materials of many projects across the U.S. and abroad. Seeking to improve her 3d skills, she completed some advanced training with Brian Smith and later formed a partnership with 3DAS and 3DATS. Padhia just recently relocated to Hollywood, CA to work as a 3d artist in the film industry. Alex Gorbunov began using 3d Studio for the first time in 1996 when he started his degree at the National University of Shipbuilding in Nikolaev, Ukraine. At that time, it was 3D Studio 4 for DOS. He was immediately fascinated with 3D graphics and decided that it would be his lifelong hobby. After finishing his education in 2001, he turned his hobby into a small business and began a freelancing career by producing small visualizations for companies all over the world. Concentrating mostly on interior scenes, Alex noticed an ever increasing demand for custom 3D furniture and accessories. As more time passed, he found himself more and more interested in the creation of furniture and invested a great deal of personal time honing his craft. In 2005, he moved to Tampa, FL. Soon after, Alex took his work to the next level and founded Intero Visuals (www.interovisuals.com), a company dedicated to the creation of fine 3D furniture and accessories. After a few years of successful friendship with 3DATS he decided to join the team on a full-time basis, currently assuming a V.P. position at 3DATS LLC. While constantly improving his own modeling skills, he also recently discovered a new passion for teaching 3D modeling to others, enjoys making training materials in form of Video tutorials, and also teaches a two day modeling class at CGschool.

Acknowledgments
T hanks To a lex T he g reaT g orbunov for his technical editing contributions and more importantly, for translating this entire book from non-Communist Russian, into readable English. , ! Thanks to Mark Gerhard and Michele Bousquet for knowing how to write and teach 3ds Max not an easy combination to find. Thanks to our other great editor Padhia Romaniello for coming to our rescue and shouldering some of the burden on this massive project. Thanks to our catch-all English guru, Kelly Winquist, for serving as the last line of defense to any errors in our English. Thanks to Dina Quan for once again saving the day, week, month, year, etc. by single-handedly taking on the role of compositor and being at our beck and call. Thanks to all the 3D software and hardware producers mentioned in this book for producing great products, without which all of our jobs would be much more difficult. 3DATS

xiii

Foreword
w hen b rian s miTh aT 3daTs asked me To work as a T echnical e diTor on this book, I took it on as an opportunity to see what other users were doing with 3ds Max. Ive been using 3ds Max and its predecessor, 3D Studio, for over 20 years and have even written books on them myself, but Im always up for learning a new trick or two from other users. What I didnt expect was to find such a wealth of information on 3ds Maxs tools, both familiar and new. The authors of this book use the basic functions where appropriate, but also tap into the vast power of 3ds Max in ways Id never seen before. For example, Id never considered using the Morpher modifier to assist in texturing a complex object, but the method described in Chapter 3 immediately made perfect sense to me. Even for new users, the technique is described thoroughly enough to use it on the exercise in the book, and to put a new tool in your toolbox that even experienced users might not have. The concept of doing one project throughout an entire book is ambitious. Its been attempted before in other books, but rarely has the final project contained so many diverse elementsflowing water, grass, dirt, ivy, stone, and mountains, just to name a fewand covered so many tools. I found the use of plug-ins particularly enlightening. Many of the plug-ins described in this book are free, and will save you immense amounts of time in your workflow. The free Ivy Generator plug-in used in Chapter 1, for example, creates a series of clustered branches for ivy. Anytime you need to create a dense group of randomly placed splines for any project, this program can save you from the timeconsuming task of drawing them all by hand. Equally fascinating was the use of Photoshop for post production. Rendering out elements in 3ds Max isnt new; power users have long been rendering out separate elements of the scene like shadows, highlights, and Z-depth, and using them to do touch-up work in Photoshop and After Effects. But the authors of this book have taken this practice to a new level, even rendering out wireframe colors so you can easily select the area taken up by individual scene objects while in Photoshop. The descriptions of the advanced use of the Levels and Color Correction tools in Photoshop alone will give you what you need to take your renderings from commonplace to stunning. Though many of the exercises in this book are quite dense, with many steps and a lot of new information, I found myself excited to look at each chapter and see what surprises it held. Even if you dont go through every single step of every exercise, you can gain a wealth of information just by reading through an exercise and seeing the tools used and the result obtained. Much of this information isnt available anywhere else, not in tutorials on the Web or in other books or DVDs. I hope you enjoy this unique book and take advantage of all it has to offer. Personally, its been a great learning experience for me. Michele Bousquet

xv

Frequently Asked Questions

What is this book?


We believe this book to be, by far, the most comprehensive guide to completing a 3D project ever produced and we commissioned one of the best, and most respected 3D firms in the world, cat-apult, to help write this one of a kind book. Just a quick peek at their gallery of sample work at the back of this book will give you an idea of just how talented these artists are.

Why did we write this book?


Unlike all of our other titles, the idea for this book did not originate with 3DATS. Since we started publishing in 2006, we have received an incredible number of requests from 3ds Max users at all skill levels suggesting that we create a book that illustrates the process of creating a 3D project step-bystep from start to finish. As a result of these requests, we are pleased to publish our fifth book, 3ds Max 2011 One Project from Start to Finish.

Why this project?


When we first started this book, the intent was to show in great detail, each step of the production process as applied to one very unique award-winning 3D project from cat-a-pults portfolio. Soon after the writing process began, we realized that writing a book about the selected project would not be very practical, because like most projects, the selected project required so many of the same steps and techniques to be utilized over and over, and the result would be a boring, repetitive book with limited coverage of all the tools and techniques that one might find useful in a variety of different 3D projects. Furthermore, describing the production process through a past project would limit the instruction to the many project constraints and artistic limitations imposed by the developer and the project budget. With this in mind, cat-a-pult set out to develop, from scratch, a new project that would be designed in a way that would give them maximum artistic creativity and maximize their ability to teach effective techniques without useless redundancy. We wanted a scene that utilized as many techniques and features as possible, even if those techniques and features might not provide the absolute quickest path to completion. So in some cases, the artists elected to describe an alternative technique or feature that might be the optimal choice for another project or situation, but was left out of a particular chapter because it was already discussed in another chapter.

How are the exercises written?


Even with this unique project that cat-a-pult developed, and even with the most efficient production techniques utilized, we estimate that there would be literally several hundreds of thousands of individual clicks of the mouse or buttons pressed on the keyboard. An adequate description of these steps could fill volumes and take months to read. Therefore, we deemed it absolutely critical to describe the production process in a way that didnt waste the readers time by describing each and every single click of the mouse or press of the keyboard. xvii

xviii Frequently Asked Questions Whenever we got to a point where we believed that a focused reader who had completed all previous exercises could understand a general set of instructions, we avoided unnecessary steps and generalized the set of steps in question. To minimize the chance that a reader would be unable to follow along with the instruction, we saved many versions of each exercise at different points along the way, so that readers could refer to the completed exercises and figure out what went wrong in their own scene.

Who is this book for?


This book was very carefully designed to be useful for readers at all skill levels. From years of instruction, we have learned that the most difficult part of teaching any 3D software is teaching at the appropriate skill level. We did not want to write a book that quickly went over the heads of new users, yet we did not want to bore veteran users. Therefore, we wrote the exercises so that, in most cases, they start off very detailed and as the exercises progress, the instruction becomes less detailed for features that were already explained once before or features that are so basic they require no detailed instruction. The material is presented in a way that is engaging for advanced users and explicatory enough for beginners. For example, during an exercise to loft a wall, the instructions will tell the user the path where the Loft feature can be found and the exact button and settings that will need to be clicked, but it will not spend valuable time explaining all the remaining settings not used and all of the additional considerations with the Loft that are explained in our other books. However, important considerations will be mentioned at times (at least during the first use of a feature), even if the same material is highlighted in a previous book.

What additional software is covered and why?


We believe that plugins and third party programs are an incredibly useful part of any major 3D project. As such, we decided to allow cat-a-pult to utilize all of the software that they would normally utilize in this project if it were created for a real client. With the exception of just one plugin, all of the software utilized in this book is available for download as fully working versions. The location where this software can be downloaded is provided during the first mention of its use. The following is a list of all the additional software and plugins covered in this book: V-Ray Photoshop CS3 IvyGenerator Mudbox 2011 UV-layout Glu3D Vue 8 FumeFX After Effects ReelSmart Motion Blur

Frequently Asked Questions xix

Why V-Ray?
This book will incorporate the use of V-Ray in many exercises. Simply stated, it would not be possible to complete material, lighting, and rendering techniques without covering the use of an advanced render engine. Despite mental ray being native to 3ds Max, there is no denying that V-Ray enjoys the largest user base between all of the major render engines. We could not ignore this fact, and the fact that we included many other third party plugins. Therefore, we decided to include the use of V-Ray in the exercises. We do not believe that the use of V-Ray in this book will prevent the users of other render engines from being able to complete the exercises. We have minimized the explanation of the V-Ray commands utilized to that which is needed to understand the overall techniques described. The vast majority of the principles and techniques covered in this book can be applied to any render engine. Many of the features found in V-Ray appear in other render engines under different names, such as color mapping, which is V-Rays version of exposure control. In other features, the names of many settings will even be iden tical, such as the many real world settings found on the VRayPhysicalCamera, like shutter speed and focal length. We would like to mention that while cat-a-pult is an amazing group of talent, we (3DATS) have slightly differing views on what would be optimal V-Ray settings. Since we are in the business of both production and education, we have always strived to build our scenes in the most efficient ways possible. Where cat-a-pult might be satisfied in using less adaptive settings (i.e., more Brute Force) at the risk of longer render times, we always attempt to use the lowest quality settings that we can get away with without inducing a loss of quality. Therefore, we felt it appropriate to include a summary of our (3DATS) critical V-Ray settings as a way for you to compare two different views of the most important V-Ray settings discussed in this book. This 13-page summary was taken from our Intermediate to Advanced book and can be found as an Appendix at the back of this book.

Why arent specific units used in the scenes?


Although most users, including ourselves, would use a specific type of unit setup for their projects, we elected to use generic units throughout the book to minimize confusion for readers not familiar with each major type.

Technical Considerations

Downloadable Files
All of the files for this book are available for download at www.3dats.com/books.

3ds Max Versions


Production for this book began in November of 2009, when many artists, including those at cat-apult, were still using 3ds Max 2009. During the course of production, they upgraded to 2010 and most recently 2011. When they deemed it necessary, the artists updated exercises that they thought were essential to be illustrated with 2010 or 2011. This is why a mixture of 2009, 2010, and 2011 screenshots can be seen throughout the book. All of the scene files have been saved for 3ds Max 2010, even those files that were modified for 2011. As you may or may not know, for the first time in its history, 3ds Max 2011 is backwards compatible with an earlier version 3ds Max 2010. For this reason, some scenes may have been modified in 2011, yet still saved in 2010. Regardless, at least 95% of the exercises in this book can be applied to 3ds Max 2009.

V-Ray Versions
Like any other software, V-Ray is continually updated with newer versions and service packs. If a file is opened and a message appears indicating that the current file was created with an older version of V-Ray, you will be asked if you want to convert the files settings to the newer version of V-Ray. In most cases, you will never notice any change in the final product; however, we recommend selecting No when asked, so that the settings saved produce the same rendered result that was intended by the authors.

Scene Complexity
Strictly speaking, the project constructed in this book is quite large, in terms of resources consumed. For many of the exercises, the reader needs nothing more than a low end workstation with 2GB of RAM. However, some scenes will be difficult to work with and render with anything less than 8GB RAM, and at least a mid-range processor and graphics card. Many of the exercises direct the reader to use settings that would put a strain on most workstations; however, we have identified the situations when using lesser values might be necessary for less powerful machines to render. In those cases, we have made recommendations on how to achieve suitable results without causing a system crash. The maps used during the creation of this project are very high resolution, with some over 8000 pixels in the smallest dimension. As you may know, large maps can consume immense amounts of RAM, usually equivalent to their uncompressed versions. Therefore, for those with less powerful workstations, we have included a smaller version of the high resolution maps so that no map is larger than 2000 pixels in any dimension. If at any time you are unable to render a scene, we suggest remapping a lower resolution version of all the high resolution maps used. xxi

x x i i Te c h n i c a l C o n s i d e r a t i o n s

From Russian with Love!


Each chapter of this book was written by the five authors of cat-a-pult in their native language of Russian. This allowed them to focus on the quality of the instruction and not worry about the quality of English translation. Thanks to our own in-house Russian speaking 3ds Max guru Alex Gorbunov, who grew up in Ukraine not far from cat-a-pult, we had the means to translate the original text without anything being lost in translation. However, since only one of the five cat-a-pult artists speaks solid English, editing the book was a bit of a challenge, to put it mildly. Every edit that went between 3DATS and cat-a-pult had to first be translated to or from Russian by Alex, and a quick peek at the following editing cycle provides a small indication of how busy he was during this production.

The Editing Cycle


We thought that the editing process of our Advanced to Expert book, a book with 20 different authors and 20 different technical reviewers, was difficult. Compared to this book, that was walk in the park. Because of the extremely sophisticated nature of the material presented, and the fact that the authors were only able to communicate through our translator, the task of editing this book was well, see for yourself. We thought some would find the process of how this book was edited somewhat interesting, if not astounding. AU = Author (cat-a-pult) TR = Translator (Alex Gorbunov) LE = Language Editor (Michele Bousquet) 1T = 1 st Tech. Editor (Mark Gerhard) 2T = 2 nd Tech. Editor (Brian Smith) EP = Exercise Proofer (Padhia Romaniello) CO = Compositor (Dina Quan) PR = Proofreader (Kelly Winquist) PM = Project Manager (Brian Smith) PT = Printer The flow chart below shows the best case scenario for a chapter that wasnt complicated by production irregularities. In actuality, no chapter made it through this entire process without additional intervention. AU TR LE 1T TR AU TR 1T 2T TR AU TR 2T EP TR AU TR EP PM CO PM PR CO PM PT

Tutorial and Layout conventions


The editorial team of this book made every effort to translate and edit each chapter of this book in a way that improved on the communication of the writing while still being true to the authors style. To keep this book as clear and easy to follow as possible, the following text convention is used throughout: Bold text is used to draw your attention to commands or actions to be executed during an exercise or for the first appearance of important features or concepts .

Te c h n i c a l C o n s i d e r a t i o n s x x i i i

Final thought!
Try to remember that your goal during the exercises should not be to mimic exactly what you see in the sample illustrations, as that would usually be unnecessary and a waste of time. Even if any of the authors tried to duplicate their own original work exactly, it would not be possible as many steps require a freehand approach that could never be precisely replicated. Whats important is that you understand what is going on and that you achieve at least somewhat similar results. The ultimate goal of the book is to transfer knowledge of as many features and procedures as possible while showing how to create one amazing 3D project. We are completely confident that readers of all skill levels will agree that this book meets its goal.

Try not! Do or do not! There is no try! Master Yoda

Chapter 1

2D to 3D Modeling

T he purpose of This chapTer is to provide an overview of some effective modeling techniques using primitives, shapes, and compound objects as an alternative to polygonal modeling. 2D to 3D modeling is generally much faster than polygonal modeling. When your project deadline is too tight for detailed development of models, primitives and compound objects are an excellent choice. These faster modeling techniques are also appropriate for rough scene blocking and animatics, and in cases where objects are far from the camera and dont require a great level of detail. With polygonal modeling, which we will cover in the next chapter, the final result looks more detailed and accurate, but the time needed to create and texture such models is much longer than with objects created from shapes, primitives, or compound objects.

Telescope
In this part of this chapter, we will model the stylized telescope shown in Figure 1-1.

Figure 1-1. The stylized telescope modeled in this exercise

1-2 2D to 3D Modeling

Exercise 1: Telescope modeling


First lets break this object down into individual pieces, as this will help us understand its structure and choose the right modeling method for each piece. Lets start with the scope. It has a cylindrical shape and can be created as a Lathe object. 1. Reset 3ds Max. 2. In the Front view, draw a spline that looks similar to the following illustration, (overall dimensions 23x8 units). Hold down Shift to constrain the creation of segments along one axis. To round the corners and match the curve shown below, go into the vertex sub-object mode of the Editable Spline and under the Geometry rollout, use the Fillet tool.

3. Using the View Coordinate system, mirror this spline along the X-axis as a Copy. 4. Use Endpoint snaps to position the ends of both splines together as shown in the following illustration. 5. Use the Attach command in the Modify panel to attach both splines together and use the Weld command to weld their endpoints. You can then remove this vertex.

2D to 3D Modeling 1-3
6. Apply the Lathe modifier with the rotation direction along the X-axis. 7. Open the Lathe modifier and move its gizmo along the Y-axis so that the resulting object looks similar to the following illustration. Note: Whenever a step in this book directs a modifier to be opened, click the + symbol next to the name of the modifier in the modifier stack.

8. Set Segments to 16. If the objects normals appear to be flipped, check the Flip Normals checkbox. 9. Apply the Cap Holes modifier to close the openings at the ends of the object. 10. Create a new line in the Left view that looks similar to the left image in the following illustration, while using the right image as a guide for its size. This will be the profile for the eyepiece.

Note how the spline starts at the top end (the yellow vertex is the first vertex). Make sure your spline starts at the top as well. Otherwise, the Bevel Profile modifier, which we will use next, wont work as expected. 11. If you accidentally started the spline at the other end, select the top vertex and use the Make First tool (within the Edit Spline modifier) to make the spline start from there. 12. Create a Rectangle with the following parameters: Length = 7.6, Width = 16.0, Corner Radius = 3.5. 13. Apply a Bevel Profile modifier to the rectangle, and pick the curved spline you just created.

1-4 2D to 3D Modeling 14. Select the profile gizmo and rotate it 90 degrees about the Z-axis to create the geometry. Move the new eyepiece to the scope as shown in the following illustration.

Now, lets model the telescopes tube. 15. First, make a straight horizontal line approximately centered on the scope, as shown in the following illustration. This will serve only as an alignment tool. 16. Create a tube profile similar to the one shown in the following illustration, using the Fillet tool to get the result shown.

17. Apply a Lathe modifier to the tubes profile spline, set Direction to X, open the modifier, and move the modifiers gizmo so that its aligned with the straight line.

2D to 3D Modeling 1-5
18. Set Segments to 32, and enable the Weld Core option, flip normals if needed. 19. Bend the object by applying a Bend modifier with the following parameters: Angle = -15, Direction = 90, Bend Axis = X, apply Limit Effect check-box and set Upper Limit = 100, Lower Limit = 0.

20. Open the Bend modifier, and move the modifiers Center to the narrow end of the pipe, as shown in the following illustration.

21. Position the tube so it is attached to the center of the scope unit, as shown in the following illustration.

1-6 2D to 3D Modeling Now lets model the telescopes feet. 22. Go to the Left view and create a closed spline 70 units tall, as shown in the following illustration.

23. Create a Rectangle with the following parameters: Length = 1.5, Width = 3.0, Corner Radius = 0.75. 24. Convert it to an Editable Spline and delete some of its segments so the remaining shape looks like the following illustration. This spline represents the foot objects profile.

25. Select the closed spline that we created a moment ago, and apply the Bevel Profile modifier to it. As a profile, pick the open rectangle shape from the previous step. 26. Open the Bevel Profile modifier, and rotate its gizmo 90 degrees and move it so the resulting model looks like the following illustration.

2D to 3D Modeling 1-7

27. Go to the Front view and apply the Taper modifier to this object.

28. Open the modifier and in the Front view move its Center to the Top/right corner of the model. Set the parameters to Amount = -2, Primary = Y, Effect = Z. 29. In the Front view, rotate the model 10 degrees around the Z-axis. Apply a Taper modifier again, and set Amount = 0.02. Shift the Taper modifiers center up and to the left in the front view until the model resembles the following illustration. 30. Use the Mirror tool from the Main toolbar to mirror this object, and choose Instance as the mirror method. Position the two supporting foot objects as shown in the following illustration.

1-8 2D to 3D Modeling Now, lets model a step ring where the observers will stand. Because the step has a different thickness in different places, we will create it as a Loft object. 31. Go to a Top view and create a circle with Radius = 32.2 centered on the other objects that make up the telescope. 32. Create a Rectangle with following parameters: Length = 15, Width = 5, Corner Radius = 0.6, and then create a second rectangle with following parameters: Length = 5.5, Width = 3, Corner Radius = 0.6.

The larger rectangle will be used as the section of the step at its widest point (where an observer would stand), while the smaller rectangle will be the narrowest section attached to the telescope base. Because the fillet radius has to be the same at all places on the step, we needed the Corner Radius of both rectangles to be the same. 33. Select the circle, collapse to Editable Spline, and from the Command Panel choose Create Compound Object Loft. This shape will be automatically assigned as the Path of the loft object. 34. Click the Get Shape button and pick the larger rectangle. On the Skin Parameters rollout set Shape Steps to 0 and Path Steps to 6.

The red circle in the left image in the following illustration shows the place where 3ds Max automatically places the start and end of the path that the Loft compound object uses to generate the geometry. To make twisting the step object easier, well move this start/end point. 35. Rotate the loft 90 degrees about the Z-axis so the start/end of the path is at the top, as shown in the right image of the following illustration.

Now lets edit the loft object to change its size and twist it along the loft. To do this, we need to add an additional shape along the loft. 36. Open the loft object and select Shape in the modifier stack. 37. Locate the shape at the beginning of the path, and click it to select it (it will turn red when selected). Rotate the shape by 90 degrees about Z axis, which will cause the loft object to be flatter, like a step. Now, we will add the smaller rectangle to the loft at the opposite end of the step. 38. Click on Shape in the modifier stack to close the loft and return to the base level of the loft.

2D to 3D Modeling 1-9
39. In the Loft objects Path parameters, set Path to 50 (which is 50% of the entire path). You will see the small x-shaped path marker move to 50% along the path, to the opposite side of the step. 40. Click the Get Shape button and click on the smaller rectangle. The loft object changes in the place where the step is to be connected to the telescope base, and gets back to its original state where an observer will stand. Refer to the following illustration.

41. Edit the Path sub-object of the Loft object if needed in order to make the step curvature better suited to the telescope. 42. At the Vertex sub-object level within the Edit Spline modifier (below the Path level), you can move the paths vertices directly.

43. If needed, select each Shape at the sub-object level and adjust its rotation. You can also go to the Modify panel, and under the Deformations rollout, use the Twist option to twist the step further. 44. When the main geometry of the step object has been set up, go to the Loft objects Skin Parameters rollout and turn off Adaptive Path Steps to optimize the object.

45. Add a TurboSmooth modifier to the object and set Iterations = 2. 46. Move and rotate the step so that it is similar to the step shown in Figure 1-1. This completes the modeling of the step object.

1-10 2D to 3D Modeling 47. Using splines with rendering enabled and/or Standard Primitives, model the target at the top of the eyesight unit, as shown in the following illustration.

48. Group all objects related to the telescope with Group menu Group. 49. Save your work. You can compare your results to Ch01-01.max.

2D to 3D Modeling 1-11

Exercise 2: Telescope materials


Now lets create and assign materials to the telescope. There will be only two materials: Metal (telescope body) and Glass (telescope lens). Lets start with the metal material. 1. Continue with your saved scene from the previous exercise or open the file Ch01-01.max to continue with the scene already prepared up to this point. 2. Choose any empty slot in the Material Editor and change the material type to VRayMtl. Name this material Telescope Metal. 3. In the Maps rollout, assign a VrayDirt map to the Diffuse slot. In the VrayDirt maps parameters, set Radius = 20, Unoccluded Color = R=93, G=80, B=70. 4. Place a Composite map in the Reflect slot of the Maps rollout. For the first layer of the Composite map, assign a Falloff map with Metal_Telescope.jpg assigned in the top slot of the Front:Side group, and change the color of the bottom parameter to R=255, G=255, B=195. 5. Add a second layer to the Composite map and assign a VRayDirt map with Radius = 20 to the layers texture slot. Change the layers blending mode to Multiply. 6. Go back to the materials Maps rollout at its base level, and place Metal_Telescope.jpg into the Bump slot with Amount = 10. 7. Apply the material to the entire telescope group. Now well create a glass material. 8. Select an empty sample slot in the Material Editor and change the material type to VRayMtl. Name this material Glass. Set the Diffuse color to R=52, G=76, B=113. 9. Go to the Maps rollout and assign a Falloff map in the Reflect channel, and assign a Noise map to the top parameter of Front:Side group. Use the following parameters for the Noise map: Noise Type = Fractal and Size = 8. Go back to the Falloff map and change the color of the bottom parameter of the Front:Side group to R=52, G=76, B=113. In the Mix Curve group, lower the right vertex by about 25%.

10. Open the group, apply an Edit Mesh modifier to the telescope tube, and at the Polygon subobject level select all polygons that represent the lens and apply the Glass material to them. 11. Exit from the Polygon sub-object level of the Edit Mesh modifier. In the Material Editor, choose an empty slot and click the Pick Material from Object button, then click the telescope. The new Multi/Sub-Object material you have just created appears in the material slot. By assigning two different materials to two different sets of polygons, you have automatically created a Multi/Sub-Object material assigned to polygons with different Material IDs. You will use this concept to create a Multi/Sub-Object material later in this chapter.

1-12 2D to 3D Modeling 12. Save the telescope. You can find a finished version of this model in the file Ch01-02.max. With appropriate lighting and rendering, the telescope would look similar to Figure 1-1.

Country Fence
In this set of exercises, well use a variety of modeling techniques to create a rough-looking country fence, as shown in Figure 1-2.

Figure 1-2. Reference image for fence

2D to 3D Modeling 1-13
To choose the best modeling techniques, lets analyze the reference image. In the illustration we see that the fence is made from slightly bent vertical posts and horizontal bars. The objects will need to have a few segments along their lengths and the widths so we can give them curvature and make them look rough and natural. We want the number of segments to be adjustable so we can change it as needed during the modeling process. Lets break down the fence modeling process into a few specific steps: Vertical posts modeling Modeling of horizontal bars that connect vertical posts Editing UVW coordinates and assigning materials

Exercise 3: Fence modeling


To create the fence posts, we will first create a single post object using the primitive ChamferBox. Then we will create multiple clones of the post and place them over the perimeter of the territory. To make each post look unique, we will use the Noise modifier. 1. Reset 3ds Max. 2. Set the system units to Generic Units. 3. In the Top View, create a ChamferBox with parameters shown in the left image of the following illustration. Switch to a Perspective view to visually confirm the look of the object. It should look similar to the one in the right image. Turn on Edged Faces (F4), if necessary, so you can see the face edges.

4. Apply the Edit Poly modifier to this object. 5. In Polygon sub-object mode, select and delete the bottom polygons, as shown in the following illustration. We wont see these polygons in the final image so we can optimize the model by deleting them.

1-14 2D to 3D Modeling 6. Apply the Noise modifier to this object using parameters from the following illustration.

7. Clone the post model 9 times (Edit menu Clone) using the Copy option and spread the clones out similar to the posts shown in Figure 1-2. There should be 10 posts total.

8. For each copy of the post, change the Seed parameter in the Noise modifier to a unique number. This will make the deformation of each post unique.

We have modeled and placed all posts, which allows us to judge the overall size of the fence. Now, lets model the horizontal bars that connect the vertical posts. For the horizontal bars, we will start modeling with splines and add Spline IK Control to provide control over their shape. Using the deformed splines, we will create the geometry for the horizontal bars with a Loft. Then we will add a Noise modifier to give the bars some random deformation. 9. Activate the Snaps Toggle button with Midpoint snaps. This will help you snap to the middle of the edges at the top of the vertical post models. 10. Create lines connecting all of the vertical posts with each other. Make a new line to connect each pair of posts; do not create one continuous line that goes through all posts. 11. Go to the Perspective view, select all of the splines that connect vertical posts, and copy them down along the Z-axis so you create a second row of horizontal bars. If you want to follow the reference image more closely, delete the bottom set of lines where you see the bars missing in Figure 1-2.

2D to 3D Modeling 1-15
Lets create additional controllers for the splines. 12. Assign a Spline IK Control modifier to each line individually. For each spline, check No Linking in the Link Types group, then click the Create Helpers button. Two lines will appear in the Control Object list: Knot# 1 Point01 and Knot# 2 Point02, as shown in the following illustration. You will also see in the scene that two new objects are at each end of the spline (right side of the following illustration).

13. For each Point Helper object, use the Select and Link tool in the Main toolbar to link each one to the vertical post to which it is connected. To use the tool, click and drag from the helper to the post. If you move a post, you will see how the splines that are attached to it follow along with the movement. Now, we need to add volume to the splines using the Loft compound object.

14. Create a Rectangle with the following parameters: Length = 10, Width = 5, Corner Radius = 0.5. In the Interpolation rollout, set Steps = 1 and turn on the Optimize option. We set this specific size because we want our horizontal bar object to be slightly narrower than the vertical post. 15. Select one horizontal spline that connects two vertical posts, and create a Loft object with the rectangle as the shape along the path. In the Loft objects Skin Parameters, turn off Cap Start and Cap End, set Path Steps = 5, Shape Steps = 1, and turn on Optimize Shapes. 16. Repeat this procedure for all the other horizontal splines that connect vertical bars. Keep all parameters the same except the Path Steps parameter, which needs to be higher for longer paths so all the segments on the horizontal bars are about the same length. 17. Select all the upper horizontal bars, and assign a Noise modifier to all of them at once with the following parameters: Seed = 0, Scale = 100, Strength: X = 10, Y = 10, Z = 15.

1-16 2D to 3D Modeling 18. Assign another Noise modifier to the lower row of horizontal bars and set a different Seed value so that the deformation of the lower bars looks different from the deformation of the upper bars. 19. Adjust the local position of each Point Helper in relation to the vertical post to which it is linked, so that each horizontal bar is connected to the vertical post at the proper place.

20. Save the scene. You can find the finished fence model in the file Ch01-03.max. We have finished the modeling of the fence. Now we need to apply materials to it and adjust mapping coordinates as needed.

Exercise 4: Fence material


1. Continue with your saved scene from the previous exercise or open the file Ch01-03.max to continue with the scene already prepared up to this point. 2. Create a Standard material with Old_Wood.jpg in the Diffuse Color channel. For the Old_Wood.jpg map on the Coordinates rollout in the Angle group set W:90.0. Assign this material to all fence objects. Turn on Show Map in Viewport.

In shaded viewports, we can see that the texture looks distorted on the objects. We need to fix that by correcting the mapping coordinates. 3. Select the entire top row of the horizontal bars and apply the UVW Xform modifier to the entire selection. This modifier allows you to change just the U and V tiling but keep the existing map type as is. Set U Tile = 0.12 and keep the default values for the other parameters.

4. Select the lower row of horizontal bars and repeat the procedure, while also setting U Offset = 0.07. This will shift the texture along the U-axis of the texture space and thus make the texturing of the lower row of bars look different from the top. 5. If you want to further change the mapping of any one object without changing the others, you can select that object and in the Modify tab, select its UVW Xform modifier and click the Make Unique button. Then you can change the U Offset and V Offset parameters just for that object. Now lets adjust the size of the texturing of the vertical bars.

2D to 3D Modeling 1-17
6. Select all of the vertical bar objects and assign the Unwrap UVW modifier to the selection. 7. Click the Edit button within the modifier and in the Edit UVWs window, select all the vertices. 8. Use the Scale Horizontal tool to scale the selection down while watching the changes to the texture appearance in the viewport. Keep scaling the selection down until the size of the texture on the vertical posts looks proportionally correct in relation to the horizontal bars. 9. Using the Move Horizontal tool in the Edit UVWs window, shift the texture coordinates of each vertical post so that the texture looks different on each post. We have finished texturing the fence, and the model is now complete.

10. Save the scene. You can find the completed and textured fence in the file Ch01-04.max.

Outhouse
In this exercise, we will create a low-poly outhouse. We will use primitives and shapes to create this object as simply as possible.

Figure 1-3. The outhouse created in this exercise

1-18 2D to 3D Modeling The outhouse model consists of 4 parts: walls, roof, door, and stairs. Lets start with the walls. 1. Reset 3ds Max. 2. In the Perspective view, create a Box with the following parameters: Length = 70, Width = 70, Height = 140, Length Segs: 2, Width Segs: 1, Height Segs: 1. 3. Rename the object Outhouse Walls. 4. Assign a Taper modifier to the object, and use the following parameters: Amount = -0.5, Taper Axis = Primary:Y, Effect:Z, and turn on the Symmetry parameter.

Now, lets create the door opening. 5. In the Left view, create a Rectangle shape with the following parameters: Length = 70, Width = 40. 6. With the shape still selected, select the Align tool from the Main toolbar and pick Outhouse Walls as the Target object. In the Align Selection dialog box, enable X Position only and set the Pivot Point as the alignment method for both objects. Move the rectangle up along the Y-axis so that it matches the position of the doorway, as shown in the following illustration.

2D to 3D Modeling 1-19

7. Convert the shape into an Editable spline. 8. Select the two top vertices then apply the Fillet tool. Keep increasing the Fillet amount until the entire top part of the Editable Spline turns into an arch. After this operation there will be two coincident vertexes at the top of the arch; you will need to select those vertices and use the Weld command to weld them together. This arch will be the door opening contour.

1-20 2D to 3D Modeling 9. Select the Outhouse Walls object, go to the Command panel Create Compound Objects, and click the ShapeMerge button. 10. In the ShapeMerge objects parameters click the Pick Shape button and pick the door opening contour as an operand. Select Cookie Cutter in the Operation group. This will cut out the arch in the doorway using the arch shape.

Now we need to add thickness to this object: 11. Apply the Shell modifier to this object and use the following parameters: Inner Amount = 3, Outer Amount = 0, Edge Mapping = Interpolate. 12. In the Top view create a Circle with Radius = 3 and convert it into Editable Spline. In Spline subobject mode scale the whole spline down along the X axis so it looks like an ellipse, then in Segment sub-object mode delete the two left segments, leaving only half of the shape. Set the number of Interpolation steps to 2. 13. Select the object with the Shell modifier and in the Shell modifiers parameters, turn on the Bevel Edges parameter and pick the curved profile that we created in the previous step. The edges should make a convex shape. If this does not happen, you need to select the Spline sub-object of profile that we created in the previous step and click Reverse under its Geometry settings, so that the edges of the Outhouse Walls object are convex.

2D to 3D Modeling 1-21
14. Go to the Top view and create a ChamferBox with the following parameters: Length = 70, Width = 105, Height = 5.0, Fillet = 0.5. This object will be one step of the stairs and the floor of the outhouse. Place it just below the door opening. 15. Go to the Front view and create a ChamferBox with the following parameters: Length = 40, Width = 16, Height = 3.0, Fillet = 0.5. 16. Apply a Skew modifier to this object, using the following parameters: Amount = 22, Skew Axis:Y. This will be one side support for the staircase. Position it as required (see the illustration that follows).

17. Copy and move this object to create a second side support for the staircase, as shown in the following illustration. 18. In the Top view, create another ChamferBox object with the following parameters: Length = 25, Width = 13, Height = 2, Fillet 0.5, Length segments = 5. This will be one of the steps. 19. Copy the object to create an additional step for the staircase and place the two steps as shown in the following illustration.

1-22 2D to 3D Modeling Now lets create the door. For this we will need the door opening profile that we created previously. 20. Select the Outhouse Walls object and from the Command Panel select ShapeMerge. 21. In the Parameters rollout, under the Operands list, select (Shape1), set the radio button to Copy, and click the Extract Operand button. This will create a new shape object. Lets modify the top of this shape so it looks more like the door from the reference image. 22. In Vertex sub-object mode, use the Refine tool to add two additional vertices on both sides of top-center vertex. 23. Right-click in the active view and change their type to Bezier Corner. Move them down slightly, and adjust the Bezier control handles to create a shape similar to following illustration.

24. Click the Create Line button, and at the top of the shape, create a line that resembles half of a heart.

25. In Spline sub-object mode, use the Mirror tool to create the other half of the heart, and weld the vertices to create a closed spline. 26. Apply the Bevel Profile modifier to this object, and use as a profile the same spline that you used to create the edges of the Outhouse Walls object. If the resulting object looks too thick or thin, scale the Bevel Profile modifiers gizmo. If the resulting shape looks odd due to incorrect beveling direction, rotate the modifiers gizmo about Z and X axes until it looks right.

2D to 3D Modeling 1-23
27. Apply a UVW Map modifier to this object with the Box mapping type.

28. Position the objects pivot point at its left edge. Rotate the door -90 degrees about Z axis. Now lets model the hinges that hold the door in place. 29. Create a spline similar to the one shown in the following illustration, approximately 8 units tall and 2 units wide..

30. Apply a Lathe modifier to this spline, set Segments = 16 and turn on Weld Core. Ensure that the lathe axis is at the far right edge of the spline. 31. Create a Rectangle shape with the following parameters: Length=5.0, Width=7.0, and Corner Radius = 0.5 and position it behind the hinge center that we modeled in the previous step. 32. Apply a Bevel modifier with following parameters: Level 1: 0.2, 0.0; Level 2: 0.2, 0.2. 33. Group the hinge center and Rectangle, and name the group Outhouse Door Hinge. Move this group to the place where a hinge would be on the upper part of the door. Copy this group to create another hinge and position it at the lower side of the door. 34. Position the door and hinges against the outhouse walls.

Lets create the roof using the spline modeling technique. Spline modeling is not used very often anymore because it has been almost completely replaced by other modeling techniques. However, spline modeling is still convenient for creating large smooth surfaces with a small number of control vertices.

1-24 2D to 3D Modeling 35. In the Front view, create a closed spline as shown in the following illustration. Its okay if the ends of this spline intersect the outhouse walls.

36. In the Left view, align this spline with the center of the outhouse, then make a copy of this spline. Scale it down slightly along the vertical axis, and position it at the center of the right slope of the roof. Then make another copy and position it at the end of the right slope of the roof. The following illustration shows how all 3 splines should look.

37. Attach all three splines together with the Attach tool.

38. Add the Cross Section modifier to create additional splines that will connect the three original splines. In the Spline Options group choose Bzier. 39. Apply the Edit Spline modifier and using its tools, such as Create Line, Divide, and CrossInsert, further refine this object to look similar to the following illustration.

2D to 3D Modeling 1-25

40. Weld and fuse all vertices as needed. Weld removes coincident vertices in the same segment and fuse moves coincident vertices in different segments to the same location. Make sure that all vertex types are set to Bezier, and all spline types are set to Curve. 41. Edit vertex positions and their Bezier control handles to give this object a smooth and curvy appearance.

42. When you finish adjusting the curvature of the splines and are happy with the result, apply an Edit Patch modifier. This will automatically generate the 3D surface for the roof. If the surface breaks in some places, then you need to increase the Generate Surface Threshold value or use the Fuse tool on vertices that are causing problems.

1-26 2D to 3D Modeling 43. Save your scene. If you would like to continue from this point with an already prepared scene, open Ch01-05.max. 44. Apply a UVW Unwrap modifier to this object. In Face sub-object mode of the Unwrap UVW modifier, select the faces that make up the top and click Quick Planar Map. Repeat this so that you have applied mapping to the top and the three sides. Dont worry about the underneath part, because it will not show in the rendering. If you have not already done so, click Edit under the Parameters roll-out to see the results. The roof UVs should now be separated into logical UV clusters similar to the left image of the following illustration. For convenience, rotate each part as shown in the right image.

45. Now we are going to stitch together all of the clusters using the Stitch tool. Select the edges of one of the clusters; the corresponding edges will be highlighted with blue color. Click Tools Stitch Selected, and on the pop-up window turn on Align Clusters, Scale Clusters, and set the Bias to 0.

46. Now select corresponding Bzier handles (to check which Bzier control handle corresponds to which, you can select one Bzier control handle, and its brother will be highlighted in blue) and press Ctrl+W or Tool Weld Selected. If the distance between the vertices is too high, increase the Weld Threshold parameter by clicking Options in the bottom of the Edit UVWs window.

2D to 3D Modeling 1-27

47. In order to better see the issues with mapping, create a material with the Roofing.jpg image as the Diffuse map, and apply it to this object.

48. Repeat this procedure until all of the clusters are welded together. Fix obvious errors in the mapping by moving vertices in the Edit UVWs window and manipulating them with Bzier control handles, thus allowing some parts of the model more texture space. To remove distortion you may need to manually move scrambled Bzier control handles so that they do not crisscross.

1-28 2D to 3D Modeling 49. When you have fixed the mapping coordinates and the texture layout looks good, apply the Symmetry modifier to create the other slope of the roof. 50. Apply the UVW Map modifier to the Outhouse Walls object, and set the type of mapping to Box. 51. To finish the texturing process, apply a material with the Old_Wood.jpg image as the Diffuse map to the wooden parts of the outhouse. Rotate and scale the mapping on different elements of the model to achieve better texture size and appearance.

The outhouse model is almost finished. The only thing left to do is add a few deep cracks to the wood. 52. In the Left view, create a few closed splines with sharp jagged edges, as shown in the following illustration.

2D to 3D Modeling 1-29
53. Apply an Extrude modifier with an extrusion amount greater than the thickness of the outhouse wall. In the Top view, position these objects so they penetrate the front walls, but not the back walls.

54. Select the Outhouse Walls object and create a ProBoolean compound object. Make sure that Operation is set to Subtraction, then click the Start Picking button and pick the jagged objects that you created in the previous step. This will subtract the cracks from the outhouse walls. 55. Convert Outhouse Walls to an Editable Mesh, then on Modify panel click the Attach button and attach all other objects in the scene that are made from the same material as it (door and stair). We want the topology to be made of small faces because we will add distortion to this object with the Noise modifier. 56. Add a Subdivide modifier to the Outhouse Walls, set Size = 12.0. This will even out the topology of the object so when we apply deformation to it there wont be any errors in the geometry. 57. Group all parts of the model. Apply a Noise modifier to the group, set the Strength parameter to X=3, Y=3, Z=4, and turn on the Fractal option.

58. Save the scene. You can find a finished version of the outhouse in the file Ch01-06.max. The outhouse model is finished and looks similar to the following illustration. For additional realism, try adding the Hair and Fur feature to the roof of the outhouse. With experimentation, you can achieve a look similar to Figure 1-3.

1-30 2D to 3D Modeling

Ivy
In this section, we will create a wall with clusters of ivy, as shown in Figure 1-4. The wall has a relatively large area, so it will be easier if we break it down into three zones. We will generate ivy vines for each zone separately, as shown at the right side of Figure 1-4.

Figure 1-4. Ivy rendering and zones

2D to 3D Modeling 1-31
Before we start making the ivy, we need to establish some basic rules about how we want it to look. Vines should be long, curvy objects that follow the surface of the wall. The leaf objects must have correct texture coordinates, which we should be able to adjust as needed. The root of each vine should be thicker than the tip. Vines need to grow in all directions, and the area of distribution should be limited by each of three zones that we defined in the previous illustration. To get optimal results, well use Thomas Lufts Ivy Generator application to generate the vines. This application is free and easy to use. You can find the link to download this application on the books website or from this link: http://graphics.uni-konstanz.de/~luft/ivy_generator/. After we create the vines, we will use 3ds Max to create the leaves.

Exercise 5: Vines
Before we can create the vines with the Ivy Generator application, we need an object over which to grow the vines. This geometry has been provided for you using the same modeling tools that have been discussed up to this point. 1. Open the file named Ch01-07.max. In this scene, you can find the wall geometry that we will use as the basic surface for ivy modeling. In order to simplify the work process, the surface of the wall is relatively low-poly. 2. Export the Front Wall object to a file in .OBJ format using the settings shown in the following illustration. Make sure you choose the Triangles option for the Faces setting, as the Ivy Generator requires a triangulated mesh. You can also use the file Wall.obj.

3. The Ivy Generator needs to be loaded separately from 3ds Max. After downloading the application, extract the archive contents and click the IvyGenerator application file to start it.

1-32 2D to 3D Modeling 4. Click Import obj+mlt and import the .OBJ file into IvyGenerator. If you cant see the object, click flip normals to make the geometry appear as shown in the following illustration.

5. Shift-drag to rotate the object so that its faade is facing you. You can also use Ctrl-drag to pan the object and right-click-drag to zoom in and out. Double-click the object near its base to indicate where you want the vine to start growing from. A green dot appears at that place, as shown in the following illustration.

2D to 3D Modeling 1-33
6. Set the parameters from the following illustration. The most important parameters are ivy size (essentially the growing speed), primary weight (how far the vine can offset from the main growing direction), and random weight (how random the offset can be). The major advantage of this utility is that you can control all the parameters interactively while the vines are being generated.

7. Click the grow button to start the ivy growing. The ivy branches will start generating in realtime. When the vines have grown enough and you like the result, click grow again to stop the vine-growing process. The result should be similar to the following illustration. If you want to start over, double-click to set a new starting point, and click grow again.

1-34 2D to 3D Modeling 8. In the birth group set ivy leaf size = 0 (because we do not need leaves in this case). Adjust the ivy branch size parameter until you are happy with the size and click the birth button to create the geometry. 9. Export the vine geometry into an .OBJ object by clicking export obj+mtl button, and import it into 3ds Max scene.. 10. You can find a version of this scene in the file Ch01-08.max that has the vines already imported.

Exercise 6: Leaf textures


In looking at reference images of ivy leaves, we see that they have a variety of colors and shading.

Figure 1-5. Ivy leaf reference images

2D to 3D Modeling 1-35
Besides green leaves, we can also see blue, lime-green, yellow, brown and red tones. To exaggerate the leaves for our rendering style, the texture needs to have veins and sharp, distinct edges. Lets use the leaf texture that comes with Ivy Generator application as a base, and edit it with Adobe Photoshop to suit our purposes. This texture has suitable shape and is also easy to edit.

Figure 1-6. Default Ivy Generator leaf texture

1. In Adobe Photoshop, open Ivy_Leaf_Start.jpg. 2. Right-click the Background layer, choose Layer from Background, and name the layer Green Leaf. Choose Layer menu Group From Layers and create a new group. Right-click the group in the Layers window, choose Group Properties, and rename the group to Green. 3. In the Green Leaf layer, select and delete the white background. To make the veins stand out more, well create a separate layer and group for the vein image.

4. Duplicate the Green Leaf layer and name the new layer Veins. In the Layers window, move this new layer outside the Green group. Create a new group for this image, and call the group Veins. Place this group above the Green group, and change the groups Blend Mode to Pass Through. 5. Right-click the Veins layer and choose Blending Options. Change the Blend Mode to Linear Light. This will increase the contrast between the veins and the green areas of the leaf, making it easier to select the veins.

Next, well create a black and white mask from the Veins layer, as shown in the following illustration. 6. Use any method to select the major veins and some of the minor ones, such as using the Magic Wand tool to select lighter areas. Then choose Layer menu Layer Mask Reveal Selection to apply the black and white mask to the Veins layer.

1-36 2D to 3D Modeling

7. To make the veins network look thicker, choose Layer menu New Adjustment Layer Levels. Turn on the Use Previous Layer to Create Clipping Mask option, and name the layer Levels Veins. Adjust the sliders to make the network of veins appear thicker.

Now lets add edges to the leaf. This will create a soft falloff from the main colors of the leaf to the edges. 8. Create a new layer called Border and put it in its own group named Border. Place this group at the top of the list, and change the groups Blend Mode to Pass Through. 9. Select the Green Leaf layer, then use Select menu Load Selection to load the selection Green Leaf Transparency. 10. Use Selection menu Modify Border with Width = 5 pixels to change the selection to encompass the leaf border. 11. On the Border layer, fill the selected area with a lime-green color. 12. Deactivate the selection (Ctrl+D), apply Filter menu Convert for Smart Filters, then apply Filter menu Blur Gaussian Blur. The goal is to get a layer that looks similar to the following illustration. Applying the Convert for Smart Filters command prior to applying any filter will allow you to adjust the filters settings later if needed..

2D to 3D Modeling 1-37
13. Add a Levels adjustment layer, with use previous layer to create clipping mask enabled, to the Border layer to make the layer more visible, and name the layer Levels Border. Adjust the sliders to make the border more recognizable. 14. Add a new layer filled with a dark-green color and place it at the bottom of the Layers window. Your layers should look like the following illustration. Compare your result with Ivy_Leaf.psd.

This way, you will get the desired look for appealing ivy leaves; veins are distinct and noticeable, and edges are outlined and visible. 15. In order to give the leaf texture color variations, you can use Image menu Adjustments Color Balance to change the color balance of the Green Leaf layer. You can also adjust the texture colors directly in 3ds Max by changing the Output parameters for the Diffuse map in the Material Editor. The leafs Opacity map can be made from the Green Leaf layer. 16. Duplicate the Green Leaf layer. With the new layer selected, select the Green Leaf Transparency selection, and fill the inside with white and the outside with black. This layer will serve as the opacity map for the leaf.

The file Ivy_Leaves.psd has all the necessary layers with all the color corrections for every color variation of the leaf.

Exercise 7: Leaf Modeling


Now lets create the model of the leaf. We will use a couple of the layers we just created to see how the leaf will lie on the vines. After the leaves are scattered across the vines, we will use all the layers we created to make a fuller and more interesting set of materials on the leaves.

1-38 2D to 3D Modeling 1. In 3ds Max, open the file Ch01-08.max. 2. Create a Plane in the Perspective viewport with the following parameters: Length = 20.0, Width = 20.0, Length Segs = 4, Width Segs = 4. Rename it Leaf. 3. Deform the object with the FFD 3x3x3 modifier. Use the Control Points sub-object to move the points and alter the FFD modifiers lattice, as shown in the following illustration.

4. Go to the Material Editor and create a material with the Ivy_Leaf-Green.jpg in the Diffuse slot, and Ivy_Leaf-Opacity.jpg placed in the Opacity slot. Make the opacity map visible in viewports, name this material Green Leaf, and assign it to the object Leaf. If the leaf texture appears to be mapped to the plane object in the wrong direction, fix that by setting W:180 in the Angle group of the Coordinates rollout for each texture you use in this material. 5. Position the pivot point of the Leaf object at a place where the leaf will be attached to the vines, as shown in the following illustration.

6. Convert this object into an Editable Poly.

2D to 3D Modeling 1-39

Exercise 8: Scatter leaves over vines


Now, we will distribute multiple copies of the Leaf object over the vines with the Scatter compound object. This is why the placement of the objects pivot point was so important; the Scatter compound object attaches source objects to the distribution object at their pivot points. Before we can do this, we must prepare the vines by detaching them into separate groupings of large, medium, and small leaves. 1. Continue from the previous exercise, select and detach elements of the vines that will have smaller leaf sizes, as shown in the following illustration, and name the detached object End Branch. Detach vines for medium leaves and name the object Middle Branch, and rename the remaining parts of the vines Base Branch.

1-40 2D to 3D Modeling 2. Rotate the Leaf object so it is oriented correctly to the surface of the wall. The stem should be nearly perpendicular to the wall, while the main part of the leaf should be nearly parallel to the wall. Refer to the following illustration.

3. Apply the Reset XForm utility (Utilities panel) to the leaf, and then convert the object to an Editable Poly. 4. Make a copy of the Leaf object, so that when we apply the Scatter command, we have a backup object for later use. 5. Apply the Scatter compound object to the copy of the Leaf object, and choose Base Branch as the Distribution Object. 6. Within the Distribution Object Parameter group, disable the Perpendicular option. 7. In the Display rollout, enable the Hide Distribution Object option. 8. In the Source Object Parameters rollout, set Duplicates = 1000 or 1500, depending on how many leaves you want to be distributed over the vines. Set Base Scale = 60%. 9. In the Distribute Using group, keep the Distribution Object Parameter set to Even. You can also try the Area or Skip N options and decide which of these three options delivers better results for your scene. 10. In the Transforms rollout, in the Rotation group, set X=10, Y=10, Z=40. This applies some random rotation along the three axes. 11. Rename the resulting object Ivy Leaf Background.

2D to 3D Modeling 1-41

At this point, you should have something similar to the following illustration.

1-42 2D to 3D Modeling Lets create another group of leaves using the Middle Branch distribution object. In this case, the size of the leaves will be smaller than in the previous group of leaves. 12. Make another copy of the Leaf object. 13. Apply the Scatter compound object to the copy of the Leaf object, and choose Middle Branch as the Distribution Object. 14. Repeat all settings that we did for the previous group of leaves, except set Duplicates = 300 and Base Scale = 45%. 15. In the Transforms rollout you can set Scaling to 5-7%. Dont forget to turn on Use Maximum Range and Lock Aspect Ratio. 16. Rename the resulting object Ivy Leaf Middle. 17. Using the same method, create a group of leaves on the End branch object. Use the same base settings as you used for the two previous Scatter objects, but set Duplicates to 500 and Base Scale to 35%. In the Transforms rollout set the Rotation of the Z axis parameter to 360, and set Scaling to 5%. 18. Rename this group of leaves Ivy Leaf Mini. Your scene should look similar to the following illustration.

2D to 3D Modeling 1-43
Now lets make some minor adjustments to the ivy and leaves to make it look better. 19. In the Left view, select and copy the Ivy Leaf Background object, and rename the copy to Ivy Leaf Bigger. Convert this object to an Editable Poly. Move it approximately 6-10 units along the X axis as shown in the following illustration.

20. To increase the size of the leaves, go to Element sub-object mode and select all the leaves. Use the Uniform Scale tools Transform type-in dialog box to set Offset:Screen = 170%. 21. Go to Polygon sub-object mode and then open Graphite Modeling Tools. In the Selection tab click the By Random button, set %=5%, and click the Select button. This will randomly select some polygons. 22. While holding Ctrl, click the Element sub-object button. This will select all the elements that the selected polygons belong to. 23. Delete the selected elements. 24. Select all of the elements and rotate them on the X-axis so all the leaves are more inclined toward the ground.

1-44 2D to 3D Modeling

Now, lets assign some materials. Well use diffuse maps with the following basic colors: green, lime-green, yellow, brown, red, and green with blue tint. 25. In the Material Editor, create a Multi/Sub-Object Material with 6 sub-materials. Rename the material Ivy Leaf. 26. Put the Green Leaf material that we already used in the scene into the first slot. 27. Copy this material to the second sub-material slot. Rename it Lime Green Leaf and assign Ivy_ Leaf-Lime Green.jpg to Diffuse channel.

28. Do the same with the third slot, copying the material but choosing Ivy_Leaf-Yellow.jpg for Diffuse channel. 29. In the fourth, fifth, and sixth slots, copy the material and for the Diffuse channel use Ivy_LeafBrown.jpg, Ivy_Leaf-Red.jpg, and Ivy_Leaf-Blue.jpg, respectively. All these textures for the different color variations of the leaf were saved from the Ivy_Leaves.psd file.

2D to 3D Modeling 1-45
30. Select the Ivy Leaf Background object, convert it to an Editable Poly, and apply the Ivy Leaf Multi/ Sub-object material to it. 31. Assign Material ID 6 to all of the leaves. 32. Use the Graphite Modeling Tool to select 3% of the leaves, and set their Material IDs to 1. 33. Assign the Ivy Leaf material and repeat the two last steps on the Ivy Leaf Bigger object. 34. Assign the same Multi/Sub-Object material to the Ivy Leaf Middle object. Assign Material ID 1 to 50% of the leaves, and Material ID 2 to the rest of leaves, using Select Invert.

35. Assign the same material to the Ivy Leaf Mini object. Assign Material ID 2 and 3 to most of the leaves and assign 4 and 5 to the other leaves. This method of assigning Material IDs to different elements allows us manual control of Material ID distribution. As an alternative, you can use the MaterialsByElement modifier to do this job automatically. You should have something similar to the following illustration.

36. Save the scene. You can find a finished version of the ivy in the file Ch01-09.max.

1-46 2D to 3D Modeling

Summary
This chapter focused on the creation of several objects within the project. Although it is impossible to cover the creation of each and every object type within a reasonable number of pages, the objects discussed covered a wide range of features that could be used to duplicate many other objects that the remaining chapters will not cover. The focus at this point in the book is not lighting, so if the final appearance of your renderings are not the same as the reference images, do not worry. If you had trouble following any of the exercises because you were not familiar with a particular feature, we recommend reviewing the appropriate help files within 3ds Max.

ChapTer 2

Terrain Creation

I n thIs chapter , we wIll create the terrain surrounding the house, which we will categorize as foreground terrain. There are many ways that this terrain could be modeled, and although there is no right or wrong way, this exercise illustrates a powerful and efficient method that we have come to enjoy. You will see how the use of other software packages such as Autodesk Mudbox and Adobe Photoshop can improve the realism of your terrain as well as the speed and efficiency in its creation. Although you can use the intermediary support files to continue at several points along the way with already prepared scenes, we encourage you to spend the time needed to produce the same results on your own.

Figure 2-1. Foreground elements created in this chapter

This process consists of three sequential parts: Terrain modeling Sculpting detail with Mudbox Texturing with tileable and procedural maps

2 - 2 Te r r a i n C r e a t i o n

Exercise 1: Terrain modeling


1. Open the scene Ch02-01.max. In this scene, you can see a bitmap image that we will use as a reference to create the 3D model. This was one of the first hand drawn images created during the design of this scene. 2. Using End snaps, create a Plane on top of the existing plane so that its the exact same size (Length=1000 and Width=1350). 3. Set the Length Segs = 5 and Width Segs = 7. 4. Position this plane slightly above the reference image as shown in the following illustrations. 5. Rename the object Ground and convert it to an Editable Poly. 6. Press Alt+X to make the object See-through. Use this tool anytime you need to compare geometry against the reference image. 7. Use the Drag tool from the Graphite Modeling Tools tab (Graphite Modeling Tools Freeform Drag) to move the objects vertices and mimic the shape of the terrain according to the reference image. The advantage of using Graphite Modeling Tools is that you dont have to enter sub-object mode and select a vertex to move it and you only need to right-click to exit. In the following illustration, you can see the approximate shape of the terrain after all the vertices have been moved.

8. When the vertex placement is finished, use the Cut tool (Editable Poly Edit Geometry Cut) to add details to the wireframe, and also use the Connect tool to connect two vertices with an edge to create a more correct topology for the wireframe. Use Remove to simultaneously remove edges from the wireframe structure, or hold down Ctrl when using Remove to remove vertices attached to those edges. Move the vertices around the perimeter of the object so that they extend slightly beyond the current perimeter (and the reference object below it). It is recommended that you add detail to the wireframe in such a way that it stays evenly dense, so that after the surface is subdivided in the next step, there wont be any noticeable difference between the wireframe densities at different parts of the object. The exact placement of the vertices does not need to perfectly match the reference object. If you scan some of the pages that lie ahead, you will get an idea of what the placement of any particular vertex at this point means to the model later on. The following illustration shows the Ground object after details are added using the tools described in this step.

Te r r a i n C r e a t i o n 2 - 3

9. Apply a TurboSmooth modifier to the terrain and set Iterations = 2. Each iteration breaks each polygon into four smaller polygons, so after 2 iterations you should have 16 times as many polygons as before. Edit the terrain geometry so it matches the reference image even more. If you see strange effects in some places, this is usually a result of errors in geometry caused by vertices or edges that are too close together. To get rid of such errors, you can select the vertices that are causing the problem and use the Edit Poly Collapse tool to make them into one vertex. In the following illustration, you can see how the terrain geometry should look at this stage. 10. Save your scene. If you would like to see the scene completed up to this point, open the file Ch02-02.max.

In the next part of the exercise, we will add additional terrain details to the object. As you can see in Figure 2-1, the banks of the creek have a hard edge to the left of the bridge and a soft edge to the right side of the bridge and around the water wheel. This can be modeled very easily. If you like, you can examine the file Ch02-03.max to see what we will be doing in the next section of this exercise.

2 - 4 Te r r a i n C r e a t i o n 11. Continue with your saved scene or open the file Ch02-02.max to continue with an already prepared scene. 12. Delete the TurboSmooth modifier. We applied it to see if we would have any erratic geometry and so that we could make any necessary adjustments before continuing. 13. Select a single edge at the very center of the creek that runs parallel with the banks of the creek. Do not select an edge that runs perpendicular to the banks. 14. Use the Loop tool to select all the edges in the middle of the creek that run the length of the creek. If edges not belonging to the creek are also selected, deselect them manually by clicking them while holding Alt on the keyboard.

15. Convert the edge selection into a selection of polygons by right-clicking and choosing Convert to Face from the quad menu, or just hold Ctrl on the keyboard while simultaneously clicking on Polygon sub-object mode from the Selection rollout (clicking Polygon within the modifier stack will not work). 16. Disable See-Through mode (Alt+X). 17. In the Perspective view, extrude the selected polygons using the setting -200. Click OK. 18. From the Edit Geometry rollout, apply the Relax tool to the selected polygons. This will make the bottom of the creek less flat. 19. Repeat the operations in the previous steps to create terrain on the left and right sides of the Ground object as shown in the following illustration. To make the selection of polygons easier, you can use the Lasso Selection Region or Paint Selection Region selection modes.

Te r r a i n C r e a t i o n 2 - 5
Next, we need to increase the density of some of the edges to give them a less sharp appearance. 20. Select any one of the vertical edges on the side of the creek and use the Ring tool to select all similar edges, as shown in the left image of the following illustration. 21. Deselect any edges that arent shown in the left image of the following illustration so that the smoothing effect that we are trying to achieve is only applied to part of the creek. 22. Use the Connect tool to connect the selected edges with Segments = 2 and Pinch = 90. This will create additional edges needed near the top and bottom of the creek walls, as shown in the right image of the following illustration.

23. Within the Subdivision Surface rollout, toggle the Use NURMS Subdivision checkbox to see the changes in the density of the creek wall wireframe. Toggle off this feature when finished. 24. Using the same methods that we just used to increase the density of the creek walls, add additional edges along the sides of the two other extruded terrain elements. Experiment with different Pinch settings to get a result similar to the left image in the following illustration.

25. Using any selection technique, select the polygons on the back side of both extruded terrain elements and delete them. We want to delete these polygons because this scene is built to be used with a specific camera angle that does not change, so we are not going to see that geometry in the rendering. In the right image of the following illustration, you can see selected polygons that need to be deleted.

26. In the Top view, select the edges along the bottom edge of the Ground object, as shown in the left image of the following illustration. While pressing Shift on the keyboard, move the selected edges down to increase the area of the Ground object in the scenes foreground. The right image shows the shape of the terrain at this stage.

2 - 6 Te r r a i n C r e a t i o n The rough shape of the terrain is now finished, and the only thing left to do is to adjust the heights of the extruded terrain elements to better match the reference image in Figure 2-1. 27. Save your scene. Open the file Ch02-03.max if you want to compare your results.

In order to align the terrain model with the reference image, we need to add a camera and also place the reference image as a viewport background. 28. Continue with your saved scene or open the file Ch02-03.max to continue with an already prepared scene. 29. With the Perspective view active, press Alt+B on the keyboard to bring up the Viewport Background dialog box. 30. In the Background Source group, click Files, select the image named Fantasy.jpg from the support files provided and click Open. 31. In the Aspect Ratio group, select the Match Bitmap option, enable the Display Background option, and click OK. 32. Within the Render Setup dialog box, change the Output Size to match the image used as the background in the viewport. 33. With the Perspective viewport active, press Shift+F to turn on Safe Frames. This causes the aspect ratio of the viewport to match the reference image. 34. In Perspective view, switch to Wireframe mode and use the Viewport Navigation tools to change the view so that the terrain object is similarly positioned and aligned to the background image, as shown in the following illustration. You will adjust the geometry to match the image more exactly in a later step.

35. Press Ctrl+C to create a camera from the perspective view. It is recommended that the FOV of the camera be changed to 24 degrees to achieve a decent perspective. This will require additional manipulation of the cameras position. 36. With the Ground object selected, toggle Use NURMS Subdivision, set Iterations = 2, and enable Isoline Display to see the smoothed geometry and to check the edges for issues. Disable this option when you are finished analyzing it.

Te r r a i n C r e a t i o n 2 - 7

As you can see, the terrain geometry looks similar to the reference image overall, but there are some differences in the heights of the terrain elements. To make the geometry match the reference image more closely, use the Shift tool on the Graphite Modeling Tools Freeform Paint Deform tab. This tool will allow us to quickly eliminate significant differences by affecting large areas of the geometry. 37. Select the Shift tool, and on the Shift Options window set Falloff = 150.

38. Using the cursor as a big brush, sculpt the geometry in the camera view for a better match with the reference image. If necessary, change the brush radius by holding down both Ctrl on the keyboard and the left mouse button while moving the cursor up and down. You can also make additional corrections by switching to a Perspective view, rotating the view, and adding modifications as needed. The result should be similar to the following illustration. 39. Save your scene.

2 - 8 Te r r a i n C r e a t i o n Next, we will map the terrain using the Unwrap UVW modifier so that we can apply textures properly. 40. Continue with your saved scene or open the file Ch02-04.max to continue with an already prepared scene. 41. Add a UVW Unwrap modifier to the Ground object. 42. Go the Modify panel and within the Parameters rollout click the Edit button. 43. Within the Selection Modes section of the Edit UVWs dialog box, click the Face sub-object icon. Press Ctrl+A to select all the polygons. 44. Within the Map Parameters rollout of the Modify panel, click the Pelt button.

45. In the Pelt Map dialog box, click the Start Pelt button. Let the pelt expansion continue until it stops moving and then click the Stop Pelt button. This should only take a second or two. Click Commit. 46. In the Edit UVWs window, go to the Tools menu and select the Relax tool. 47. In the Relax Tool dialog box, select Relax By Face Angles from the dropdown list. 48. In the Relax Tool dialog box, click the Start Relax button. After a few seconds, when the relaxing process stops changing the model significantly, click Stop Relax, Apply, and close the Relax Tool dialog box.

49. Activate the Perspective view and choose Views xView Overlapped UVW Faces. By doing so, you can see polygons that have overlapping texture coordinates that will require correction. Refer to the following illustration. 50. Go to the Vertex sub-object mode of the Unwrap UVW modifier and select the vertices related to highlighted polygons. In the left image of the following illustration, you can see an example of polygons and vertices highlighted with the xView tool.

Te r r a i n C r e a t i o n 2 - 9

51. From the Edit UVWs window, open the Relax dialog box again.

52. Set type to Relax By Centers, Iterations = 5, and click Apply. If overlapping UVW coordinates are still present in some polygons, repeat this procedure until there is no more overlapping. 53. Select all the polygons of the Ground object in the Edit UVWs window, and choose Tools menu Pack UVs. 54. In the Pack menu, select Linear Packing, leave the other parameters unchanged, and click OK. This will fit all of the UV coordinates into the texturing area. 55. Disable xView mode by clicking on Overlapped UVW Faces at the bottom of the viewport, and unchecking it. In the following illustration, you can see how the unwrapped UVs look after these steps are complete.

2 - 1 0 Te r r a i n C r e a t i o n 56. To test the UVW mapping, create a material with a Checker map in the Diffuse channel and set Tiling = 80 for both U and V axes in the Coordinates rollout. 57. Assign this material to the object, and turn on the Show Standard Map in Viewport option. The following illustration shows the checker map applied to the object.

58. If the texture is stretched in some places, convert the object to an Editable Poly and use the Tweak tool from the Graphite Modeling Tools Edit panel to correct any UVW map stretching in places visible to the camera. You may also need to unify the normals. This step is not always necessary and is just added here in case of small stretching in some places. Sometimes, an even easier way to clean up the mapping is to perform the Pelt and Relax commands again, as just discussed. At this point, you should have gone from something simliar to the left image of the following illustration, to something similar to the right image.

The unwrapped UVW map now fits within the texture space, which allows us to effectively use raster maps later in the texturing stage. Now we need to smooth out the terrain geometry. Convert the entire object to an Editable Poly. Please note that if we apply the Edit Mesh modifier to this object, we wont get the ability to use the Subdivision Surface option as we did earlier with the Editable Poly object. If you prefer to use the Edit Poly modifier, you can always apply a TurboSmooth modifier instead, but here we are going to use the Subdivision Surface option. 59. Select the terrain object, right-click and choose Convert to Editable Poly from the quad menu. 60. In the Subdivision Surface rollout on the Modify panel, enable the Use NURMS Subdivision option and set Iterations = 2. 61. Save your scene. You can find a finished version of this scene in the file Ch02-05.max.

Te r r a i n C r e a t i o n 2 - 1 1
The modeling work in 3ds Max is now finished. In order to add more details and make this object look more realistic, we will use Autodesk Mudbox. Mudbox is a modeling and detailing package specifically used for adding fine detail to existing models. Before we start working with Mudbox, we need to export the geometry from 3ds Max. If you do not have Mudbox, you can install a free 30-day trial from the Autodesk website. 62. Continue with your saved scene or open the file Ch02-05.max. 63. Select the terrain object, and export the object using the FBX file format. 64. Choose the name Ground for the export file and click the Save button. 65. In the Advanced options UI rollout of the FBX Export dialog box, deselect the Show Warning Manager option and click OK. You can also choose to use Ground.fbx from the books support files instead of performing the previous few steps.

Exercise 2: Sculpting detail with Mudbox


In this exercise, we will describe the process of adding additional details to the terrain model with Mudbox, which was chosen for several reasons: It is easy to learn It has a wide variety of tools for our task It is very fast at working with high poly models It has full compatibility with 3ds Max In creating the final model, we used many Mudbox tools, too many to show here. However, consider this exercise as a suggestion of which tools to use, rather than a comprehensive manual. If you want to learn more about Mudbox, we recommend that you watch the educational videos that come with it. Productivity can be further improved by using a digital tablet, but a mouse can be used as well. 1. Start Mudbox 2011. 2. Open the file Ground.fbx that you created or use the file provided. Go to the Object List tab and select Perspective, as shown in the following illustration. In the Transform group, click Reset. If the furthest edge of the terrain is clipped by the camera, then on the Properties: Perspective tab, increase the Far Plane value to 20000 or more and use the viewport navigation tools, as described in step 9.

2 - 1 2 Te r r a i n C r e a t i o n

3. Open the Material Presets tab (as shown in the following illustration) and click one of the beige slots. This assigns a shader to the model that is visually easier to work with. If you want, you can choose any other shader. 4. On the Object List tab, choose the new material, right-click it and rename it Ground. For the Specular slot, set the slider to a pure black color. Refer to the following illustration.

5. On the Lighting Presets tab, click the first preset, named Afternoon. 6. On the Alert window that tells you that the current lights in the scene will be replaced, click Yes. Refer to the following illustration.

7. Press Shift+D twice to increase the density of the wireframe. 8. On the Layers tab create a new Sculpt Layer, double-click it and rename it Base. Refer to the following illustration.

Te r r a i n C r e a t i o n 2 - 1 3

Before you start the actual sculpting process, take a few moments to become familiar with the tools on the Sculpt Tools tab. If you place the cursor over each tool icon, you can read a tooltip for each one. In this exercise, we will use only a subset of the tools; however, you can use other tools to add your own revisions to the final result. 9. Press W to activate Wireframe mode. This will help you get a better feel for the surface topology. To orbit, pan, and zoom, use Alt+left-click (orbit), Alt+right-click (zoom) and Alt+mmb (pan). Orient the object in the viewport so that you see the entire terrain, as shown in the following illustration.

10. From the Sculpt Tools at the bottom of the interface, select the Grab tool, change the size to around 100-200, and start editing the geometry to add natural random distortions and make it look less smooth and uniform. At this stage we only care about the overall shape of this object; later we will add fine details to it. The Grab tool is similar to the Shift tool in 3ds Max, but the Grab tool in Mudbox works much faster and is easier to use. The following illustration shows the Mudbox toolbar, where you will find the Grab tool and other tools referenced in the steps that follow.

2 - 1 4 Te r r a i n C r e a t i o n 11. Select the Bulge tool to grow parts of geometry. Use it to add large details, or remove them with the same tool by holding down Ctrl on the keyboard. In the following illustration, you can see how the terrain geometry looks after it has been modified with the Bulge tool.

12. If you see errors in the form of intersecting geometry, fix them with the Smooth and Flatten tools. 13. Use the Grab and Bulge tools to form the base of the stone steps leading to the pumpkin patch. Refer to the following illustration.

Hopefully, you can see that many of the tools in Mudbox are incredibly easy to understand and many of the names and icons make their purpose obvious. Compare your geometry with the reference image and try to make it match as closely as possible. Pay extra attention to the areas that connect to the house, the stairs, the trees and other objects in the scene. You can also shape the ground in the area where there is a garden on the reference image. Be sure to save your work from time to time. In the following illustration, you can see the final terrain geometry created using all the tools and techniques described in this exercise. 14. Save your file. You can compare your results to Ground_01.mud.

Te r r a i n C r e a t i o n 2 - 1 5

2 - 1 6 Te r r a i n C r e a t i o n Now that the terrain model is completely finished, we need to assign textures. Since the texture coordinates have already been unwrapped using the Unwrap UVW modifier, you might think that the simplest way to draw textures would be to open the map image in Photoshop and paint all the elements of the texture using the unwrapped map as a reference. However, this method wont work for our purposes. If we want the texture to look detailed when the object is close to the camera, it would need to have a resolution of at least 8000x8000 pixels or perhaps even more. A texture of such a large resolution would take up a great deal of memory, causing slow screen refresh times and long renders. Instead, we will use an alternative method that takes up far fewer system resources: we will draw masks for each texture separately, and in 3ds Max we will create a Composite material with them. Such a texture will render faster and will refresh in viewports faster than a large texture map. 15. Continue with your saved file or open Ground_01.mud. 16. In the Layers tab, switch from Sculpt mode to Paint mode.

17. On the Paint Tools tab, select the Paint Brush. This is a simple brush that you can use to draw on an objects surface.

Lets consider the separate masks we will need. Virtually dividing the terrain into separate parts, we find that we will need 6 different masks, one for each of these areas: grass, dirt, trail, soil, rocks (rocky surface on the sides of the cliffs), and large stones. We will start with the grass mask. 18. In the Properties: Paint Brush tab, set the Color to white, if it isnt already. 19. Set the Size to 100 and change it during the painting process as needed. You can also leave Strength at 100 because if you use a lower value, the paint will become transparent. Because the terrain object is not symmetrical, leave the Mirror parameter set to Off. Refer to the following illustration.

Te r r a i n C r e a t i o n 2 - 1 7
20. Click the New Layer button to create a new paint layer. 21. In the Create New Paint Layer dialog box, set Size = 2048, set Save As to PNG[8bit, RGBA], and leave Channel = Diffuse. For the Name, type in Grass and click OK. Refer to the following illustration. If you receive a message about multiple tiles, just select OK.

22. Referring to the reference image, use the brush to paint a mask over the places where grass will be on the terrain object. Try to make the edges of the mask look naturally chaotic and uneven. Refer to the illustration for an example of an appropriate grass mask. 23. Create a new Paint Layer and call it Ground. Using the same technique, paint a mask for the ground over the places where worn ground is supposed to be on the terrain object. 24. Repeat this technique for all the other masks until you have 6 masks with appropriate names. Use different colors for different masks to better visually separate them from each other. In the following illustration, you can see how masks are painted on the surface of the terrain. Your mask colors might be different from the colors shown.

Now that all masks are painted on the terrain surface, we need to transfer them to an image so we can edit them in Adobe Photoshop and later use them for texturing the terrain in 3ds Max.

2 - 1 8 Te r r a i n C r e a t i o n 25. Right-click any Paint Layer and choose Export Selected from the menu that appears. 26. Select PNG format for Save as type, and for the filename enter Ground_Mask, Grass_Mask, or whatever mask name is appropriate to the paint layer you selected. Refer to the following illustration.

27. Export all the other masks using the same method, giving each a name that consists of the layer name with the suffix _Mask.

28. Save the scene. If you wish to see an already prepared scene, open the file Ground_02.mud. 29. You can now close Mudbox.

Exercise 3: Texturing with tileable and procedural maps


Now that we have painted all the masks, we need to add details to them in Adobe Photoshop, and then we can start creating materials for the terrain. You can follow the instructions here to create the base file for editing, or open the file Terrain_01.psd. 1. Open Adobe Photoshop. 2. Create a new file with File New, or just press Ctrl+N on the keyboard. 3. In the New window, set Width and Height to 2048, and enter Name = Terrain. Leave the other parameters unchanged. Click OK.

4. Open all the mask files that you exported from Mudbox. All masks support alpha channels because we saved them in PNG format.

Te r r a i n C r e a t i o n 2 - 1 9
5. After you have opened all the mask files in Photoshop, drag them into the Terrain document that you created. To do this, right-click the layer in a mask image and choose Duplicate Layer from the menu. In the Duplicate Layer dialog enter an appropriate layer for the As parameter. For Document choose Terrain, and click OK. Another way to do this is to drag each mask layer from one document to another while holding down Shift on the keyboard, and then renaming each copied layer by double-clicking its name. Refer to the following illustration.

6. When all the mask layers have been transferred into the Terrain file, close the mask images, then create a new layer in the Terrain file and call it Background. Drag the layer to the bottom of the layers list. 7. Fill the new layer with any bright color such as red. This will help you spot any places that are not covered by a mask. To fill the layer, use the Paint Bucket Tool or press G on the keyboard, select the color that you want, and click the canvas. 8. Take a detailed look at the image to check if there are any areas that are not covered by a mask. In the following illustration, you can see the layers structure of the Terrain file.

2 - 2 0 Te r r a i n C r e a t i o n 9. Using different brushes, make the edges of the masks distorted and uneven to add more realism. Be sure to select the layer you intend to work with, and paint with the appropriate color so you can keep track of how the layers are painted. Dont forget to fill in places where the Background layer is visible. In the following illustration, you can see an example of how the Terrain file should look. 10. Save the file as a PSD file. You can compare your work to Terrain_01.psd.

Now you will make the masks for the Composite material and detach each layer into its own image file. 11. Fill the Background layer with black and hide all of the other layers. Unhide one layer at a time, uncheck the Contiguous check box under the paint bucket settings, and fill the current color with white. Use a Gaussian Blur filter to blur the edges slightly if they are too sharp. Right-click the layer name and choose Duplicate Layer, and duplicate the layer into a new document with the corresponding name and the suffix -mask. Refer to the following illustration.

Te r r a i n C r e a t i o n 2 - 2 1

12. Using this technique, detach each layer into a separate mask image file and save them as JPG files. Save the entire file also as a PSD file as a safeguard. You can use this overall mask file if you run into difficulties with your individual masks. Refer to Terrain_02.psd to see a completed file. The masks are finished, so now we need to find good textures to use with them.

13. Start 3ds Max. 14. Open the file with the terrain object that you saved earlier, or use the already prepared file named Ch02-05.max. 15. Open the Material Editor, select any empty slot, and click the Material type button (named Standard by default). 16. In the Material/Map Browser window, choose VrayMtl and click OK. 17. Rename this material Terrain_Mtl, and assign it to the Terrain object. 18. In the Basic Parameters rollout, assign a Composite map to the Diffuse channel, as shown in the following illustration.

2 - 2 2 Te r r a i n C r e a t i o n The Composite map will allow you to use multiple textures simultaneously and control their blending with masks. Refer to the following illustration.

19. Choose any textures that will work for the terrain and make them tileable in Photoshop using the Offset filter (Filter menu Other Offset), or you can use the textures available from the books support files.

20. If you are using your own textures, name them according to their corresponding masks for easier use. 21. On the Composite map, click the Texture button for the first layer (large square button on the left side), assign a Bitmap map type, and choose the image Ground.jpg. 22. Return to the base level of the Composite map and click the Mask button (large square button on the right side), choose Bitmap, and load the mask you created, or if you are using the scene provided, load Ground-mask.jpg. This completes the ground layer. 23. Click on the Add a New Layer icon (top-right of the Composite map), and repeat the process to create all the textures for the terrain material. The remaining texture maps you will load, if you are following along with the provided files, are Grass.jpg, Soil.jpg, Rock.jpg, Stone.jpg, and Dirt. jpg. The mask maps begin with the same names and end with -mask. As a result, you should have 6 layers. The following illustration shows the structure of the finished Composite map.

24. For each texture you will need to adjust the tiling. Set U and V Tiling for each bitmap to the following: Dirt = 5x5, Stones = 3x4, Rock = 2x2, Soil = 7x7, Grass = 2x2, Ground = 3x3. The effect of these tiling settings may not be visible in the viewport.

Te r r a i n C r e a t i o n 2 - 2 3
25. Add a Standard Direct light to the scene using the settings shown in the following illustration. Elevate the light to approximately 60 degrees above the horizon.

26. Render the scene and, if needed, adjust each textures brightness and contrast by clicking the Color Correct This Texture button located next to the Texture slot. The color correction parameters are very similar to the image adjustment parameters in Photoshop. Refer to the following illustration to see an example of the terrain after all adjustments.

2 - 2 4 Te r r a i n C r e a t i o n 27. Now lets add tracks left by characters walking over paths through the terrain. To do this, create a new layer in the original Photoshop file, and using brushes paint lines to represent tracks. If you use soft brushes, apply a Sharpen filter to make the mask sharper. Make interrupted lines and add lots of details to make the tracks look natural. In the following illustration, you can see how an initial mask image can be created for positioning purposes, but then refined with numerous brushes and tools to create the effect of wear marks in the road. These could be wear marks from foot travel or from some type of wagon that has been pulled over the road. Use your imagination in this type of situation.

28. In order to make the tops of the piles of soil in the garden area brighter, paint masks for the areas that you want to make brighter and add another layer of soil into the material structure. Position that layer at the top of the list, change the Blending Mode to Screen, and change the Opacity to 50%. You can also use Soil-mask2.jpg in the books support files. 29. Check your viewports and test renderings for places with masking problems. Fix any problems using the techniques described thus far. 30. To add more depth, add a VRayDisplacementMod and load a black-and-white displacement map in the Texmap channel. You can create your own image or use the Displ.jpg file provided (shown in the following illustration).

Te r r a i n C r e a t i o n 2 - 2 5

31. For the Bump channel of the material applied, you can use the Ground.jpg texture converted into a black-and-white image, using the same tiling setting you used for this texture in the Composite map. In the following illustration, you can see the final appearance of the terrain. Open Terrain_02.psd in Photoshop to see the layer structure of the masks.

32. Now the terrain is finished. Save the scene. You can find a finished version of this scene in the file Ch02-06.max.

2 - 2 6 Te r r a i n C r e a t i o n

Summary
Terrain is undoubtedly one of the most difficult elements of a scene to create properly. Unlike other elements such as furniture, vegetation, cars, and even characters, there is very little that you can do with library content or pre-developed models provided by third party content or software providers. Good terrain creation practices can go a long way to make your scenes more efficient to work in and render. This chapter only scratched the surface of the many ways that terrain can be created, but the techniques outlined are tried and tested and can stand up to any other method available. With experimentation, you can expand these techniques to incorporate techniques you already use.

ChapTer 3

Tree Creation

I n thIs chapter , we ll reproduce the tree model shown in Figure 3-1. After all the objects are built, we will prepare them for painting by assigning texture coordinates to the finished object, and then paint the tree model.

Figure 3-1. Tree created in this chapter

Because the trunk of the tree doesnt follow any standard type of mapping offered by the UVW Map modifier, we will need to unwrap custom texture coordinates with the Pelt tool. This tool allows you to unwrap the UVW coordinates right on the surface, cutting them with seams you specify manually. 1

3 - 2 Tr e e C r e a t i o n After the texture coordinates are created, you will paint out any visible seams on the tree using the Viewport Canvas tool, which allows you to paint specific areas right in the 3ds Max viewports. Based on this workflow, we can separate the tree creation process into the following stages: Modeling the tree trunk with polygonal modeling methods Modeling the underlying base for the tree crown with the BlobMesh compound object Creating the leaves with the Hair and Fur modifier Creating custom texture coordinates for the tree trunk with the Pelt tool Painting the model directly in 3ds Max using Viewport Canvas

Exercise 1: Modeling the tree trunk


In this exercise, we will build the tree trunk using polygonal modeling. To begin the process, we will use a Box primitive, convert it to an Editable Poly, and use the Editable Poly tools. By increasing and editing the geometry step by step, you will give your model the desired form. In the reference image shown at the beginning of this chapter, you can see that the trees roots twine around the house and the small outhouse. Thats why it makes sense to create the tree after the buildings are created and placed. You will start with a scene that already contains models of the house and the outhouse, and begin immediately with the modeling of the tree itself. You can also see that the trees crown is quite dense, so the branches lying inside the crown will not be visible. That means you can save time on modeling because you only need to model the branches that show below the crown. Building the rest would be unnecessary work. Lets get started. 1. Open the file Ch03-01.max. This scene contains models of the house and a small outhouse placed as they are in the reference image. First, we will place the reference image in the scene to guide us while modeling the tree. 2 . Select all objects in the scene and press the shortcut Alt+X to make the selected objects transparent. 3. In the Front viewport, create a Plane object without concern for its dimensions or placement. Set Length Segs and Width Segs parameters to 1. Name the plane Background_Plane. 4. Using the Material Editor, create a Standard material with Tree_Reference.jpg in the Diffuse Color channel, and assign this material to the plane you just created (Background_Plane). Click Show Standard Map in Viewport to make the map appear in the viewport. 5. Now, to use the plane for reference while you are modeling, you must set the size and placement of the Background_Plane object so it is oriented to the objects placed in the scene and corresponds to the elements in the reference image. Thus, the dimensions and the placement of the Background_Plane object should be approximately the same as those shown in the right image in the following illustration, and from the Front view the scene should look the same as the placement shown on the left-hand side of the following illustration. If you resize the Background_Plane object, you should maintain its correct length/width ratio so that the reference image does not appear overstretched or squashed.

Tr e e C r e a t i o n 3 - 3

6. In the Front view, create a Box with about the same dimensions to fill the space between the house and outhouse. This object will be the base for the tree trunk. Place the box as shown in the left image of the following illustration. The size and coordinates of the Box01 object are shown on the right. Note that the box is a cube.

7. Now convert Box01 to an Editable Poly and rename it Tree_Trunk. 8. Make the Tree_Trunk object transparent using the shortcut Alt+X so the reference image will be visible while you are working. You can use the same shortcut to make the object opaque at any time, switching between see-through and opaque mode as needed to facilitate your modeling process. 9. Access the Edge sub-object level for Tree_Trunk. In the Perspective view, select the upper edge parallel to the Y axis as shown in the right image in the following illustration. Then, in the Selection rollout, press the Ring button to select all parallel edges, and then the Connect Settings button to the right of the Connect button in the Edit Edges rollout.

3 - 4 Tr e e C r e a t i o n

10. In the Connect Edges dialog box, shown on the left of the next illustration, enter 2 for Segments and press OK to complete the command. 11. Select any edge parallel to the X axis and repeat the same steps to create new edges. The object will take the form shown on the right of the next illustration.

12 . In the Front view, select all the upper vertices and drop them down, as shown in the left image of the following illustration, to the level of the lower border of the tree hollow in the reference image. You may need to move the entire box down to match the illustration. 13. In the Perspective view, select all corner edges parallel to the Z axis and the bottom-inner 6 edges parallel to the Y axis, as shown in the middle image of the following illustration. Hold Ctrl and click the Remove button in the Edit Edges rollout to delete these edges together with their vertices. The object should look like the right image of the next illustration.

Tr e e C r e a t i o n 3 - 5
Now, well begin modeling the roots. For this purpose, we will create splines to guide the extrusions. 14. Switch to the Front view, and in the Create panel, click Shapes Line, and draw a spline to show the roots path as shown in the left image of the next illustration. Make sure your vertices are all set to Corner. 15. In order for the extrusions to work correctly, we need to snap the end vertex of each spline to the center of the polygon we will be extruding. For this purpose, we will create an extra edge which we will then delete. Go to Vertex sub-object mode of Tree_Trunk object. Select two diagonally opposite vertices on the polygon that you will be extruding, and click Connect. This should generate an edge which bisects the polygon diagonally, as shown in the right image of the next illustration..

16. Go to the Perspective view and right-click the Snaps Toggle icon to open the Grid and Snap Settings dialog box. On the Snaps tab, turn on the Vertex and Midpoint options. On the Options tab uncheck the Use Axis Constraints option. Close the dialog box and activate the Snaps Toggle icon by clicking it. In the left image of the illustration below is a view of the Snaps tab, and on the right a view of the Options tab of the Grid and Snap Settings dialog box.

17. Bring the cursor close to the upper end of spline. As soon as you do that, crosshairs will appear representing activation of the Vertex Snap mode. Click and drag your spline to the edge indicated on the left image of the following illustration. At the same time, the edge to

3 - 6 Tr e e C r e a t i o n which the cursor is bound will also become colored, and the Midpoint Snap mode activation symbol will appear. 18. You can now remove the edge we created for snapping purposes. Go to Edge sub-object mode of the Tree_Trunk object, select the edge that we used to snap the spline to and click the Remove button to remove it. 19. Turn off Snap and activate the Top view. Move the splines vertices so that the spline twines around the small outhouse. The result can be seen in the right image of the next illustration.

20. Using the same method, build two more splines from which you will extrude the middle root of the tree and the root lying on the roof. The splines should look similar to those shown in the following image. The scene Ch03-02.max shows all the tree splines from which roots will be extruded already created. If you like, you can open this scene and continue with the rest of the modeling process.

Tr e e C r e a t i o n 3 - 7
2 1. After the splines are built, select the Tree_Trunk object, go into the Polygon sub-object mode and select the polygon that the first spline adjoins. In the Edit Polygon rollout, press the Settings icon to the right of the Extrude Along Spline button. The Extrude Polygons Along Spline dialog box will open. In the dialog box, click the Pick Spline button and select the spline that adjoins the selected polygon. Set Segments = 9, Taper Amount = -0.92, Taper Curve = -1.2, and Twist = 105, and click OK to close the dialog box. The left image of the next illustration shows a view of the Extrude Polygons Along Spline dialog box, and on the right you can see the result of the operation completed.

22 . Using the same methods, extrude the remaining two polygons that the splines adjoin. Increase the number of Segments so the root is smoothly curved. In the Perspective view, the scene should look similar to the left image of the following illustration. 23. Select the Background_Plane object and look at it from behind. This object does not have volume, and the back part of the polygon is black, as shown in the right image of the following illustration. It might be frustrating for you to try to work with the rest of the scenes objects when they are not visible from behind. You will improve this situation by using Backface Cull.

2 4. With the Background_Plane object selected, right-click in the viewport to open the quad menu, and choose Object Properties in the Transform quadrant to open the Object Properties dialog box. Turn on the Backface Cull option in the Display Properties group and click OK to apply these changes. Now the back side of the plane is transparent. The Object Properties dialog box with Backface Cull checked is shown on the left of the next illustration, and the result of this change in the Perspective view is shown on the right. Note: On some systems with certain video drivers this option may not work, displaying black faces instead of transparent.

3 - 8 Tr e e C r e a t i o n

25. Now we will further fill out the tree base. Select Tree_Trunk and access the Polygon sub-object level. Select the polygon as shown on the left of the next illustration and press the Settings icon next to the Bevel button. In the Bevel Polygons dialog box, enter the Height = 150 and Outline Amount = -40, and click OK to complete the operation.

26. Select the polygons as shown on the left of the next illustration, and press the Settings icon to the right of the Extrude button. In the Extrude Polygons dialog box, set the Extrusion Height to 400 and click OK to finish the operation.

2 7. To match the reference image, use the Select and Uniform Scale and Select and Move tools to resize and move the selected group of polygons to match the reference image.

28. Switch to Edge sub-object mode. In the Front view, select the edge as shown on the left of the next illustration, and press Ring. Click the Settings button next to the Connect to bring up the Connect Edges dialog box, set Segments = 3, and click OK to complete the command.

Tr e e C r e a t i o n 3 - 9
29. To match the reference image, in the Front viewport, build two more splines along which the polygons will be extruded, forming the left and right branches of the tree. Using snaps, place the ends of the splines on the surface of the polygons that will be extruded. In the Top viewport, move the splines vertices to adjust their shapes as you see fit. 30. Select the tree trunk and go into Polygon sub-object mode. Highlight the polygons and extrude them along the splines using the method described in earlier steps. See the following illustration for an example of the splines created and the polygons selected and then extruded along the splines.

31. In the reference image, you can see that the right root and the right branch split off into two. Build short splines for these offshoots, and use the method described earlier to extrude polygons and create the offshoots.

32 . Select the polygons at the ends of all the roots and branches, including the end polygons of all upper branches, and delete them. This will prevent these polygons from being affected by subdivision modifiers (like TurboSmooth and MeshSmooth), and will also simplify the mapping process later. The left image of the folllowing illustration shows some of the polygons that should be selected and deleted. 33. In test renderings, the branches will not appear to smoothly join the trunk because of the different smoothing groups assigned to the extrusions. To solve this problem, go to Polygon sub-object mode of the Tree_Trunk object and select all tree trunks polygons with the shortcut Ctrl+A, and in the Polygon: Smoothing Groups rollout, click Clear All. Having eliminated the smoothing groups, you have achieved a more uniform shading of the trees polygons. At this point, the tree should look like the right image in the next illustration.

3 - 1 0 Tr e e C r e a t i o n 34. Use the Shift, Push/Pull, and Relax tools on the Freeform tab of the Modeling Ribbon to further sculpt the form and position of the trunk, roots and branches and to make the objects shape match the reference image more closely. This is an important step in the creative process. If you hover your cursor over each tool, you can see a detailed description of the tool and read about its possibilities. The scene Ch03-03.max shows the trunk model created up to this point with the tools described so far. If you like, you can open this scene and continue with the rest of the modeling process. 35. Next, well make the hollow in the tree trunk. Add a TurboSmooth modifier with Iterations = 1 to give you more edges to work with, and add the Edit Poly modifier. Go into Polygon sub-object mode and select polygons as shown in the left image of the following illustration. 36. Hold down the Ctrl key and in the Selection rollout, choose Vertex sub-object mode to select the vertices associated with the selected polygons. Hold down Alt and click the center vertex to eliminate it from the selection. 37. With the Vertex selection still active, apply the Spherify modifier. As a result, the selected vertices will be pushed into a circular shape as shown in the right image in the following illustration.

38. Add another Edit Poly modifier, access the Polygon sub-object mode, and press the Settings button to the right of the Inset button in the Edit Polygons rollout. In the Inset Polygons dialog box, set the Inset Amount to 8 and click OK to complete the operation. This creates a new set of polygons just inside the selected polygons.

39. Click the Settings icon next to the Extrude button to bring up the Extrude Polygons dialog box. Set Extrusion Height to -8 and click Apply to apply the change. To continue extruding polygons, set the Extrusion Height to -40 and click Apply. Set the Extrusion Height to -8 and click OK to complete the operation and close the dialog box. You can see the result in the left image of the next illustration.

Tr e e C r e a t i o n 3 - 1 1
40. Next you will correct the shape of the hollow. Using the same selection of polygons, click Grow four times to select all the surrounding polygons that form the hollow. Go to the Front viewport. Choose the Select and Uniform Scale tool and make sure that the Reference Coordinate System is set to View. Scale down the selected group of polygons along the Y axis to flatten the hollow a little. Then stretch the selected group of polygons a little along their X axis. Move the selected group of polygons slightly to the right. As a result, the hollow should look similar to the right image in the following illustration.

Next, you can proceed in one of several ways to add more detail to the model. The first way is to add a TurboSmooth modifier with a high number of Iterations such as 2 or 3, then to add Edit Poly modifier and use its Shift, Push/Pull, and Relax tools to further revise the objects shape and sculpt additional details. This method gives you a lot of flexibility in modeling, however it can also be difficult due to the large number of modifiers in the stack, which will slow down your systems display time, and thus, slow down your work. The left image in the following illustration shows what the modifier stack looks like when another TurboSmooth and Edit Poly modifier is added. Another way is to collapse the stack, which will allow you to use less memory and speed up system response time; however, you then you lose some flexibility in modeling. 41. To retain flexibility but also speed up your system, save a copy of the object in its present state in its own file with the Save Selected option (from the File menu). Name this object and file Trunk_Low_Poly. We will collapse the stack in the current scene to save memory and speed up screen refresh time. By saving a copy of the tree trunk in its present state, we can return to the uncollapsed version in case you are not satisfied with the results of the additional editing. We also will use this version of the model to assign UVW coordinates later in this chapter.

42 . After saving the object out to its own file, add a TurboSmooth modifier with Iterations set to 3, and Convert to Editable Poly to collapse the stack. Then use the Shift, Push/Pull, and Relax tools to work further with the objects form and detailing. 43. After sculpting the details, the tree trunk is complete. Save your work. The modified tree trunk with a gray material is shown in the right image of the following illustration. You can find a completed version of this tree trunk in the file Ch03-04.max.

3 - 1 2 Tr e e C r e a t i o n

Exercise 2: Modeling the crown


In this exercise, we will model the trees crown, the object representing the leaves and smaller branches in the upper part of the tree. First, we will use the GeoSphere primitive to form the shape of the crown and to visualize the volume, then well use BlobMesh to make a single blob-like form from all the spheres. You will use the GeoSphere rather than the Sphere primitive because a GeoSphere has equidistant vertices, which work much better with BlobMesh than the longitude/latitude vertex structure of a sphere. Then you will use the Relax modifier to smooth the form of the created object. Then youll apply the Edit Poly modifier to delete any unnecessary geometry that appears as a result of the BlobMesh, and assign a Push modifier to finalize the objects size. You can also use the ProOptimizer modifier to greatly reduce the number of polygons in the object while retaining its appearance. This process is a quick and easy way to create visually soft organic surfaces such as a tree crown. 1. Open the scene you saved in the previous exercise or use the file Ch03-04.max to continue working on the model. 2 . In the Front view, create a GeoSphere object, which is one of the Standard Primitives available in the Create panel. Set Radius = 120 and Segments = 4, as shown in the left image of the next illustration. 3. Create more GeoSphere objects with the same settings and place them as shown in the following illustration (Front and Top views).

Tr e e C r e a t i o n 3 - 1 3
4. To create a BlobMesh object from the geospheres, access the Compound Objects dropdown on the Create panel and click BlobMesh, then click in the viewport to place the BlobMesh01 placeholder object. Go to the Modify panel and set Size = 30, Tension = 0.01, Render = 30, and Viewport = 30.

BlobMesh works by making a mesh from a set of objects, in this case the geospheres, which you will select in the next step. When you select objects for use with BlobMesh, an internal version of these objects is generated for creating the BlobMesh. These internal objects are referred to as metaballs. The Size value sets the size of the metaballs that are created at the vertex of each selected object. Tension sets the degree of webbing on the resulting mesh in areas where metaballs intersect or touch each other. The Render and Viewport values set the degree of detail in the resulting mesh, which affects the speed of generation and screen refresh. The higher the values of these amounts, the less detailed the resulting mesh will be, and the higher the speed of their generation will be. When first working with a BlobMesh, it is best to keep the Render and Viewport values relatively high, as with our value of 30, until youve achieved a form close to your desired result. 5. In the Blob Objects group of the Parameters rollout, click the Add button and select all the GeoSphere objects you just created, as shown in the left image of the following illustration. Click the Add Blobs button to confirm the addition of the selected objects as metaball generation objects. The results of the addition of the GeoSphere objects are shown in the right image of the following illustration.

6. To the BlobMesh01 object, add the Relax modifier and use the values shown in the left image of the next illustration to create the effect shown in the right image.

3 - 1 4 Tr e e C r e a t i o n

7. Press Alt+Q to put the BlobMesh into Isolation Mode. Switch to Wireframe display by pressing F3. Inside the object, you can see that there are unnecessary internal polygons formed as a result of pasting together the metaballs. 8. Apply an Edit Poly modifier. Go into Element sub-object mode and click on the BlobMesh object. Then on the Edit menu choose Select Invert to invert the selection. Now all the inner elements of the objects are selected as shown in the next illustration. Delete them by pressing Delete.

9. Exit from Element sub-object mode and return to the base level of the Edit Poly modifier. Press F3 again to return to the Smooth+Highlights display. 10. You need to compensate for the additional volume that will be added by the leaves in a later step. Apply a Push modifier with a Push Value of -17.5 to reduce the objects volume a little. 11. Next, optimize the objects level of detail. Add a ProOptimizer modifier. In the Optimization Level rollout, press the Calculate button. After the vertices and borders are calculated, the objects statistics before and after optimization appear below the Calculate button. At the moment, the before and after values are equal. Set the value of Vertex % to 50.0 to reduce the vertex count to half its current count. The new number of vertices and borders are reflected in the statistics box. You can also set the desired number of vertices explicitly by typing in a value for Vertex Count. 12 . Add another Relax modifier with Relax Value = 1.0 and Iterations = 1 to smooth the optimized BlobMesh01 object a little more. If you notice any holes in the mesh, add a Cap Holes modifier to correct this.

Tr e e C r e a t i o n 3 - 1 5
13. Select BlobMesh01 and all of the GeoSphere objects and using the Save Selected option on the File menu, save the selection into a new file. This will allow us to return to these objects if necessary. The tree crown with its uncollapsed stack of modifiers can be found in the file Ch03-05. max. 14. Select the BlobMesh01 object. Collapse the modifier stack and delete all the GeoSphere objects from the scene as they are no longer necessary. 15. The modeling of the tree crown is now complete. Save your scene. The resulting model can be seen in the file Ch03-06.max.

Exercise 3: Mapping the tree


In this exercise, we will create texture coordinates for the trunk using the Pelt tool, which is part of the Unwrap UVW modifier. Unwrapping texture coordinates for a high-poly object such as the tree trunk would be quite a difficult process, so we will use the low-poly version that we saved previously instead. After the mapping coordinates are set on the low-poly tree trunk, you will apply a Morpher modifier to this version (low-poly) and use the high-poly version of the tree as a Morph Target. The Morpher modifier works only if the number of vertices are the same in both morph targets. To ensure the number of vertices will be the same in both versions of the tree, you will apply a TurboSmooth modifier with the same number of Iterations as we applied to the high-poly sculpted version. 1. Continue with the scene saved in the previous exercise, and merge in the Trunk_Low_Poly object that we saved earlier. Or, you can open Ch03-07.max in the support files. 2 . Rename the detailed trunk object Trunk_High_Poly. Select Trunk_Low_Poly, collapse it to an Editable Poly and apply a Unwrap UVW modifier. With Trunk_Low_Poly selected, right-click in the active view and select Hide Unselected from the quad menu. All objects will be hidden except for Trunk_Low_Poly. 3. With Trunk_Low_Poly selected, in the Face sub-object mode of the Unwrap UVW modifier, turn off the Ignore Backfacing checkbox in the Selection Parameters rollout, and select all of the polygons. 4. In the Map Parameters rollout, click the Quick Planar Map button to get rid of the mapping coordinates existing seams. 5. Select the polygons at the very end of the root that twist around the outhouse, and then press the Plus (+) button in the Selection Parameters rollout several times until all the polygons on the root are selected, as shown in the left image of the next illustration. 6. Click the Point To Point Seam button in the Map Parameters rollout and click along the root to indicate the seam for the UVW coordinates. The seam is where the map will be cut so it can be unwrapped. If you were going to create a bear skin rug, for example, you would have to skin the bear by cutting seams along the torso and down each limb. We dont condone skinning bears, but the idea is the same in 3D. You create seams where you want to make cuts. It is better to place seams in areas that are rarely seen or are not visible. Therefore, you should place the seam for this root as shown in the right image of the following illustration. Make as many clicks as necessary to define the seam where you want it to be, then right-click to end the seam creation. Turn off the Point To Point Seam button when you are satisfied with the seam.

3 - 1 6 Tr e e C r e a t i o n

7. In the Map Parameters rollout, press the Pelt button. Two windows appear on the screen: Edit UVWs, where the texture coordinates are displayed and edited, and Pelt Map, where the tools reside, allowing you to quickly unwrap the texture coordinates of the surface. The windows are shown in the next illustration.

8. Press the Start Pelt button in the Pelt group in the Quick Pelt rollout. The button label changes to Stop Pelt. In the Edit UVWs window, you will see the UVW coordinates begin to smooth out under the influence of the Stretcher tool. You can see this effect as red and white dotted lines outward from each vertex that lie on the seam vertices of the UVW coordinates. 9. After the UVW coordinates are smoothed and become as they are in the left image of the following illustration, click Stop Pelt. 10. Press the Settings button in the Relax group of the Pelt Map dialog box. In the Relax Tool dialog box, select Relax By Face Angles from the dropdown menu and click the Set As Default button. This will cause the selected relax method to work by default every time the Start Relax button in the Relax group is clicked.

Tr e e C r e a t i o n 3 - 1 7
11. Close the Relax Tool window and click the Start Relax button. The vertices displayed in the Edit UVWs will begin to relax. When the vertices slow down to the point where you cant see them moving, click Stop Relax. The result is shown in the right image of the following illustration.

12 . In the Pelt Map window, press the Commit button to complete the operation. The Edit UVWs window will remain open. 13. Using the same method, cut seams and smooth out the mapping for the rest of the roots and branches, the hollow, and the tree trunk. For some roots and branches, the relax process may take longer than for others. Make sure you allow it enough time. If during the relax process vertices stop moving but the geometry is not completely relaxed, open the Relax Tool dialog box by clicking the Settings button in Relax group, set Amount to 0.5 and Stretch to 0.05. Click the Start Relax button on this dialog box and allow the vertices to move more (this may change the orientation of the geometry). Click the Stop Relax when the geometry looks completely relaxed and close the Relax Tool dialog box. Refer to the finished scene Ch03-08.max to see how to correctly place the seams.

3 - 1 8 Tr e e C r e a t i o n 14. After all the texture coordinates of all the tree trunk elements are smoothed, you will need to scale them in relation to each other and to place them in the square texture space in the Edit UVWs window. For convenience in scaling the texture coordinates parts, create a material with a Checker map in the Diffuse Color channel and assign it to the tree trunk. Set the U and V Tiling values to 50, and turn on Show Standard Map in Viewport so the texture map shows in the viewports. In the Options panel at the bottom of the Edit UVWs window in the Selection Modes group, click the Face sub-object mode button and check the Select Element box. 15. Select each of the elements of the texture coordinates and use the Scale tool in the Edit UVWs window to scale each element. As you do this, monitor the process in Perspective view to see the size of the checkers on each part of the tree trunk. Try to make the checkers on different parts of the Trunk_Low_Poly match in size, as shown in the left image of the next illustration. 16. After you have finished scaling each element, select them all at once and scale them so that they fit within the texture space, the area in the Edit UVWs window limited by thick, dark blue lines. With the Move and Rotate tools, arrange all elements approximately as shown in the right image of the following illustration. At the same time, try to use as much of the texture space as possible.

17. Save your scene. The model of the tree trunk with its correctly unwrapped UVW coordinates can be found in the file Ch03-09.max. 18. Unhide the Trunk_High_Poly object by right-clicking in the active view, selecting Unhide By Name from the quad menu and then double-clicking Trunk_High_Poly in the list of objects. Move the Trunk_High_Poly object to the right so that its next to the Trunk_Low_Poly object, as shown in the following illustration.

Tr e e C r e a t i o n 3 - 1 9

19. Add a TurboSmooth modifier with Iterations set to 3 to Trunk_Low_Poly. This will make the number of vertices in the detailed and mapped objects match so they will work with the Morpher modifier.

20. Assign the Morpher modifier to the Trunk_Low_Poly object. In the Channel Parameters rollout, click Pick Object from Scene as shown in the left image of the following illustration, and select the detailed tree trunk, Trunk_High_Poly. 2 1. In the Channel List rollout, opposite the active channel with the name of the object highlighted, specify the percent value to 100 as shown in the right of the following illustration. The tree trunk with the correct mapping will take the form of the earlier, detailed tree trunk.

22 . After the object has been warped by the Morpher modifier, the texture coordinates of the object appear somewhat distorted. It is especially noticeable in the border area of the hollow end of the tree trunk. To correct this problem, add another Unwrap UVW modifier to the Trunk_Low_ Poly object, and go to the Edge sub-object mode. Select any edge positioned on the seam between the hollow and the tree trunk. Using the Loop and Expand Selection tools, select edges on both sides of the seam where the texture map is strongly distorted, as shown in the right image of the following illustration.

3 - 2 0 Tr e e C r e a t i o n

23. Click Edit to open the Edit UVWs window, and use the Relax command under the Tools menu. In the Relax Tool window, select the Relax By Face Angles method and click the Start Relax button. Wait until the relax process in the Edit UVWs window stops making noticeable changes in the selected area of the texture coordinates, and click Stop Relax. Click Apply to see the effect in the viewport. 2 4. In the Options toolbar of the Edit UVWs window in the Selection Modes section, enable the Select Element option and select any edge in the cluster of the hollows texture coordinates. All edges of this cluster should now be selected. Use the Relax command under the Tools menu with Relax By Face Angles as in the previous step.

25. In the same way, correct the texture coordinates at the end of the longest root and its offshoot, as shown in the following illustration.

Tr e e C r e a t i o n 3 - 2 1

26. If the texture coordinates self-intersect, as shown in the left image of the next illustration, you will need to smooth them. Turn off Select element, then select the vertices in the self-intersecting area. You may want to use the Paint Selection tool to make the selection process easier. Turn on Soft Selection in the Options toolbar. Adjust the value of the Falloff parameter to select the full area around the self-intersection, and use the Relax Tool to move the vertices apart and correct the ones that overlap. In the Relax Tool window, choose any one of the smoothing algorithms: Relax By Edge Angles, Relax By Face Angles, or Relax By Centers, whichever one gives you the best results. You may have to experiment with different Amount & Stretch settings and click Apply instead of Start Relax. You may have to click Apply numerous times until you get the desired result, if the texture coordinates move too quickly when using Start Relax. 2 7. To finish up the process, select the vertices along the edge of the opening and use the Relax tool with the Relax By Centers option and the Keep Boundary Points Fixed option turned on. The result of this process is shown in the right image of the following illustration.

3 - 2 2 Tr e e C r e a t i o n 28. Now that the object is correctly mapped, you no longer need its modifier stack. Collapse the stack for the object Trunk_Low_Poly, rename it Tree_Trunk, and delete the Trunk_High_Poly object from the scene. 29. Unhide all objects. Save your scene. The tree trunk with its uncollapsed stack of modifiers can be found in the file Ch03-10.max.

Exercise 4: Texture painting with Viewport Canvas


In this section, we will touch up the tree trunks texture coordinates and create and apply maps. We will use the Viewport Canvas tool to paint the joints of the tree bark texture maps and create separate texture maps for the hollow and the moss. Well also use the Render Surface Map tool to create a Cavity Map as a mask for color correction on the texture map in Photoshop. In the same exercise, we will create a Displacement map of the tree bark. This map will be used in the VRayDisplacementMod modifier and give relief and additional detail to the model. 1. Open the scene you saved in the previous exercise, or open the file Ch03-11.max, and hide all objects except Tree_Trunk. 2 . In order for you to work with the texture maps in 3ds Max, it is very important that they appear in the viewports at the highest quality possible. On the main toolbar, select Customize menu Preferences. In the Preference Settings dialog, in the Display Driver section of the Viewports tab, click the Configure Driver button. In the Configure Direct3D window, in the Background Texture Size and Download Texture Size groups, turn on the Match Bitmap Size as Closely as Possible options, select the largest resolutions listed under both sections, and click OK.

3. In the Material Editor, create a Standard material with the bitmap Bark_Tile.jpg as the Diffuse map. This file contains an image of tree bark, and is designed to tile seamlessly. Apply this material to the tree, and click Show Standard Map in Viewport to see the bark on the tree. You will paint the tree trunks joints with this map. 4. Set the scale of the map in relation to the tree trunk by increasing the values of the U and V Tiling parameters to 5. This will make the scaling just about right for the tree.

Tr e e C r e a t i o n 3 - 2 3

We have set the U and V Tiling in 3ds Max solely to figure out the amount of tiling needed to adjust the bitmap in Photoshop. When you want to use viewport painting on an object, any maps on the object actually have to have the U and V Tiling values set to 1x1 in the Material Editor. You will use Photoshop to make a version of this bitmap with the bark tiled 5x5 within the bitmap, and then you will be able to use the new bitmap in the Material Editor with U and V Tiling values set to 1x1. 5. Open Photoshop, and open the file Bark_Tile.jpg. 6. To unlock the Background layer, in the Layers window, right-click the Background layer and select Layer From Background, as shown in the following illustration. In the New Layer window, click OK.

3 - 2 4 Tr e e C r e a t i o n 7. Select the Edit menu Define Pattern command to make a new pattern from the image. Click OK to confirm. 8. Select the Image menu Canvas Size command, and set Width and Height to 500 percent. Select the upper left square of the Anchor diagram as shown in the following illustration, and click OK. The canvas will increase to five times its original size, and the image will remain in the upper left corner. Zoom out to see the entire canvas.

9. Select the Edit menu Fill command and in the Contents group in the Use field, select Pattern. Click the dropdown arrow by the icon in the Custom Pattern field and select the pattern you created with the tree bark image. Click OK to complete the command. The entire canvas will be filled with a seamlessly tiled image of the tree bark, as shown in the following illustration.

The size of the texture map is now 8500x8500 pixels. Such a large texture map is not needed, and will use an unnecessarily large amount of system resources.

Tr e e C r e a t i o n 3 - 2 5
10. Select the Image menu Image Size command, reduce the images Width and Height to 2048x2048 pixels, and click OK.

The texture map now contains the same image, but tiled 5x5, corresponding to the tiling you set when testing the map in 3ds Max with the U and V Tiling values. 11. Save the texture map with the name Bark_Base.jpg. 12 . Close Photoshop, return to 3ds Max, and in the Material Editor, replace the Bark_Tile.jpg map in the bark material with Bark_Base.jpg, and set the U and V Tilling parameters to 1. The size of the bark should now be the same as in the previous version of the material.

Visible seams appear at the texture coordinates borders, as shown in the following illustration. To paint them out, you will need to set up the bark texture as a viewport background.

3 - 2 6 Tr e e C r e a t i o n 13. Put the Bark_Tile.jpg texture map into a free Material Editor sample slot as a map on its own. In the Coordinates rollout, choose Environ and make sure Screen is displayed in the Mapping dropdown. 14. Choose Environment from the Rendering menu, and drag the Bark_Tile.jpg map from the Material Editor slot to the Environment Map slot as an Instance. 15. Use the Alt+B shortcut to bring up the Viewport Background dialog box. Enable the Use Environment Background and Display Background options and click OK. 16. To prevent the texture map from appearing distorted in the viewports, its square aspect ratio must be preserved. Open the Render Setup dialog box (F10). In the Output Size group, unlock the image aspect ratio, then enter 1 for the Image Aspect value. This will ensure the background texture map doesnt stretch when displayed in viewports. Close the Render Setup window and activate the Show Safe Frames option with the Shift+F shortcut. The dialog boxes used for this process are shown in the following illustration.

If everything was done correctly, the viewport should look like the left image in the next illustration. 17. In Windows Explorer, make a copy of the Bark_Base.jpg file in the same folder, and name the copy Bark_Paint.jpg. You will use this new file to hold the results of the painting you do in the viewports. 18. Return to 3ds Max, select the trunk model, and choose Viewport Canvas from the Tools menu. In the Viewport Canvas dialog, click the Setup button. In the Object Setup window, choose Use existing texture, as shown in the right image of the next illustration. Click Pick texture, choose the Bark_Paint.jpg file, and then click Setup. This will cause all of the viewport painting to be recorded in this file and will also automatically replace the current material applied to the trunk model with material that has Bark_Paint.jpg in the Diffuse channel..

Tr e e C r e a t i o n 3 - 2 7
19. The sections of the bark on the background image are too large; they do not match the trees mapping. Change the values of the U and V Tiling parameters of the background texture map in the Material Editor so that the bark in the background texture map is approximately the same size as the bark on the tree trunk. The exact size doesnt matter, because with this technique youll be constantly zooming in and out and readjusting the tiling value. Note that it is okay to set the background image tiling to numbers higher than 1x1; it is only the material on the object that needs to have 1x1 tiling to have success with viewport painting.

20. Zoom in on a place on the tree trunk where a seam is visible. Rotate the view so that the area you are about to paint is as parallel as possible to the viewport. When using the Viewport Canvas tool, the texture you are painting is projected directly from the viewport background to the object, so having the painted area parallel to the viewport will prevent the pattern from warping as it is painted. Note that the tiling of the background texture needs to be changed when the Viewport Canvas Clone or Paint buttons are inactive. The tiling settings will not update in the viewport unless you deactivate the brush. 2 1. Go to the Material Editor and make sure that the Diffuse channel of the tree trunks material has Bark_Paint.jpg and not Bark_Base.jpg in it. Otherwise the results wont be visible.

22 . In the Viewport Canvas dialog, activate the Clone tool. Hold down the Alt key and click in the viewport where you want to start copying the map. Release Alt, and move the cursor over the seam in the model. Right-click when you are done painting.

23. Rotate the view, find the next seam to repair, and fix it in the same way. Do this with all the seams. If you have any trouble with this, you can overwrite Bark_Paint.jpg with Bark_Paint_Catapult.jpg as Bark_Paint_Catapult.jpg is the texture that has already been properly modified by us for your convenience. Next, we will create the texture map for the tree hollow. Over time, the circular opening of a tree hollow grows a thick scar of bark, while the inside of the hollow can become mossy. You will create new custom maps for this area to create this effect. 2 4. Press Setup in the Viewport Canvas window, and this time select the Assign new texture option. Press the Presets: 2048 button to set the Width and Height of the new map to 2048 pixels. Enter Hollow_Layer.tif as its name and specify its location as the same folder where you stored the other maps for the tree. Dont overwrite any existing files; change the filename if this file already exists.

3 - 2 8 Tr e e C r e a t i o n 25. Place the Hollow_Tile.jpg texture into a free slot in the Material Editor. This bitmap contains the scarred bark you will use to paint the hollow opening. In the Coordinates rollout, choose the Environ option and make sure it displays Screen in the Mapping field. 26. Press the shortcut key 8 to open the Environment dialog, and drag Hollow_Tile.jpg to the Environment slot to replace Bark_Tile.jpg if it is still loaded as the background image. Use same process as described in steps 15 & 16 to set the scene up correctly. 2 7. In the Options parameters group of the Viewport Canvas window, check the Generate Alpha Mask and Draw Wireframe options. If Generate Alpha Mask is active, 3ds Max will create an additional file with the same name and extension as the editable texture Hollow_Layer.tif, but with the addition of _mask at the end of the filename. The alpha mask is a black-and-white image where white pixels represent pixels that have been changed by painting, and black pixels represent untouched areas of the texture map. If the Draw Wireframe option is active while interactively drawing the texture in the viewport you will be able to see the wireframe of the object, which will help you to see the area of the hollow.

28. From the Brush Type dropdown, select Layer. This will cause strokes to be applied with consistent transparency. 29. As you are working, in the Material Editor, you will have to keep changing the value of the Angle W parameter in the Coordinates rollout for the Hollow_Tile.jpg texture map. This will rotate the texture map in the background, allowing you to paint in the direction of the tree fibers around the hollow. Choose one area of the circular opening to start your work, and rotate the map to align it with that area. 30. Using the Clone tool, paint the area inside and around the hollow on which the bark is missing. Then rotate the map again to match another area, and paint again. Repeat this process until the entire hollow opening is painted. You may have to cllick Reload under the Bitmap Parameters in the Material Editor to refresh the view of the newly painted map areas in the viewport. 31. Perform the same process on the mossy areas, this time saving to the new file Moss_Layer.tif and using the file Moss_Tile.jpg for painting. Save your work. You can also open the file Ch03-12. max if you want to see how this should look at this stage.

32 . Next, open Photoshop so you can touch-up these new maps. You could perform some basic adjustments in 3ds Max, such as color correction with the Composite Map, but Photoshop is far more powerful and is a program that you simply shouldnt do without if you are serious about creating good 3D work. Therefore, we are covering some of the critical features that you should be familiar with. 33. Lets start with the maps for the hollow. Open Hollow_Layer.tif and Hollow_Layer_Mask.tif.

Tr e e C r e a t i o n 3 - 2 9
34. Hold down the Shift key, and drag the Hollow_Layer_Mask.tif image into the Hollow_Layer.tif image. 35. If the Background layer is locked, then select it on the Layers panel and from menu choose Layer New Layer From Background and click OK to confirm. In the Channels panel, click any channel while pressing the Ctrl key to select the black areas. Return to the Layers panel, and invert the selection with the Ctrl+Shift+I shortcut. Hide the black and white layer and activate the bottom layer and press Delete on the keyboard to delete the area filled with gray. Delete the black and white layer.

36. Open Moss_Layer.tif and Moss_Layer_Mask.tif, and repeat the process.

37. Open the Bark_Paint.jpg file in Photoshop. Holding down the Shift key, drag the layers which you just deleted the backgrounds from in Hollow_Layer.tif and Moss_Layer.tif into Bark_Paint.jpg. Name the layers Bark, Hollow, and Moss as appropriate.

38. Hide the Hollow and Moss layers and select the Bark layer. Add a new adjustment layer, choosing Curves as the type. Rename the layer Less_Light. You will use this layer to decrease the brightness of the texture map parts that are too light. 39. Select the Less_Light layer and adjust the curves form, as shown in the right image in the following illustration. The left image of the following illustration shows the Bark layer, and the middle image shows the Less_Light layer after the curve is adjusted.

3 - 3 0 Tr e e C r e a t i o n

40. Add another Curves adjustment layer and name the new layer More_Dark. Adjust the curve as shown in the right image of the following illustration. The left image shows the Less_Light adjustment layer applied, and the middle image shows the More_Dark adjustment layer applied.

41. Next, we will adjust the overall hue of the texture map. Create a new adjustment layer, this time with the type set to Color Balance, and name it Brown. Adjust the layers colors as shown in the following illustration.

Tr e e C r e a t i o n 3 - 3 1
42 . Next, we will create a single image from the brown-tinted result so we can adjust it separately. Select all the layers, except the currently hidden Moss and Hollow, right-click any of the selected layers, and choose Duplicate Layers from the dropdown menu that appears. Click OK to create the duplicate layers in the same file. With all the new layers still selected, choose Layer menu Merge Layers. Name the merged layer Brown_Temp. 43. Now we will remove contrast from the image without affecting its hues. Access the Channels panel and look at the channels available. We can see that the channel with the strongest visible contrast is the Blue channel so we will adjust that channel. Select the Blue channel, hold down the Ctrl key, and click the channel to select its lighter pixels. 4 4. Move to the Layers panel and, without removing your selection, choose Layer New Adjustment Layer Curves to add new Curves adjustment layer. Name this layer Darker. It will be masked from the selection you made on the Blue channel. 45. Hold down the Alt key and click the layer mask to see its results represented on the source image. Use Filter menu Blur Gaussian Blur with Radius = 5 pixels to blur the mask a little. Then choose Image menu Adjustments Curves and lighten it a little. The adjusted mask and the shape of the correcting curve are shown in the next illustration.

46. Select the Curves layer named Darker. Adjust the shape of the curve as shown in the left image of the following illustration. The right image shows the result of the curve application.

3 - 3 2 Tr e e C r e a t i o n 47. We will again adjust the amount of contrast in the image. Hold down the Ctrl key while clicking on the Layer mask thumbnail of the Darker layer to select the light areas of the mask. Without removing your selection, choose Layer New Adjustment Layer Curves to add another Curves adjustment layer. Name it Less_Contrast. Hold down the Alt key and click the Layer mask thumbnail of the new layer to see its results represented on the source image. Then choose Image menu Adjustments Curves and adjust the curve shape so that the image has more contrast. The resulting mask and the shape of the correcting curve are shown in the next illustration.

48. Select the Curves layer named Less_Contrast and adjust the shape of the curve as shown in the left image of the next illustration. The resulting image is shown on the right.

49. Make the Hollow and Moss layers visible. For the Moss layer, select the Overlay blending mode.

50. Save the file as Bark.psd. Next, we will create a custom map to emphasize the bumpiness of the tree trunk and the depth of the hollow. You will use the existing surface map as a base, and adjust the maps contrast in Photoshop.

Tr e e C r e a t i o n 3 - 3 3
51. In 3ds Max, open your last saved scene or open Ch03-12.max file, select the trunk model and choose Rendering menu Render Surface Map. In the dialog box, set the texture size to 2048x2048. Click the Cavity Map button to render the bitmap. This creates a new map from the existing surface, showing light and dark areas to represent bumps and cavities. Click the Save image button and save the new map as Cavity_Mask.tif. Under Setup, in the Save Image dialog box, you may have to select the Store Alpha Channel option.

52 . Open Cavity_Mask.tif in Photoshop. Go to the Channels panel and hold down the Ctrl key while clicking the Alpha 1 channel to select the light parts of the channel. Return to the Layers panel, invert the selection, and fill the selected area with black with the Shift+F5 shortcut. 53. Remove the selection, and use Curves to give the image more contrast, as shown in the next illustration. Save the file.

3 - 3 4 Tr e e C r e a t i o n 5 4. In the Bark.psd file, drag the Brown_Temp layer above the Less_Contrast layer. 55. Select the Moss, Hollow, and Brown_Temp layers, duplicate them, and flatten them to one layer with Ctrl+E. Name the new layer Relief. 56. Holding down the Shift key, drag the Cavity_Mask.tif file into the Bark.psd file. Name the new layer Cavity_Mask. 57. Select the Cavity_Mask layer, go to the Channels panel, and click any channel while holding down Ctrl to select the white areas.

58. Return to the Layers panel and select the Relief layer. Choose Layer menu Layer Mask Reveal Selection. 59. We only needed the Cavity_Mask layer to get the selection. Delete it now, as we no longer need it. 60. Drag Brown_Temp layer back under Darker layer. 61. To the Relief layer, apply two Curves adjustment layers. To make both layers influence only the Relief layer, select them and choose Layer menu Create Clipping Mask. Adjust the curves as shown in the following illustration, on the first and second layers respectively.

62 . To darken the entire texture map a little more, add another Curve adjustment layer on top of all the layers. The curve form is shown in the next illustration. The right image shows how the texture map looks after all the correction steps.

Tr e e C r e a t i o n 3 - 3 5
63. Save the file as Bark.psd. You can also open the Bark.psd file from the books website to compare your results. 6 4. Save this file again as Bark.jpg. This file will be used as the texture map for the tree trunk model. A jpg file is much smaller than a psd file, so using a jpg file will save memory. 65. Now we will make a displacement map from the file. In Bark.psd, delete all of the layers except Moss, Hollow and Brown_Temp. 66. Select the Brown_Temp layer. Use Image menu Adjustments Desaturate to make the image black and white. 67. Add a new Curve adjustment layer and adjust its curve as shown in the following illustration.

68. Select the Brown_Temp layer and choose Filter menu Convert for Smart Filters. With this tool, you can change the filter settings applied to the layer, or cancel their influence on the layer altogether. 69. With the Brown_Temp layer still selected, use Filter menu Blur Gaussian Blur with Radius set to 1 pixel to make the image a little softer. 70. Hold down the Ctrl key and click the Hollow layers image thumbnail to select the filled areas of the layer. No relief is necessary in these areas, so we will fill them with black. Select Hollow layer and choose Edit menu Fill to fill the selected area with black. Press Ctrl+D to remove the selection. 7 1. Select the Moss layer, and change it back to the Normal blending mode. Use Image menu Adjustments Desaturate to make the image black and white. Invert the layers colors. 72 . Choose Layer menu Layer Style Blending Options or double-click the layer name in the Layers panel. In the Layer Style window in the Blending Options section, in the Blend If group, set the placement of This Layer and the Underlying Layer sliders as shown in the next illustration. The result is shown on the right. To define a range of partially blended pixels, as shown in the illustration, hold down Alt , and drag one half of the slider triangle. The two values that appear above the divided slider indicate the partial blending range.

3 - 3 6 Tr e e C r e a t i o n

73. Save the file as Bark_Displ.psd. You can compare your results with the file Bark_Displ.psd from the books support files. 74. Save this file again as Bark_Displ.jpg. 75. Return to 3ds Max, disable Safe Frames, Viewport Background, and Environment Background. Create a VRayMtl and assign it to the tree trunk model. In the Diffuse channel, place the Bark.jpg texture map. 76. Add a VrayDisplacementMod modifier to the tree trunk. In the Texmap slot, place the Bark_Displ.jpg texture map. This will add extra bumpiness to the texture when it is rendered. Adjust the modifiers parameters as shown in next illustration. 7 7. Render the tree trunk. With GI turned on, the rendering should look similar to the right image in the following illustration.

Tr e e C r e a t i o n 3 - 3 7
78. The tree trunk texturing is now complete. Save your scene. You can also see the final result in the file Ch03-13.max.

Exercise 5: Creating leaves with the Hair and Fur modifier


In this exercise, we will make tree leaves using the Hair and Fur modifier. This modifier is intended for hair and fur creation, but it can also be used to scatter objects across a surface. The Hair and Fur modifier offers more flexibility and control over the distribution process than other tools like Scatter. Note: The Hair and Fur feature in 3ds Max uses a lot of RAM. It is highly recommended that you work on a 64-bit computer with at least 8GB memory (preferably 16). You will also experience less RAM consumption if you are using 3ds Max 2011 versus 2010. If your system crashes during this exercise and you are using 3ds Max 2010, we suggest installing the trial version of 3ds Max 2011, as you will have a better chance of not crashing. 1. In 3ds Max, open Ch03-14.max, which contains all the objects needed for this exercise. Alternatively, you can open your own file with the finished model of the tree crown. If you use your own file, you will need to delete the tree trunk from this file, and use Merge to place the painted trunk model from the scene saved in the previous exercise. Then merge the Flat_Leaf object from the file Ch03-15.max. 2 . Select the BlobMesh01 object and apply the Hair and Fur (WSM) modifier to it. In the viewport, you will see hairs on the BlobMesh01 object, as shown in the left image of the following illustration. 3. In the Modify panel, turn on Display Guides in the Display rollout. The viewport will look similar to the right image in the following illustration.

4. In the Styling rollout, click the Style Hair button. This enables hair editing mode, where you can change the hair length, the direction of growth, and the hair angles.

3 - 3 8 Tr e e C r e a t i o n 5. In the Styling group, click the Scale button and use the slider to increase the brush radius to include the entire object. Turn off the Distance Fade option so the brush influence is the same throughout the entire brush.

6. Move the brush over the guide hairs and decrease the guide length, as shown in the left image of the next illustration. 7. In the Utilities panel, click the Recomb button to make the guide hairs droop downward, as shown on the right of the next illustration.

8. In the Styling group, click the Stand button, and drag the brush in the Front viewport a little to raise all the guides roots, as shown in the next illustration.

Tr e e C r e a t i o n 3 - 3 9

9. If you make a mistake and need to restore the original guides so you can start over, click Finish Styling and then the Regrow Hair button in the Tools rollout. 10. After the guides are combed as needed, click Finish Styling in the Styling rollout to exit styling mode. 11. Next, you will replace the hairs with leaves. In the Instance Node group in the Tools rollout, click the button labeled None and click the Flat_Leaf object. This changes all the hairs into leaves. 12 . In the Display rollout, turn off the Display Guides option to hide the guide hairs. Make sure the Display Hairs option is enabled, and enter 100 for the Percentage parameter to show all the leaves in the viewport. Set the Max. Hairs parameter to 30000. 13. In the General Parameters rollout, set Hair Count to 30000. If this setting crashes your computer, you can use a much lower one, like 2500, just for the purpose of completing the exercise. 14. To make all of the leaves have the same size, set Rand. Scale to 0 in the General Parameters rollout. 15. Now the leaves look too narrow. To return to the normal proportions of the leaves, set Root Thick to 20. 16. If the high number of leaves in the scene slows down your system too much, decrease the Percentage parameter in the Display rollout. Even with a lower percentage of leaves showing in viewports, you will still be able to see enough of the result to finalize the remaining settings. 17. In the General Parameters rollout, set Cut Length to 80 to shorten the leaves relative to the length of the guide hairs. This lower value will also raise the ends of the leaves a little. 18. The other parameters in the Hair and Fur modifier can be left at their default values. If you like, you can experiment with additional parameters to make the leaves distribution and shape more stylized. 19. In the the BlobMesh01 objects Object Properties, turn off the Renderable option as shown on the left of the next illustration. This will hide the BlobMesh object in renderings, leaving just the leaves (hairs).

3 - 4 0 Tr e e C r e a t i o n 20. Save the scene. The result of the work done is shown on the right of the next illustration. You can also open Ch03-16.max to compare your result. Note that on 32-bit systems with limited memory, you can easily crash 3ds Max while rendering this file. Reducing the hair count will allow for rendering, but the rendering will not look as good.

Summary
This chapter illustrated numerous techniques for modeling and texturing organic objects using tools within and outside of 3ds Max. Although there are plenty of shortcuts and numerous ways to speed up your workflow, in the end, you only get out of your scenes what you put into them. As the saying goes, the devil is in the details, and good scenes have the kinds of details we demonstrated in this chapter. Modeling and texturing details are equally important and you should strive to build in the same details you see in real life, provided your systems can handle them. Hopefully, you have now been introduced to many new things that you can now incorporate into your workflow.

Chapter 4

Scarecrow

T his is The lasT chapTer on modeling for this project, demonstrating once again how easy and flexible the modeling process can be in 3ds Max. To complete the instruction on modeling and texturing, we chose a relatively complex object a scarecrow. Working with this object, we will demonstrate how to work with a polygonal mesh, texture coordinate unwrapping, and texture painting.

Figure 4-1. The scarecrow created in this chapter

4-2 Scarecrow What makes this project interesting is that it is made from multiple objects of different shapes. Before we start modeling these objects, lets analyze them and choose the most suitable modeling method for each. The scarecrow is made from the following elements: pumpkin, hat, robe, rope, button, post, and body stuffed with hay. Lets decide the order in which we will create all these elements, and the tools we will create them with: Head: Sphere primitive Hat: Lathe object Robe: Cylinder primitive Rope: Simple spline with thickness Button: Splines Post: Splines converted into geometry Body: Box modeling All objects except the rope will be converted to an Editable Mesh or Poly for editing. To help speed up model creation, were going to add to our list of tools. For unwrapping texture coordinates, we will use a program called UV Layout from Headus. This software creates high-quality unwrapped UVWs with minimal distortions, and does so faster and more effectively than traditional unwrapping techniques. A trial version of this software can be downloaded from the companys website at http://www.uvlayout.com. After unwrapping the UVW coordinates, we will create all the necessary textures in Adobe Photoshop, then create additional textures with PixPlant. PixPlant is available as a plug-in for Photoshop, or as a standalone application. You can download this application from http://www. pixplant.com.

Exercise 1: Modeling the pumpkin head


The pumpkin head has an obviously round shape with a specific number of segments, so it makes sense to start with a Sphere. Then we can use ShapeMerge to carve out the eyes and mouth. After that, we will edit the wireframe and apply the Shell modifier to give it some thickness. And finally, we will apply the TurboSmooth modifier to smooth out the surface. 1. Open the file Ch04-01.max. In the center of the scene you will see a Sphere object with Radius = 50 and Segments = 16. 2. Convert the object to an Editable Poly. Name this object Head. 3. In the Front View go to Vertex sub-object mode and move the vertices at the top of the object along its Z axis as shown in the following illustration, left (before) and right (after).

Scarecrow 4-3
4. Select the topmost vertex of this object, as shown in the left image of the following illustration, then hold down Ctrl and click Edge. This will select all edges connected to the selected vertex, as shown in the middle image of the following illustration. 5. With the edges still selected, click Connect to add an additional ring of edges to the objects wireframe, as shown in the right image.

6. Increase the diameter of the first and second edge loops about 25%. To do this, add any edge on the second edge loop to the current selection, and click the Loop button in the Selection rollout to select the entire loop. Use Select and Uniform Scale and Edge Constraints to scale the selected edges about 25% along the X and Y axes. Turn off Edge sub-object mode. 7. Apply the Symmetry modifier to this object. Set the Mirror Axis parameter to Z to make the lower half of the pumpkin symmetrical with the upper half. 8. Now you will select polygons to indent to form the pumpkin segments. Apply an Edit Poly modifier to the object. In Edge sub-object mode, select any horizontal edge on the object, as shown in the first image of the next illustration. 9. Click Ring in the Selection rollout to select all edges parallel to the originally selected edge, as shown in the middle image of the following illustration. 10. Hold down Ctrl and click Polygon to convert the selection to polygons, as shown in the right image of the following illustration.

11. Deselect the two polygons at the top and the bottom of the sphere as shown in the left image of the following illustration.

4-4 Scarecrow 12. Use the Bevel tool with the parameters shown on the right side of the right image in the following illustration to bevel the selected polygons.

13. Since we are using Local Normal as our Bevel Type, you can speed up this procedure by selecting all of the alternating strips of polygons and beveling them all at once. After youve finished half of the strips, do the other half; you should bevel 16 strips in all. At the end your object should look similar to the left image in the following illustration. 14. Apply the TurboSmooth modifier to this object with Iterations = 1. This will increase the level of detail on the object and make it smoother. The resulting object should look similar to the one shown in the right side of the following illustration.

15. Convert this object to an Editable Poly. 16. Now you will add light asymmetry and deformation to this object to make it look more organic. From the Tools menu, open the Graphite modeling tools and use the Shift, Push/Pull, and Relax/ Soften tools on the Paint Deform menu on the Freeform tab to adjust the object. Have fun sculpting. The following illustration shows an example of light deformation on this object. 17. Save your work. If you want you can load the file Ch04-02.max to compare your result with a finished model at this stage.

Scarecrow 4-5

18. Now lets create the cutouts to carve out the eyes and mouth. Go to a Front view. On the Create panel go to the Shapes menu and click the Line button. 19. Disable the Start New Shape option, so that when we create additional splines, they will all be part of the same object.

20. Create a spline object that looks like half of a jack o lanterns toothy grin. If necessary move the pumpkin geometry back so it is behind the line you have created. Refer to the following illustration.

4-6 Scarecrow 21. Go to Spline sub-object mode and select the single Spline that makes up this shape. 22. On the Modify panel go to the Geometry rollout. Enable the Copy option, turn on the Mirror Horizontally button, then click the Mirror button. This will create a mirrored copy on top of the original. The result will look similar to the left image in the following illustration. 23. On the Main toolbar, right-click the Snaps toggle button to bring up the Grid and Snap Settings dialog. On the Snaps tab, enable the Vertex option, then in the Options tab in the Translation group, turn on the Use Axis Constraints option. Close the dialog box, and press the shortcut S to turn on Snaps. 24. Move the spline along its X axis until it snaps to the end of the original spline, as shown in the right image of the following illustration. Now disable snaps by pressing S again.

25. To attach both splines into one, go to the Vertex sub-object mode, select all of the vertices where the two splines meet, and click Weld on the Geometry rollout. You may need to increase the Weld Threshold value (to the right of the Weld button), to make sure that vertices that needed to be welded are within the threshold distance.. 26. Move vertices around to add light distortion and asymmetry to the object. For example, you can make one bottom tooth longer than the other, and one top tooth sharper than the other. 27. On the Geometry rollout, click Create Line and create a spline for the eye shape. An angled triangular shape is appropriate for a scarecrow. Refer to the left image in the following illustration.

28. Make a mirrored copy of the eye and edit it a little so the eye shapes dont match exactly. The result should look similar to the right image in the following illustration.

Scarecrow 4-7
29. In these instructions, we created all of the splines as part of the same shape. If you accidentally created them as separate objects, use Attach to attach them together into one object. Make sure that you end up with closed splines with all vertices in the same plane, otherwise the remaining steps wont work correctly. Next, well use the ShapeMerge compound object to cut out the mouth and eye holes from the pumpkin object. If you dont like this particular feature, and many artists dont, you can achieve the same results as this next section by using the ProCutter, Boolean or ProBoolean features; however, you would have to perform the additional steps of extruding the spline object and positioning it properly along the Z axis (as seen from the Front view). As mentioned in the introduction of this book, an important consideration in the production of this book was to show as many features as possible, even if it meant showing a method that is less commonly used. We mention this again here because the ShapeMerge command is not liked by many veteran artists, although we like it very much and use it often. The ShapeMerge command is not popular, because many artists dont understand how to use it properly and dont understand what is happening with it behind the scenes. If you want to learn more about it, please check out the Beginner to Intermediate book from 3DATS, as a thorough description and comparison is provided. The ShapeMerge feature may be problematic if not used properly. We will use it in this and the next exercise, but if you do not like the results you are getting, we invite you to try the ProBoolean feature. 30. Select the pumpkin object, and select Create Geometry Compound Objects ShapeMerge. Then go to the Modify panel. In the Pick Operand rollout, click the Pick Shape button and click on the eye/mouth shape. This will imprint the spline into the structure of the pumpkin wireframe. You can see the effect if you display edges in the viewport by pressing F4. 31. Turn on Cookie Cutter in the Operation group to cut holes in the object where the spline is imprinted.

If the operation does not work for you as described, it could be because one of the splines was not closed, the splines overlapped themselves, or the pumpkin itself was not built correctly. If you want, you can perform the exercise with the file named Ch04-03.max. In this file, the pumpkin object is uncollapsed with the Cookie Cutter option active and with mouth and eyes splines already set. You can also continue on with this file if you want. 32. After the cutting process there are extra vertices along the edges of the cutouts, as shown in the top image of the following illustration. Convert the object into an Editable Poly and go to Vertex sub-object mode. On the Selection tab of the Modeling Ribbon, go to the By Numeric group and set Edges = 2, highlight the Equal (=) button (if not already highlighted), and click the Select icon (the icon that looks like a pointer). This will select all of the vertices that have exactly two edges attached to them. 33. Deselect the vertices that you do not want to remove, leaving only those vertices selected that were created by ShapeMerge. Use the Remove tool to remove the extra vertices. In the bottom-left image of the following illustration you can see those vertices selected that need to be removed, and in the bottom-right image you can see the object with extra vertices removed. The Remove tool can be found in the Command panel, the Graphite Tools ribbon, and perhaps most conveniently in the quad menu. As a side note, if you invoke a command via the quad menu, then you can repeat it by just clicking in the quad header.

4-8 Scarecrow

It is important to note that your geometry will not be exactly the same as the geometry shown in the illustrations. As such, the exact vertices or edges you select in the upcoming portions of this exercise will be different than those selected in the images; however, as long as you understand what is being explained and can translate it to your geometry, you will be fine. 34. Now, lets clean up the geometry. Switching between Vertex and Edge sub-object modes, use the Connect, Target Weld, Edit Vertices, and Cut tools to arrange the topology into four-sided polygons and eliminate tiny triangles. You can also use the PaintConnect tool on the Edit Panel of the Modeling Ribbon. In the following illustration, you can see an example of fixed topology. Save your work when youve finished this; youve put a lot of effort into this shape so far. If you like you can load an interim file here for comparison, Ch04-04.max.

Scarecrow 4-9
35. To add thickness to this object, apply the Shell modifier to it. Set Inner Amount = .4, Outer Amount = 0, and enable the Bevel Edges option. 36. In the Top view, create a spline as shown in the left image of the following illustration. The spline size does not matter in this case because the thickness of the object is defined by the Inner Amount parameter of the Shell modifier. We only need the shape of this spline, because it will define the shape of the edge of the pumpkin as shown in the following few illustrations. 37. Go to Vertex sub-object mode, select both vertices, and right-click either one to choose Bezier Corner from the quad menu. Adjust the Bezier tangent handles to add curvature to the spline as shown in the right image of the following illustration. In the Interpolation rollout, set Steps = 4.

38. Select the Head object. Go to the Modify panel and in the Shell modifiers parameters, click Bevel Spline. In the active viewport, pick the spline that we created in the previous step. This will make the edges of the pumpkin cutouts curve slightly, as if they were cut manually. Notice in the right image of the following illustration that the edges of the cutouts look concave instead of convex, as shown in the left image. If yours appear this way, then go to the splines Spline sub-object mode and reverse the spline using the Reverse tool.

The Shell modifier extruded the outer pumpkin shape with the rib indentations, but the inside of a pumpkin doesnt have these ribs. Lets get rid of them by relaxing the polygons on the inside of the pumpkin.

4-10 Scarecrow 39. On the Modify panel for the Shell modifier, turn on the Select Inner Faces checkbox. This will automatically select all the polygons on the objects inner surface. 40. Apply an Edit Poly modifier and go to Polygon sub-object mode. On the Selection rollout click Shrink three times to deselect the polygons around the openings. On the Edit Geometry rollout click Relax Settings, and in the Relax dialog box, set Amount = 1 and Iterations = 5. Click OK. 41. Now you will add some edges to the teeth to help them keep their overall shape when the TurboSmooth modifier is applied later on. Go to Edge sub-object mode and select any vertical edge on the tooth, as shown in the left image of the following illustration. Click Ring to select parallel edges, then click Connect Settings. In the Connect Edge settings dialog box, adjust the Slide parameter so that the new edges created with the Connect tool will be shifted toward the end of the tooth, as shown in the right image. Repeat this procedure for each tooth.

If you apply a TurboSmooth modifier now, you will find that it smoothes out the eye openings too much, as shown in the left image of the following illustration. To prevent this from happening, you can do one of two things: you can use the MeshSmooth modifier instead of TurboSmooth and you can select the edges that you want to stay sharp and set their Crease parameter to 1.0, or you can add extra edges to the eye. Adding extra edges gives you more control over the shape, allowing the edges to smooth a little without going completely sharp. 42. Go to Edge sub-object mode and select an edge, as shown in the right image of the following illustration.

43. While holding down Ctrl on the keyboard, click the down arrow on the spinner next to the Ring button several times to select all the parallel edges around the outer upper corner of the eye.

Scarecrow 4-11
44. Click Connect Settings and in the Connect Edges dialog box set Segments = 2, Pinch = 70, Slide = 0. Click OK.

45. Go to Vertex sub-object mode. Select two vertices as shown in the left image of the following illustration, and click Connect to connect the selected vertices with an edge. Repeat this procedure to connect the two other vertices near the middle of the eye cutout (see the middle image of the following illustration). 46. Go to Edge sub-object mode, select the new edges you just created, and click Connect Settings. Set Segments = 1, Pinch = 0, Slide = 0, and click OK to add the new edge to the wireframe. 47. In the Edit Geometry rollout, in the Constraints group, enable the Face option to constrain the edge transformations to the existing polygons, then scale this new edge down with Select and Uniform Scale. Refer to the right image of the following illustration.

48. Repeat the same procedure around the outer lower part of the eye, then repeat again on the other eye. The result should be similar to the left image in the following illustration. 49. Collapse the model to an Editable Poly, then to squash the pumpkin a little bit, apply a Stretch modifier to the object with the following parameters: Stretch = -0.1, Amplify = -14.7, Stretch Axis = Z. Your parameters may differ from these depending on the topology of your model. 50. Assign a TurboSmooth modifier to the object, and set Iterations = 1. The object should look similar to right image in the following illustration. The TurboSmooth modifier is assigned in order to visually evaluate the quality of the model; later you will want to remove it before unwrapping the texture coordinates.

51. Save your scene. You can also open Ch04-05.max to compare the results.

4-12 Scarecrow

Exercise 2: Modeling the hat


Now lets create the hat. We will model the hat as a Lathe object and then tweak the geometry after collapsing it to an Editable Poly. Well cut holes on the hats surface with the ShapeMerge and Boolean compound objects. Then we will add thickness to the hat with the Shell modifier and clean it up as an Editable Poly. 1. Reset 3ds Max, go to a Front view, and create a spline similar to the one shown in the following illustration, or open Ch04-06.max, which contains this spline. In the Interpolation rollout set Steps = 12 to give us a good level of detail for when we apply the Lathe modifier to the spline.

2. To prepare for the Lathe operation, we will position the splines pivot point at the right end of the object. Go to the Hierarchy panel and click Affect Pivot Only. Click the Align icon on the Main toolbar and with the parameters from the left image of the following illustration, align the splines pivot point to the right end of the spline. Click OK. The right image shows the result. Click Affect Pivot Only again to turn it off.

Scarecrow 4-13
3. Apply a Lathe modifier to this spline. Set Degrees = 360, turn on Flip Normals and Weld core, set Segments = 40, and in the Direction group click Y to set the revolution axis. The resulting object should look similar to the left image in the following illustration. If the object appears to be inside-out, try turning Flip Normals on and off to see which way the hat looks best. 4. Add the Edit Poly modifier, then on the Modeling Ribbon go to the Freeform tab, and in the Paint Deform menu, use the Shift, Push/Pull, and Relax/Soften tools to add variation to the objects shape. Refer to the right image in the following illustration for an example.

5. Apply a Relax modifier to slightly soften out the object. Set Relax Value = 0.5, Iterations = 7. Collapse the object to an Editable Poly. 6. Now lets create ragged shapes to cut holes from the hats brim. Draw a few splines in the shape of frayed holes, similar to those in the left image in the following illustration. You can continue with the scene Ch04-07.max that has the hat geometry and splines for frayed holes already prepared for your convenience, or if you choose to continue with your model you can simply merge the splines from that file. 7. Go to the Top view and position the splines in relation to the hats brim, as shown in the right image of the following illustration. Be sure to place the splines in such a way that they extend beyond the edge of the brim, at least by a small amount.

4-14 Scarecrow 8. Select the hat and enable the ShapeMerge command. Go to the Modify panel and on the Pick Operand rollout click Pick Shape and click each spline. Enable the Cookie Cutter option to cut the spline shapes from the geometry. The hats brim shown in the right image of the following illustration has these holes cut out. Now lets cut a hole in the hats crown using a Boolean compound object. 9. Copy one of the splines and reorient it in the Front view as shown in the left image of the following illustration. Apply an Extrude modifier to it and adjust the Amount parameter so the object is thick enough to go completely through the crown on that side of the hat. Refer to the right image in the following illustration to see how far to extrude the shape and how to position it correctly.

10. Select the hat. From the Compound Objects panel, select Boolean. On the Parameters rollout, select the Subtraction (A-B) option. On the Pick Boolean rollout click Pick Operand B, then in the active viewport pick the extruded spline. This subtracts the extruded shape from the hat, cutting a hole in the hats crown. 11. Apply a Shell modifier to the object to give it thickness. Set Inner Amount = 1 and Outer Amount = 0. 12. Because the ShapeMerge and Boolean compound objects added additional vertices along the edges of the cutouts, there are errors in the geometry after we apply the Shell modifier. To fix this, apply an Edit Poly modifier to the object and drag/move this modifier below the Shell modifier in the Modifier Stack. Turn on the Show End Result on/off toggle. In this way, we can correct the hats geometry before the Shell modifier is applied and see the end result while we work. 13. Go to Vertex sub-object mode of the Edit Poly modifier, and use the Weld, Target Weld, and Remove tools to weld or remove vertices in the areas where errors show up on the final geometry. An example of such an area is shown in the left image of the following illustration. The result of using the Weld tool to weld vertices and get rid of errors is shown in the the right image.

Scarecrow 4-15

14. Collapse the object to Editable Poly and save your work. If youve had problems, you can continue by loading Ch04-08.max. Now you will delete some polygons to make it easier to select the inside of the hat, and for mapping later on. Add the Edit Poly modifier at the top of the Modifier Stack, access Edge sub-object mode, and select the edges on the inner surface of the hat, as shown in the left image of the following illustration. Delete the selected edges. 15. Now, we will clean up the edges along the inside of the hole. Select any edge along the inside of the hole, and click Ring to select all parallel edges, as shown in the right image of the following illustration. Delete the selected edges.

16. Go to Element sub-object mode and select the inner surface of the hats crown, refer to the left image of the following illustration. Delete the selected geometry.

4-16 Scarecrow 17. Exit sub-object mode. Apply the Turn to Poly modifier. Enable the Keep Polygons Convex, Limit Polygon Size and Remove Mid-Edge Vertices options, and set Max Size = 4. Max Size limits polygons to having no more than 4 edges; any polygons with more than 4 sides will be split into 3- and 4-sided polygons, which is a good modeling practice for clean topology. Keep Polygons Convex works for some models and not others, and its best to just try it and see how it affects your model. Limit Polygon Size causes the Max Size to be enforced. Remove Mid-Edge Vertices cleans up bad topology. 18. Apply a Smooth modifier to the object. Enable the Auto Smooth option, and set Threshold = 30.0. 19. Collapse the object to an Editable Poly.

20. The hat model is now finished. Save your file. Your result should look similar to the right image of the following illustration. You can also open Ch04-09.max and compare your results.

Exercise 3: Modeling the robe and body


The scarecrows robe and body are modeled using tools described in earlier exercises, so while the instructions are given in this exercise, theyre not given in as much detail as before. If you want to see how well you can figure out which tools to use, you can simply follow along with the pictures and use any tools you like. The scarecrows robe is modeled from a cylinder, and the body with a box. After we finish modeling the body, we will use the Cloth modifier to make the robe hang on the body realistically. The rope will be created from a simple spline object wrapped around the body. The button and the post will start out as splines, then become geometry that we will tweak with polygonal modeling tools. Lets start with the robe. 1. Reset 3ds Max. 2. Create a Cylinder primitive with the parameters shown in the following illustration, and convert it to an Editable Poly. Name the object Robe_Low_Poly.

Scarecrow 4-17

3. To start forming the sleeves, use the Extrude tool to extrude polygons at the top of the object to 90 units, as shown in the following illustration.

4. Delete all end polygons to create openings for the hands, neck and the bottom of the robe, as shown in the left image of the following illustration. 5. Add additional edges, as shown in the middle image. 6. Select polygons as shown in the right image and delete them to split the front of the robe into left and right sides.

4-18 Scarecrow 7. Use Target Weld and other tools to shape and clean up the wireframe, including the collar. In the left image of the following illustration, you can see the vertices on both sides of the robe that need to be target-welded to vertices on each side. In the right illustration, you can see the result after vertices are welded.

8. Using the tools to modify vertices, edges, and polygons, adjust this object to look similar to the first two images of the following illustration. Apply the TurboSmooth modifier with 1 iteration and collapse the object to an Editable Poly; at this stage the model should look similar to the right image of the following illustration. Compare your result to the file Ch04-10.max.

Normally, it is fine to continue with the geometry creation and unwrap the texture coordinates after the geometry is finished; however, because the final version of the robe model is going to be high-poly, unwrapping the texture coordinates would be much easier at this stage. The detailed explanation of the process of unwrapping texture coordinates in UVLayout will be provided in the second half of this chapter; however, because we want to continue working on the model at this stage after it has been unwrapped, we are providing it for your convenience. The file exchange between 3ds Max and UVLayout is done via the OBJ file format, so the lowpoly version of the robe model with the unwrapped texture coordinates is provided in OBJ format.

Scarecrow 4-19
9. Select the Robe_Low_Poly object and from the application menu choose Export Export Selected. Export the robe to the file Robe_Low_Poly.obj. In the OBJ Export Options window, use the parameters shown in the left image of the next illustration, and click Export to save the file. We will use this exported model later to explain how the unwrapping in UVLayout was done prior to continuing with the next step. 10. Now delete the Robe_Low_Poly object from your scene. From the application menu choose Import Import, and select the Robe_Unwrapped.obj file. In the OBJ Import Options window use the parameters shown in the right image of the next illustration, and click Import.

11. Apply a TurboSmooth modifier to the robe with Iterations = 2, and convert the object into an Editable Poly. This will give you enough detail to add wrinkles to the robe.

4-20 Scarecrow 12. In the Modeling Ribbon, go to the Paint Deform group of the Freeform tab and use multiple deformation tools to simulate wrinkles on the robe. The result should be similar to the following illustration. You can also load the file Ch04-11.max to compare or continue.

13. In preparation for creating the scarecrows body, select the robe and press Alt+X on the keyboard to make it see-through in the viewports. 14. Create a Box with Height Segs = 4 and position it inside the robe. Change the boxs dimensions as necessary to fit it inside the right side of the robe. Name the object Body. 15. Convert the box to an Editable Poly. Extrude one polygon to start forming the arm.

Scarecrow 4-21

16. Shape the box using any of the tools, adding edges and polygons and moving vertices to form the right side of the body, as shown in the left image of the following illustration. After working with one side of the object, apply a Symmetry modifier to create the other side, as shown in the right image.

17. Collapse the object into an Editable Poly, and continue shaping the object so its not perfectly symmetrical. Apply the TurboSmooth modifier with Iterations = 2 and make sure the body object is not intersecting the robe. Save your work. You can also load the file Ch04-12.max to continue at this point, if you like.

4-22 Scarecrow Now, we will use the Cloth modifier to drape the robe over the body. The Cloth modifier uses a simulation of gravity to make the cloth fall along the Z axis, and detects when the cloth collides with another object. Parts of the cloth that collide will stop moving and settle against the object theyve collided with, while parts that dont collide will sway and drape like real fabric. You will make the robe fall until its shoulder area hits the body, and lower parts of the robe will fall and drape naturally. 18. Select the robe and apply a Cloth modifier to it. 19. Click the Object Properties button in the Object rollout of the Cloth modifier. In the Object Properties window select the Robe object, and choose the Cloth option. In the Cloth Properties group, select the Burlap preset from the dropdown menu. This preset will make the cloth behave like very thin burlap, which is a light, loose fabric (not stiff).

20. Click the Add Objects button, select the Body object, then click Add. In the Object Properties dialog choose the Collision Object option. Leave the other parameters at their default values and click OK. Now lets define the vertices that we want to stay fixed (unmoving) during the cloth simulation. We want the robe to look as though its held in place with a button at the top and the rope tie at the waist. To create this effect, we want to fix in place the two rows of vertices around the waist and the vertices in the button area. 21. Go to the Group sub-object mode of the Cloth modifier, and start selecting vertices. You can select the two rows of vertices in the waist area by selecting two vertices from each row, as shown in the left image of the following illustration, and clicking the Loop button. Then select about twelve vertices in the button area, as shown in the right image of the following illustration.

22. After all the fixed vertices are selected, click the Make Group button. Enter a name for the group and click OK to confirm. Then click the Preserve button to disable any deformation of this group of vertices during the cloth simulation. The vertices are now fixed in place. 23. To prevent the robe from intersecting itself during the simulation, go to the root level of the Cloth modifier, and in the Simulation parameters rollout enable the Self Collision option. 24. Now were ready to do the cloth simulation. In the Simulation group in the Object rollout, click Simulate Local (Damped) to start the simulation. Wait until the cloth completely drapes over the body of the scarecrow. When the cloth has almost stopped moving, click Simulate Local (Damped) again to stop the simulation.

Scarecrow 4-23
25. If the cloth intersected (went through) the body during the simulation process, stop the simulation and undo it by pressing Ctrl+Z. In the Simulation Parameters rollout, increase the Subsample parameter to 5 units and try again. This increase will cause the simulation to make more calculations and thus be more accurate, but it will also take longer. If you still have problems with the cloth going through the body, continue to increase the Subsample parameter 5 units at a time, keeping an eye on the simulation time so it doesnt become too long. Such intersections can also be caused by too little detail in the cloth and body wireframes, so you can also try increasing the Depth and Offset parameters in the Collision Properties section of the Object Properties window. 26. When youre satisfied with the cloth simulation, convert the robe to an Editable Poly. Save your scene. You can open the file Ch04-13.max to compare results.

Exercise 4: Modeling the rope, post, and button


1. Lets create the rope. On the robe, select a horizontal loop of edges, as shown in the following illustration. In the Edit Edges rollout, click Create Shape From Selection, set Shape Type to Smooth, click OK. That will extract a spline from the selected edges.

2. Select the new spline and apply a Normalize Spl. modifier to it with Seg Length = 10. This will rebuild the spline with fewer vertices spaced evenly throughout the spline. 3. Collapse this object into an Editable Spline. In the Rendering rollout enable the Enable In Renderer and Enable In Viewport options, and set Thickness = 4.5. 4. Move the splines vertices around to create a knot, as shown in the following illustration. Add vertices as needed. Two shaded and wireframe views are provided for reference.

4-24 Scarecrow

5. Apply a Mesh Select modifier to the spline. Go to Polygon sub-object mode and select the polygons at the ends of the rope. Apply a Relax modifier and adjust its parameters, in order to round out the ends of the rope. 6. Name the object Rope and collapse it to an Editable Poly. 7. Now you will create a T-shaped post to hold the scarecrow. Create a spline that goes horizontally through the sleeves, and a vertical spline going through the body and robe. Either create these splines as part of the same shape, or use Attach to attach them together after you create them. 8. In the Rendering rollout turn on Enable In Renderer and Enable In Viewport. Set Thickness = 8 and Sides = 16. In the Interpolation rollout set Steps = 30, and turn off Optimize and Adaptive. Your results should look similar to the following illustration.

Scarecrow 4-25
9. Convert the spline to an Editable Poly. Delete all of the polygons on the post that are hidden by the body, as these polygons are not needed. 10. Apply a Noise modifier to the object using the parameters from the right image of the following illustration. Collapse the object to an Editable Poly.

11. Now lets round off the ends of the post that go through the sleeves. Before you can do this, youll need to change the topology of each post cap so it isnt all one face. Select the polygons at the end of the post, and use the Inset tool to inset the selected polygons by a small amount. Then collapse the selected polygons. This replaces the single cap face with a pie configuration of polygons. Refer to the first three images in the following illustration. 12. To round off the post, select edges at the end of the post as shown in the fourth image in the following illustration. Use Chamfer with Chamfer Amount = 2.35 and Segments = 3. This will round off the ends of the post, as shown in the last image in the following illustration.

13. Lets create a crack in one side of the post to make it look weathered. Add two edges to the wireframe, as shown in the left image of the following illustration. Add the same two edges to the back side of the object so that four edges total are created. Then select the same polygons on both the front and back, as shown in the right image of the following illustration. Delete these polygons.

4-26 Scarecrow

14. Use the Bridge tool to build polygons inside the crack along its lower half as shown in the following illustration. Repeat this for the upper half of the crack.

15. Adjust the vertices at the end of the post to flatten them out, as shown in the left image of the following illustration. Select vertices as shown in this image, and use Collapse to collapse the selected vertices into one vertex. 16. Use Connect to add edges to the middle of the crack, as shown in the right image of the following illustration.

17. Select the four edges as shown in the left image of the following illustration and use the Bridge tool to connect them. Repeat this operation on the other set of four edges on the opposite side of the crack. 18. Bend the end of the crack to give it a more realistic look, as shown in the right image of the following illustration. Move and rotate vertices as needed to create this effect.

Scarecrow 4-27

19. Apply a Smooth modifier to this object, and turn on the Auto Smooth checkbox. Convert the object into an Editable Poly.

Lets finish up by creating the button. This object will be quite low-poly, since we are not planning to render any close-ups of this small object, a high level of detail is not necessary. 20. Continue with the current scene or open Ch04-14.max. Create five Circle shapes. Set the Radius of the first shape to 4.7 and the Radius of the four other shapes to 1. For each shape, in the Interpolation rollout set Steps = 3 and turn on the Optimize checkbox. Position all of the circles as shown in the left image of the following illustration, and make sure theyre all on the same plane. 21. Add an Edit Spline modifier to the larger circle and use the Attach tool to attach all the other circles to it. Convert the object to an Editable Poly, and name it Button. 22. Go to the Border sub-object mode and select the outer border of the object. Hold down Shift while scaling the selected edges out. This will copy the edges and create a rim of polygons around the object. Refer to the right image of the following illustration for the result.

23. Select the new rim of polygons and use Bevel on them, then modify the object with the Connect and Remove tools to make it look like the left image of the following illustration.

4-28 Scarecrow 24. Select the outer border and the borders of the four holes of the button. In the side view, drag the selected edges toward the back of the button while holding down Shift, to create another rim of polygons, as shown in the right image of the following illustration.

25. With the same edges still selected, apply the Symmetry modifier to the object. Leaving the edges selected should automatically make the Symmetry modifier mirror the button along the plane of the selected edges. Your button should look like the left image of the following illustration. 26. Convert the object into an Editable Poly. Now you can remove all the selected edges, as shown in the right image of the following illustration.

27. Select the polygons inside the button holes. Use Bevel to slightly bevel the selected polygons, as shown in the left image of the following illustration.

28. Apply a Smooth modifier to the object and then click AutoSmooth and adjust the Threshold as needed. This ensures all of the parts of the geometry are assigned to the same smoothing group. The result should look like the right image of the following illustration.

Scarecrow 4-29

29. Collapse the button into an Editable Poly, and save the scene. 30. Assemble all of the scarecrows elements into one scene using Merge. Then using the Soft Selection feature, select and manipulate the appropriate vertices on the right fold of the robe so that both folds appear to be buttoned up by the button in the middle. Make sure all the elements are properly named and position them so they look similar to the following illustration. You can open Ch04-15.max to compare your result.

4-30 Scarecrow

Exercise 5: Creating unwrapped maps


Before we create maps for the scarecrow, lets take a look at the concept of unwrapping a model so it can be mapped. A bitmap is flat, but a model is not. The unwrapping process breaks your model into several pieces and flattens them out so they can be associated with different parts of a bitmap. The model itself is unaffected by this process; its all done internally just for the purpose of mapping. For example, the right image in Figure 4-2 shows how you might break apart the scarecrows hat for mapping. The left image shows how these pieces relate to the original hat.

Figure 4-2. The scarecrows hat broken apart for mapping

You do have some control over how the model is broken up. To make the mapping process work efficiently, you should break the model into as few pieces (clusters) as possible. You should also endeavor to break the model along natural seams. If this isnt possible, you should break the model in areas where the resulting texture seam wont be too noticeable, such as the back of a model where the camera is unlikely to view it up close. When discussing unwrapping, we refer to unwrapped polygons as patches. Each patch corresponds to a polygon on the model. A set of connected patches is called a cluster. With mapping, youll want to use a square bitmap to maximize efficiency and save time. (3ds Max renders with square bitmaps faster than with non-square maps.) This means you need to fit the clusters into a square texture space, as shown in the right image of Figure 4-2. You should move around odd-shaped clusters to fit in a square area in the most efficient manner. This process is called packing. For example, in Figure 4-2 the three round clusters at the bottom of the texture space have been packed to make the most of the available space. When scaling clusters, be aware of the scale of clusters relative to one anotherif one cluster is scaled and another isnt, then the bitmap will show at a different scale for those clusters. In such a case, youd need to keep track of which cluster is at which scale. In general, youll want to scale all clusters for an object at once so they all retain the same scale relative to one another. In order to correctly gauge any stretching of the texture over curved surfaces (such as the pumpkin head), you can use a control texture for testing. A control texture is usually a checkered pattern that, when mapped over an object, clearly shows you areas where the map is stretching, as the checkers will stretch noticeably over those areas. Then you can adjust the mapping until youre

Scarecrow 4-31
satisfied that its evenly distributed. Examples of commonly used control textures are shown in Figure 4-3.

Figure 4-3. Commonly used control textures

3ds Max has the Unwrap UVW modifier, which can do all the tasks related to unwrapping, mapping, and working with clusters. However, we are going to use a program called UVLayout instead. This program automates many unwrapping operations, making the entire process much easier and faster. You can download a free trial version of UVLayout from http://www.uvlayout.com. On the web site, click on try and download the appropriate demo version. When you launch the program, make sure you click Try Professional Version or many of the tools discussed below will not be available. To work with this program, we will export the finished models to OBJ format so we can import them into UVLayout. When were done, well import the OBJ back into 3ds Max. Lets get started. 1. Open Ch04-16.max, which has all of the scarecrow models that will be exported in OBJ format so that they can be opened in UVLayout for unwrapping. Note that this file has the low-poly versions of the head and the robe models. 2. Select the Head object and from the Application menu choose Export Export Selected. Export the head to the file Head.obj. In the OBJ Export Options window, uncheck all options except Flip YZ-axis (Poser-like). On the Faces dropdown list choose Polygons, and set Scale = 1.

3. Start the UV Layout program. Take a moment and read the user guide, by clicking About UVLayout View User Guide or watch the quick intro videos on the website to gain an understanding of the interface, tools, and procedures within this program.

4-32 Scarecrow 4. Click Load and choose Head.obj. In the Load Options window, select Type = SUBD. This will soften its UVW coordinates in relation to the objects wireframe, which will help us with smoothing later on. Set UVs = New because we will create new texturing coordinates instead of editing existing ones. Click Load to load the file. In the following illustration, you can see the programs interface.

5. Click-and-drag with the left mouse button to orbit around an object and click-and-drag with the right mouse button to zoom in and out. Click-and-drag the middle mouse button to pan. If you are having trouble rotating around the object, click on Free in the axis constraint section.

First we will separate the outer surface of the pumpkin head from the rest of the geometry. In order to do that we need to specify the seams along which the outer surface needs to be separated. In order to designate a seam, position the mouse cursor over the edge and push C key on the keyboard; this edge will be highlighted in red and the program will also automatically select a line of contiguous edges and will highlight them in yellow. If the selection did not extend to the desired length, simply continue adding more edges to it. If the selection extends beyond the desired length of the seam and needs to be trimmed, position your mouse cursor over the edge that represents the desired end of the seam, press C to highlight it in red, then position the mouse cursor over the side of the edge that you want to be trimmed off and press W. In the illustrations that follow, when we refer to certain seams we have highlighted them in red so that you can easily see what we are referring to. While you are working in the program you may notice that they are actually highlighted in yellow. 6. Using the technique described above, select the edges as shown in the following illustration.

Scarecrow 4-33

7. To cut and detach the geometry along the selected edges position the mouse pointer over the pumpkin head and press Enter on the keyboard. The program will detach the outer surface from the rest of the geometry and will also slightly shift it to show the separation effect. Then move the separated outer surface to the side by dragging it with the Middle Mouse Button while holding Space. In the left image of the following illustration you can see the outer surface of the pumpkin head separated from the rest of the geometry and in the right image of the following illustration you can see it moved to the side.

8. Now we need to cut the seam on the back of the outer surface so that it can be unwrapped. Using the above described technique, select the seam, as shown in the following illustration, and press Shift+S to cut along it.

4-34 Scarecrow

9. Create seams to separate the object as shown in the following illustration. Detach and cut the inner surface of the pumpkin head, the inside edges of the eyes and mouth openings, and the top and bottom caps on the inside and the outside. You can rearrange the separated parts of the object in the workspace as shown in the following illustration.

10. To transfer each element into the UV editing window, move the cursor over the element and press D on the keyboard. You can open the UV window by pressing 1 on the keyboard. When all the elements are in the UV window, the window will look similar to the following illustration. As a side note, there is a Split Pane button that you can use to split the single workspace window into two. Then you can use the shortcut key 1 to make first window a UV window, and 2 to toggle the second one to the Edit window. If you want to come back to a single window workspace, you can click the Kill All Panes button.

Scarecrow 4-35

Next you will flatten out the objects in the UV window. There are two processes you can use for this: one for simple objects and one for more complex objects. 11. In the UV window, position the cursor over one of the round elements, click on it to select it, and press Shift+F on the keyboard. This will start the process of unwrapping the element to a flat surface. Watch the process until you see no more visible changes to the element, then press Space to stop the flattening and start the process of relaxing and evening out the patches. Press Space to stop the relaxing process. This two-step process is appropriate for more complex elements like round surfaces. 12. For simpler elements that are already somewhat flat, like the top and bottom caps, you can use a faster unwrapping process. Move the cursor over the element, press and hold F on the keyboard to start the unwrapping process. When you see no more visible changes to the element, release the F button to stop the process. 13. Using either of these two processes, flatten and unwrap all elements. To better arrange unwrapped clusters in the workspace, use Space + Left Mouse Button to rotate, and Space + Middle Mouse Button to move them if needed. 14. After you unwrap all the elements, open the Pack rollout, set Quality = Best and click Pack All. This will rearrange all the clusters in the texture space to use it more efficiently. 15. If you need to correct the placement of some clusters, you can rotate or move them by holding down the Space bar and using your Middle or Left Mouse Button. The unwrapped, packed clusters are shown in the next illustration.

4-36 Scarecrow 16. Patches shaded in red and blue indicate stretched or squashed texturing coordinates. Press 3 on the keyboard to switch to the 3D window and see how the texture coordinates affect the texture on the object. In the 3D window, press T on the keyboard to make the control texture visible, and use the Plus (+) and Minus () keys to change its size.

17. Click Save and export the file as Head.obj file. If you are using the trial version, you may not be able to save or export. We have provided a finished copy of the file Head_Unwrapped.obj, which you can use instead. 18. In 3ds Max, delete the existing head model and import Head.obj (or Head_Unwrapped.obj) back into your scene. On the OBJ Import Options dialog box, disable all the options except Import as Editable Poly, Flip ZY-axis, Center Pivots, and Texture coordinates. In the Normals group, choose the Import from file option. Click Import. 19. Apply an Unwrap UVW modifier to the object and click Edit to check that the unwrapping has imported correctly. The clusters in the Edit UVWs window should look similar to the way they did in the UVLayout program.

20. Next, you will unwrap the hat. Export the hat from 3ds Max as an OBJ file and open it in UVLayout, but this time in the Load Options window choose Type = Poly. 21. For the hat, use the same process that you used on the pumpkin head to create seams, unwrap the clusters, export the file, and import into 3ds Max. The left image of the following illustration shows where to place seams and break down the hat into elements, and the right image shows the result of flattening the elements and packing the clusters.

Scarecrow 4-37

22. Load the Robe_Low_Poly.obj object that we exported earlier and cut two seams as shown in the left image of the following illustration. Unwrap the object into one cluster. 23. Click the Find button next to the Symmetry parameter. Select an edge at the center of the robe to indicate that it will be a symmetry axis, and press Space on the keyboard. This will tint half of the patch darker, indicating that the tinted half of the object will assume the shape of the non-tinted half of the object. If you want to switch sides, press Shift+S on the keyboard. 24. Press S on the keyboard to apply symmetry. In the right image of the following illustration you can see the unwrapped robe patches. Export the file and import it into the 3ds Max scene you were just working on.

We just imported the unwrapped low-poly robe model back into 3ds Max just for demonstration purposes; this is how you would unwrap the robe model and import it back to 3ds Max before you add details to it as we did in the beginning of this chapter. 25. Delete the low-poly robe model and merge the detailed Robe model from the file Ch04-15.max.

4-38 Scarecrow 26. To unwrap all the other parts of the scarecrow, you can use the UVW Map modifier, which was demonstrated in previous chapters. 27. Save your scene in 3ds Max. You can open Ch04-17.max to compare results.

Exercise 6: Painting textures


In this exercise, we will explain in detail the process of creating textures for the scarecrows head, robe and hat. Well paint the textures in Photoshop, and then well create Normal maps using a program called PixPlant. PixPlant can be used as either a Photoshop plug-in, or as a standalone application. You can download a free demo version of the software from http://www.pixplant.com. Lets start with the texture for the pumpkin head. However, before we work in Photoshop, we need to export the unwrapped UVW map to an image file so we can use it for reference. Lets start the exercise. 1. Open Ch04-17.max, or open your own version of this file. 2. We will start by exporting a template to use as a guide while painting the texture. Select the Head object. In the Modify panel, click the Edit button in the Unwrap UVW modifier. In the Edit UVWs window, choose Tools Render UVW Template. In the Render UVs dialog box, set the image size to 2048x2048 and click the Render UV Template button. Save the image as Head_ UV.jpg. 3. Open Photoshop, and open Head_UV.jpg. 4. To make the current layer editable, select Layers menu New Layer From Background, and click OK in the New Layer window. Name this layer UV_Layer. 5. Press Ctrl+I on the keyboard to invert the layers colors, then click Shift+Ctrl+U to desaturate it. 6. Double-click the layer in the Layers panel to open the Layer Style window. You can also rightclick the layer and choose Blending Options to open this window. Change the layers Blend Mode to Multiply with Opacity = 40%. 7. Set Foreground Color = R:185, G:95, B:35 (light orange) and Background Color = R:140, G:41, B:11 (dark orange). 8. Press Ctrl+Shift+N on the keyboard to create a new layer, then press Shift+Backspace to fill the new layer with the foreground color. Name this layer Light_Orange. 9. Rearrange the layers so that UV_Layer is the top layer. Throughout the texture creation process, this layer should always stay on top so we can use it as a reference when texture painting. 10. Create a new layer named Dark_Orange and place it above the Light_Orange layer. 11. Fill the Dark_Orange layer with the Background Color, then use the Gradient tool to draw and add a Mask to this layer. Refer to the left image of the following illustration to see what the gradient mask should look like. The resulting image should look similar to right image in the following illustration.

Scarecrow 4-39

12. Press Ctrl+J to make a copy of the Dark_Orange layer, and name the new layer Dark_Fibers. Delete the layers mask. Apply Filter Render Fibers and set Variance = 20, Strength = 5. 13. Set the Dark_Fibers layers Blend Mode to Lighten and set Opacity = 40%. Add a Mask to the layer as shown in the left image of the following illustration in order to hide this layer for areas representing the top and bottom caps of the hat. 14. Copy the Dark_Fibers layer, set the Blend Mode of the new layer to Darken, and rename the new layer Light Fibers. Remove the layers mask. The layer structure at this point should look like the right side of the following illustration.

The resulting image should look similar to the following illustration.

4-40 Scarecrow

15. Create a new layer and call it Fat_Stroke. Set its blending mode to Darken. Press X on the keyboard to switch the Background Color and Foreground Color swatches. Paint dark stripes in the areas between pumpkin segments as shown in the left image of the following illustration. 16. Create a new layer and call it Thin_Dirt. Change its Blend Mode to Color Burn and paint another set of stripes in the same areas. 17. Use the Eraser tool with different brushes to add variety to the Thin_Dirt layer as shown in the right image of the following illustration.

18. Create a new layer and place Head_Pattern_1.jpg into it. Name the layer Roughness. You may have to tile the pattern to fill the parts of the canvas that it should cover. 19. Change the layers Blend Mode to Linear Dodge (Add). In the Blend if group, set the sliders as shown in the left image of the following illustration. Set the layers Opacity to 10%. As a result, you should be able to see a network of small cracks in the texture, as shown in the right image of the following illustration.

Scarecrow 4-41

20. Now lets add larger and deeper cracks on the protruding parts of the pumpkin exterior. Create a new layer and place Head_Pattern_2.jpg into it. Name the layer Cracks. You may have to scale the image up to cover the canvas. 21. Change the layers Blend Mode to Linear Light. Set the Blend If sliders as shown in the left image of the following illustration. Change Opacity to 60% and mask the areas between pumpkin segments because large cracks would not be present in these areas. In the right image, you can see the texture with large cracks added to its protruding sections.

22. Now lets create a texture for the pumpkin flesh on the mouth and eye openings. Create a new layer, name it Flesh, and create a rectangular selection around the areas that represent the eye and mouth openings. Fill it with the lightest color from your Foreground/Background swatches. See the following illustration for reference. 23. Apply Filter Sketch Reticulation, and set Density = 12, Foreground Level = 40, Background Level = 5. 24. Add a Hue/Saturation Adjustment layer to the current layer and set Saturation = +16. The following illustration shows how the layer should look.

25. Add a new layer with the Blend Mode set to Overlay. Name the Layer Green. Using a brush with different Opacity values, paint in dark green areas simulating unripe areas. 26. Using the same technique, add another layer, name it Green Dirt and paint the areas with a different green hue to vary the texture. You can open Scare_Head_Catapult.psd in the support files for reference.

4-42 Scarecrow 27. The texture painting process is complete. Hide UV_Layer and save the file as Scare_Head.psd. You should also save the file as a JPG with the same name. You will use the JPG file as a texture in 3ds Max.

Exercise 7: Creating additional maps


In this exercise, you will use the PixPlant standalone application or plug-in for Photoshop to create additional maps that will contribute to a rich, complex material in 3ds Max. PixPlant analyzes dark and light areas of the image and creates Normals maps and Specular maps from this information. To prevent the creation of extra textures, we will need to delete some dark layers from the Photoshop file. We will also make the cracks darker so PixPlant will interpret them as dents. First, you will need to prepare the textures for PixPlant. 1. Continue from the previous exercise or open Scare_Head_Catapult.psd in the support files.. Delete the Fat_Stroke, Thin_Dirt, Green, and UV_Layers. 2. Select the Cracks layer, and change its Blend Mode to Linear Burn. 3. Adjust the Hue/Saturation Adjustment Layer of the Flesh layer, set Lightness = -50. This will darken this layer and lower the highlights on the pumpkin flesh. 4. Select the entire image by pressing Ctrl+A, and use Image Crop to crop the image to just the parts within the canvas area. 5. Save the file as Scare_Head_Mod_For_PixPlant.psd. You can open Scare_Head_Mod_For_PixPlant_ Catapult.psd for reference. 6. Use Layer Flatten Image to merge all layers into one. 7. Save the file as a JPG with the following name: Scare_Head_Mod_For_PixPlant.jpg. 8. Open the PixPlant application and open the file Scare_Head_Mod_For_PixPlant.jpg. 9. In the PixPlant window, leave all the parameters at their default values, click the 3D Material tab and click Save on the Normals panel. Save the new Normals map to Scare_Head_NBump.jpg. 10. On the Specular panel, click Save to save the new Specular map to Scare_Head_Spec.jpg file.

Scarecrow 4-43
11. In the books support files, youll find the file named Scare_Head_SSS.psd. This file contains a desaturated and color-corrected version of the pumpkin head texture. We will not describe the adjustment process in detail, as you have already been introduced to the tools used. Open this file and analyze the layer structure to understand how the image was adjusted. A pumpkins skin has a slightly translucent surface, so this texture will be used to create a subsurface light scattering effect with the pumpkin material. 12. Now, lets create a texture for the robe object. First, Export the robe UVs from 3ds Max into an image in the same way you exported the pumpkin head UVs. Save the image as Robe_UV.jpg, and open it in Photoshop. 13. Open Robe_Pattern_1.jpg, a file from the support files. Apply Image Image Size and set the image size to 72 dpi at 256x256 pixels. 14. Choose Edit Define Pattern to create a new fill pattern from the image with any name. 15. Select the Robe_UV.jpg image and add a new layer to it. Keep the Robe_UV layer at the top, use Desaturate, Invert, and set the Blend Mode to Multiply. 16. Press Shift+F5 on the keyboard to open the Fill dialog. In the Contents group set Use to Pattern and choose the pattern you just created. Click OK to fill the entire layer with the pattern. Name the layer Fill_Pattern. 17. At this stage, you can hide the Robe_UV layer and save the texture, then modify it with the Viewport Canvas tool in 3ds Max to correct the direction of fibers on the sleeves and eliminate any texture squishing on the waist area. This process is similar to the process described for repairing visible seams on the tree trunk texturing. 18. After correcting the robe texture with the Viewport Canvas tool, bring the image back into Photoshop as a new layer named Fixed_With_Viewport_Canvas. Place this layer above the Fill_Pattern layer. 19. Apply a Curves adjustment layer to the Fixed_with_Viewport_Canvas layer and adjust the curves as shown on the left side of the following illustration. This will reduce the brightness of the lighter pixels and make the texture more even. Select the Fixed_with_Viewport_Canvas layer, go to the Channels palette and use the Blue channel to create a mask for the Curves adjustment layer, then press Ctrl+M on the keyboard and adjust curves of the mask and add more contrast to it. The resulting mask should be similar to the right side of the following illustration.

4-44 Scarecrow 20. Create a new layer named Sharp_Dark_Border and paste the Robe_Pattern_2.jpg image into it. Copying this pattern along the edges of the robe and also using different brushes, paint holes, worn edges, and random fabric fibers that stick out along the edges and holes for the cloth as shown in the left side of the following illustration. This image will be used as an Opacity map for the robe material. 21. Change the layers Blend Mode to Multiply and change its Opacity to 30%. 22. Create a copy of the Fixed_with_Viewport_Canvas layer, and name it Soft_Dark_Border. Position this layer above the Curves layer for the Fixed_with_Viewport_Canvas layer. 23. Change the layers Blend Mode to Multiply and add a mask to it (see the right side of the following illustration for the mask, it can be created from Sharp_Dark_Border layer by inverting it, and blurring it out). In this mask you can also paint out random fabric fibers that stick out along the edges and holes of the fabric with the black brush so that they are not darkened by this layer.

24. Apply a Hue/Saturation adjustment layer to this layer and set Saturation = +40.

25. Apply a Curves adjustment layer to this layer. Add a control point to the curve and set its values as follows: Output = 145 and Input = 85. 26. Now lets paint a patch on the robe. Create a new layer called Patch below Sharp_Dark_Border layer and place Robe_Pattern_3.jpg into it. Make the pattern smaller and place it where ever you like. You can deform it by applying the Edit Transform Warp tool and adjusting the Warp grid. 27. Double-click the Patch layer to bring up the Layer Style window. In the Layer Style window check the Outer Glow, Inner Glow, Bevel and Emboss, and Texture options. For each of the checked options, click the option on the left side of the window to access its parameters, and set the parameters as shown in the following illustration.

Scarecrow 4-45

28. Now, lets create a line of thread around the patch. Create a copy of the Fixed_With_Viewport_ Canvas layer, place it above the Patch layer, and name it Thread . Turn the layers opacity down for the next step so you can see where to draw. 29. Press Q on the keyboard to go to Quick Mask mode. Draw a black dashed line along the perimeter of the patch. As you draw in Quick Mask mode, the line will appear as a semi-transparent red color. Press Q on the keyboard again to exit Quick Mask mode. This will also auto-select the entire layer except for areas where you drew the dotted line. Press Delete on the keyboard to delete the selection. 30. Bring layers opacity back to 100%. Now, we will add a bit of volume to the thread. Open the Layer Style dialog box, activate the Drop Shadow and Inner Glow options, and set the parameters for these options as shown in the following illustration.

4-46 Scarecrow 31. Make the texture slightly darker by adding a Curves adjustment layer below the Robe_UV layer and adjusting curves as shown on the left side of the following illustration. 32. Create a new layer called Dirt, and place Robe_Pattern_4.jpg into the lower/right corner of the layer. Duplicate this layer and reposition the image into the layers lower/left corner. Merge the two layers together. Refer to the right side of the following illustration to see the result.

33. Change the layers Blend Mode to Color Burn and reduce its Opacity to 30%. 34. In 3ds Max, use the Render Surface Map tool to create a Cavity Map of the high resolution robe with a size of 2048x2048, and save it as Scare_Robe_Cavity.png.

35. Open Scare_Robe_Cavity.png in Photoshop. Hold down Shift on the keyboard and drag the image into a new layer in the robe texture. Name the layer Light and Shadows. 36. Change the layers Blend Mode to Overlay and reduce its Opacity to 80%. 37. The robe texture is now finished, and is shown in the following illustration. Save the file as Scare_Robe.psd. You can compare your result to the Scare_Robe_Catapult.psd file from the books support files. Also, save this file as a JPG with the same name so you can use it for material creation in 3ds Max.

Scarecrow 4-47
38. To prepare the texture for Normal map creation, delete or hide the Light and Shadows and Dirt layers. 39. Fill the robe patch with a gray color and the threads with white. To do this quickly, select the layer, then hold down Ctrl while clicking the layer in the Layers window. This will automatically select all non-empty areas of the layer so you can fill the selection with color. 40. Save the file as Scare_Robe_Mod_For_PixPlant.psd. You can also open the Scare_Robe_Mod_For_ PixPlant_Catapult.psd file from the books support files to analyze it. 41. Merge all layers with the Layer Flatten Image command, and save it as a JPG with the same name. 42. Using the same process as before with PixPlant, save out the Normals map to Scare_Robe_ NBump.jpg. 43. In Photoshop, undo the last step where you flattened the image or open Scare_Robe.psd, delete all of the layers except Sharp_Dark_Border, change the layers opacity to 100%, and save the file to Scare_Robe_Opacity.jpg. This will be the Opacity map for the material. 44. Now, lets make a texture for the hat. In 3ds Max, render the image of the hats UVW map. But this time, in the Render UVs window, in the Fill group set the color to white, choose Mode = Solid, and uncheck all the parameters in the Edges group. This configuration renders the image with texture coordinate clusters and an alpha channel. Save the image as Hat_UV.png with an alpha channel.

45. Open Hat_UV.png in Photoshop. In this file, create a new layer, name it Background, and place it at the bottom of the layer stack. Fill this layer with white. Name the upper layer UV and change its Opacity to 20%. When working with this image, make the UV layer completely visible only when you need to select an area of a cluster. 46. Duplicate the Background layer and name the new layer Hat_Left. 47. Apply Filter Noise Add Noise filter. In the Add Noise window set Amount = 400%, select the Gaussian option and turn on the Monochromatic checkbox. Click OK.

48. To the same layer, apply Filter Blur Radial Blur with Amount = 10, and select the Spin and Best options. At this stage the image should look similar to the one on the left of the following illustration. 49. Duplicate this layer twice, and name the layers Hat_Right and Hat_Top, respectively. 50. Hide both of these new layers for now. Select the Hat_Left layer and reposition it so that its center approximately matches the center of the hat left brims UVW coordinates. 51. Go to the UV layer and use the Magic Wand tool to select the left cluster of hat brim UVW coordinates.

52. In the Hat_Left layer, invert the selection and delete the selected area. In the right image of the following illustration you can see what the resulting image should look like.

4-48 Scarecrow

53. Repeat the same procedure with the Hat_Right and Hat_Top layers. Align their centers with the centers of corresponding UVW texturing coordinates clusters, and then select and delete the areas of the layers that are not covered by those clusters. 54. Create a new layer and fill it with white and then add Noise by using the Noise filter. Name this layer Hat_Cylinder. 55. Apply a Motion Blur filter to this layer, and set Angle = 0, Distance = 50 pixels. 56. On this layer, delete everything except the area covered by the cluster at the top of the image. 57. Select the three layers: Hat_Left, Hat_Right and Hat_Top. Choose Filter Convert for Smart Filters to convert the layers into a Smart Object. This will allow you to apply the same filter or adjustment layer to all three layers at once.

58. Apply a Curves adjustment layer to the resulting layer, and adjust the curves to make it darker and to match the Hat_Cylinder layers colors better. The result should look similar to the left side of the following illustration. You may want to add a Curves adjustment layer to the hat cylinder to darken it as well. 59. Add a new layer and paint dirty areas along the edges of the UVW texturing coordinates clusters, as shown on the right side of the following illustration. Name this layer Dirt.

Scarecrow 4-49
60. Add another layer and place Hat_Pattern_1.jpg image into this layer. 61. Adjust the size of this image to the size of the top cluster of the UVW texturing coordinates. 62. Add a mask to this layer to mask everything not covered by the top cluster of the UVW texturing coordinates. Name this layer Wear_Crown. Change the layers Blend Mode to Multiply and change Opacity to 60%. 63. Use the same techniques to paint the edge of the hats brim, in the bottom left corner, and name the layer Hat_Edge. 64. The hat texture is finished; you can see it in the following illustration. Hide the UV layer and save file as Scare_Hat.psd. You can compare your results to the Scare_Hat_Catapult.psd file in the book project files folder. Also save this texture as a JPG file.

Exercise 8: Creating materials for the scarecrow model and organizing the textures
In this exercise, we will create and set up materials for the scarecrow using V-Ray. Material parameters and texture organization charts are demonstrated in the following illustrations. In order to avoid mentioning this multiple times along this exercise, some important concepts regarding V-Ray materials will be mentioned upfront. Color swatches are used for many V-Ray material channels to specify the strength of a particular material characteristic. For example, a bright white color swatch for the Reflect channel will make the material 100% reflective, as you would have with a perfect mirror. Likewise, brighter areas of black-and-white textures placed into the same channel correspond to areas of higher reflection. Lowering the Refl. Glossiness and Glossiness values cause a materials reflections to become more blurred. Increasing the Subdivs values within the Reflection and Refraction sections causes the blurred reflections and refractions to become less noisy. However, this will also result in increased render time.

4-50 Scarecrow Fog color dictates the fill color of the inner volume of a transparent object. Fog multiplier defines the density of that color. Within the Translucency section, anything other than None for Type turns on subsurface light scattering effect for a refractive material. Scatter coeff defines how much light is scattered inside the object, and smaller values correspond to more light rays being scattered. Fwd/bck coeff defines the direction of scattered light rays, with lower values causing light rays to go deeper into the object and higher values causing them to go toward the surface. Increasing the value of Light Multiplier will increase the intensity of light scattered inside an object. Thickness limits the depth of the light scattering effect. Lets start working on the exercise. Open Ch04-18.max. 1. Create a new VRayMtl material and name it Scarecrow Head. Change the following colors: Fog color = RGB (89; 75; 56), Translucency Type Hybrid Model, and Back-side color = RGB (218; 126; 52). 2. Other parameters for the Scarecrow Head material are shown on the left side of the following illustration. On the right side of the following illustration you can see the channels into which you need to insert the prepared textures, and the values for each channel. Notice that a VRayNormalMap has been assigned within the Bump channel.

In the following illustration, you can see the structure of the material in the Slate Material Editor. For correct functionality of the Normals map, we need to assign it using a VRayNormapMap, as mentioned in the previous step.

Scarecrow 4-51

3. Assign this material to the Head object. 4. Create a new VRayMtl material and name it Scarecrow Hat. Change the following colors: Diffuse = RGB (10; 10; 20), Reflect = RGB (10; 10; 10). 5. Other parameters of the Scarecrow Hat material are shown on the left side of the following illustration. On the right side of the following illustration, you can see the channels you need to put the textures into. You can see that we used the same texture for the Reflect and RGlossiness channels; however, the Opacity level for the Reflect channel in this material is only 20%.

4-52 Scarecrow 6. The following illustration shows the structure of the Scarecrow Hat material.

7. Apply this material to the Hat object. 8. Create a new VRayMtl material and name it Scarecrow Robe. Leave all color swatches at their default colors. Set the channel parameters and textures as shown in the following illustration.

9. In the following illustration, you can see the structure of the Scarecrow Robe material. Create it and assign it.

Scarecrow 4-53
10. Apply a VRayDisplacementMod to the Rope model. 11. Create a new VRayMtl material and name it Scarecrow Rope. Leave all the parameters at their default values. This material uses only procedural maps. The value for the Bump channel is only 20%. In the following illustration, you can see the structure of the material.

12. On the left side of the following illustration you can see how the texture is blended with a Composite map, which is in the Diffuse channel of this material. At the right side of the following illustration, you can see the settings for the Noise map, which defines the color of the rope in the first layer of Composite map.

13. The next two layers of the Composite map simulate rope threads. In the following illustration, you can see the settings for the maps in these layers. The left side shows the settings for the Gradient Ramp map for the second layer of the Composite map. This represents the thick threads of the rope. This texture also needs to be placed into the Texmap channel of the VRayDisplacementMod modifier applied to the Rope object. At the right side of the illustration, you can see the settings for the Gradient Ramp map, which is placed into the third layer of the Composite map. This will help simulate small threads in the rope.

4-54 Scarecrow

14. For the materials for the posts and the scarecrows body, create 2 more V-Ray materials, and put the Old_Wood.jpg and Scare_Hay.jpg textures into the Diffuse channels correspondingly. Both textures are provided in the support files. 15. The materials are complete. Save your scene. You can open the Ch04-19.max file to analyze the structure of these materials. In this file, you will notice that we used a Color Correction Map for the posts and body, which provides an assortment of tools for modifying the colors of a map. Experiment with this if you want.

Summary
This chapter explained some fairly advanced concepts in modeling and material creation. Like many areas of 3D, they involve perishable skills, and without practice and practical implementation into some current or future projects, the steps can be easily forgotten. We highly recommend that if you like the techniques discussed here, put them into practice as soon as possible on your own projects. Once again, this chapter also demonstrated the importance of not relying completely on 3ds Max for producing your 3D imagery. We encourage you to stay on top of the latest advancements in 3D software and implement the best tools available. Otherwise, you wont be working at your full potential.

ChaptEr 5

Water Elements

T his chapTer focuses on The Two main waTer elemenTs in the scene, the creek and the water splashing on the water wheel. Like so many other elements of this scene, creating realistic water is both an art and a science. The science aspect is fairly simple to grasp and requires nothing more than knowing the technical settings that control things like reflection, refraction, color, and so on. The artistic side of water, however, is much more difficult to teach and learn. The artistic aspect requires you to add extra details to turn the ordinary into the extraordinary. It involves placing extra elements in and around the water that make the water not just realistic, but also true to its surroundings. For example, we could expect to see small ripples form around the pilings of the dock as the flow of the water is interrupted. Water, more than any other element in a scene, will look only as good as its reflections and refractionstoo often, water is handicapped and even ruined by the lack of sufficient objects to reflect or refract. In this chapter, we will add some extra elements in and around the water to make it both believable and extraordinary. In the second part of this chapter, where we will make the splashing water on the water wheel, we will utilize the glu3d plug-in for 3ds Max. You can download a free trial version of this plug-in at http://www.3daliens.com, under the Download tab.

The Creek
In the first part of this chapter, we will create the creeks water surface for the scene. Everything we create in this part of the chapter will be still (not animated). We will animate the water in the next chapter; however, all modifiers that will be animated in the next chapter will be applied during this chapter.

5-2 Water Elements

Figure 5-1. The creek to be created

First, lets analyze the major characteristics of the creek shown in Figure 5-1. Essentially, this is a reservoir of water with a variety of elements in it and around it. We can see duckweed, the freefloating vegetation resembling algae, floating along the banks of the creek. This tells us that the current is quite slow. In the deepest areas of the creek, the water is darker and less transparent than in the shallow areas. On the surface, we notice small rippling and a light wave effect. We also see objects that impact the flow of the water, such as the pier and the boat. In order to make this creek, we will need to go through three major steps: 1. Geometry modification 2. Texturing 3. Water material creation

Exercise 1: Geometry modification


As you already know, the creek has a slow water current, and we will need to make it noticeable. We will achieve that effect with the Wave and Ripple modifiers. The rotation of the water wheel and the falling water creates additional surface distortion on the water, as does the impact of the water with multiple man-made objects. For example, the boats side-to-side rocking causes small ripples on the water and the pier posts break the flow of the water below causing some distortion. It is time for us to simulate all of that. 1. Open the file Ch05-01.max. This scene already has all of the objects that we will be working with and also has all of the rendering parameters set for your convenience. 2. From the Customize menu, select Units Setup and ensure that units are set to Generic Units. 3. Select the object named Water Level. Waves on the water will have different lengths and amplitudes. For smaller waves, the number of polygons needs to be greater than for large waves. 4. Apply the TurboSmooth modifier. 5. Set Iterations to 1, enable Render Iters, and set this parameter to 7. If you have a sufficiently powerful computer and graphics card, you could try increasing the Iterations value to better see in the viewports all of the modifiers that well be using. Now, we will create the small rippling water effect.

Water Elements 5-3


6. Apply the Wave modifier using the parameters shown in the following illustration.

The changes created by these parameters will not be very visible at this point. However, when we animate these parameters, we will see their effect. In the next step, we need to create more noticeable waves caused by the rotating water wheel and the water that falls from it. We are going to create them with the Ripple modifier and with the Ripple space warp. 7. Apply the Ripple modifier to the Water Level object. Set its parameters as shown in the following illustration.

8. Change the modifier name to Ripple Waterfall. 9. Switch to Top view and center the Ripple Waterfall modifiers gizmo underneath the water wheel. 10. Open the Material Editor and assign a V-Ray material named Water to the Water Level object. 11. Within the Reflection group of this material, click the color swatch to the right of the word Reflect and change the color as shown in the following illustration. This gives the material approximately 20% reflection.

5-4 Water Elements 12. Return to the Camera01 view and render this view to preview the results. You should have something similar to the following illustration.

Now, we need to simulate the piers impact on the water flow. 13. Select the Water Level object and apply another Ripple modifier to it. Rename the modifier Ripple Dock1. 14. Set both Amplitudes to 1, Wave Length to 10, and Decay to 0.045. 15. Position (center) the modifiers Gizmo under one of the piers posts, as shown in the following illustration. Change views as necessary to do this and to position the gizmos of any future modifiers.

Water Elements 5-5


16. Assign another Ripple modifier with the same parameters and position its Gizmo under another one of the piers post. Name it Ripple Dock2. A simple right-click, copy and paste of the first Ripple modifier is a quick way to do this. Now, imagine the boat is slightly rocking from one side to another. This would create small waves in the water. This time, lets use a different way to create the waves. 17. Create a Ripple space warp object anywhere in the scene by selecting Create panel Space Warps Geometric/Deformable Ripple. 18. Rename this object Ripple Boat, and position it under the front of the boat (as seen in Top view). Refer to the next illustration as a guide. This illustration also shows two others that we will add in a moment and shows all the space warps at a much larger size, due to one of the upcoming steps. 19. For parameters, set Amplitude1 to 1.0, Amplitude2 to 1.0, Wave Length to 9.5, and Decay to 0.03. The parameters on the Display rollout change the way the object appears in viewports, but dont affect the geometry. 20. For the Display rollout parameters, set Circles to 50, Segments to 8, and Division to 5.

Next, well add variety to the distortion of the water caused by the boat. 21. Make a copy of the Ripple Boat space warp object and position it under the middle of the hull of the boat on the side farthest from the dock. This is shown in the previous illustration. 22. Change the name of the new object to Ripple Boat01, and change the Phase parameter to 1.0. 23. Copy the Ripple Boat object one more time, and position the new object under the back of the boat. 24. Change the name of the new object to Ripple Boat02, and set the Phase parameter to 2.0.

5-6 Water Elements 25. Bind the Water Level object to the Ripple Boat space warp. To do this, select the Water Level object, click the Bind to Space Warp icon from the Main toolbar, and then click, hold and drag from the Water Level object to the Ripple Boat space warp. You should see the space warp added to the objects modifier stack. It is probably easiest to do this in wireframe mode so that you click and release at the proper place each time. Make sure the Ripple objects are positioned slightly above the Water Level object or you may not be able to select them. 26. Repeat the process twice to bind the object to the Ripple Boat01 and Ripple Boat02 space warps. In the following illustration, you can see what the Modifier Stack for the Water Level object should look like with all its modifiers and space warp bindings. We have changed the names of each ripple binding to indicate which Ripple object it corresponds to.

27. Save your file. You can open the scene Ch05-02.max to compare your results.

Exercise 2: Texturing
In this exercise, we will create maps for the duckweed and water ripples, including refraction and reflection maps. We will try to use procedural maps mostly, and we will create small bitmaps when necessary. We will also create masks with Photoshop so that we can mix different materials, maps, and textures to create new materials. For this scene, the masks dont necessarily have to be highresolution; low resolution masks will work just fine. For the duckweed, we will use a Noise map for the colors and a Cellular map for the mask. To control the distribution of duckweed on the surface of the water we will create a grayscale image in Photoshop to use as a mask. 1. Continue from the previous exercise or open the file Ch05-02.max. 2. Open the Material Editor and select the material Water. 3. Assign a Mask map to the Diffuse channel, and rename the map Diffuse Water. 4. In the Diffuse Water maps Mask Parameters rollout, click the Map channel, and assign another Mask map. Rename the map Duckweed. 5. For the Duckweed maps parameters, place a Noise map into the Map channel. Rename the map Duckweed Colors. 6. In the Noise map, set Color #1 to dark green (R=40,G=53,B=35), Color #2 to green-brown (R=133,G=133,B=42), and Size to 10.0.

Water Elements 5-7


7. Click the Go to Parent icon to return one level up in the material. 8. For the Mask slot of the Duckweed map, assign a Cellular map, rename it Duckweed Mask, and set parameters as shown in the following illustration. If you like, at any time you can make an instance of any map and place it into another sample slot to see the result of changing a maps settings easier. You can also just toggle off the Show End Result icon, which is to the right of the Show Standard Map in Viewport icon.

Duckweed Mask, because of its structure, will give the duckweed an appropriate size and density. In the following illustration, you can see the structure of the Water material.

Now, its time to use a mask to tell the material where the duckweed should and should not be. We will use Photoshop to create a mask that will define the distribution of the duckweed on the surface of the water. Because duckweed is mainly concentrated along the banks of the creek, we need to define the banks of the creek, which, in our case, are the intersections of the water and ground. Lets create an image that shows the edges of the creek. 9. Open the Material Editor and in an empty sample slot create a new VRayLightMtl material.

5-8 Water Elements 10. Within the Color channel, place a VRayDirt map. Set its Radius to 50, and enable the invert normal option. 11. Disable all modifiers currently assigned to the object Water Level, and assign the newly created VRayLightMtl material to the object. Now, we will render a bitmap image so that the edges where the water intersects with the ground can be seen. For that we will use the texture baking method. 12. Select the Water Level object, and from the Render menu choose the Render to Texture command (shortcut = 0). 13. In the General Settings rollout, click the icon with three dots to the right of the Path field and set the Output path to your project file folder. 14. In the Objects to Bake rollout, in the Mapping coordinates section, make sure Use Existing Channel is selected. 15. In the Output rollout, click the Add button and add a VRayCompleteMap. 16. Click the icon with three dots to the right of the File Name and Type field and select a file name and an appropriate path. You can leave the default name, path, and type if you like. 17. Set the resolution to 1024x1024. This is a sufficient size for our needs. 18. Click the Render button. When you get the message Missing Map Targets, click Continue. Normally, the maps created with Render to Texture would be made to be loaded into a particular target map slot. However, we do not need to do that here. We only need an image that we can bring into Photoshop. The result should look similar to that shown in the following illustration. We will use the rendered image in Photoshop to paint the locations where the duckweed will exist.

19. Save the resulting render as the file Dirt_Water.jpg. 20. Save your file. You can open the scene Ch05-03.max to compare your results.

Water Elements 5-9


For the creation of maps using the texture baking method, it is better to use a VRayLightMtl material instead of VRayMtl when you want a white Diffuse color (as you will see soon its what we need here). The reason is that VRayLightMtl does not receive shadows. It may look like the material is receiving shadows in the previous illustration, but these dark areas are only a result of the vrayDirt Map. Using a VRayLightMtl also means that when we use linear color mapping (i.e., V-Rays version of exposure control) in the Render Setup dialog box, the white color always stays white, which eliminates the need for a lot of parameter tweaking before rendering. 21. Open the file Dirt_Water.jpg in Photoshop. 22. Rename the single layer DirtWater. 23. Add a new layer called Mask_Duckweed, and fill it with black. Set the Blend Mode to Difference. This will allow us to paint on the layer and see how it differs from the layer below it, thereby allowing us to see the areas where duckweed is present. 24. Using a paintbrush with a size of 7-10 pixels, paint the approximate locations of the duckweed in white. Try to be creative and paint the edges of the creek unevenly; paint some places densely and leave some places empty. Imagine where, according to the water current, duckweed would be concentrated more, less, or not at all. Next, we will make the edges of the duckweed patches more distorted and variable. 25. Click on the Paintbrush tool, and in the top-left corner of Photoshop, set the paintbrush to a Size of 1px and a Hardness of 100%. This step is critical to making the brush look correct in the next few steps. 26. From the Window menu, select Brushes (or press the shortcut F5). You will have to have the Brushes command active to make use of this menu. 27. In the Brush Tip Shape list, select Dual Brush, make sure a rough brush, such as a spatter brush is selected, and set Spacing to 25%. If you have never changed this option, it will probably already be set to 25%. 28. In the Scattering list, set Scatter to 600%, Count to 2, and Count Jitter to 60%. Your brush settings should look similar to the following illustration.

5-10 Water Elements 29. Paint the edges of the white area with this brush so that the transition from the black-to-white areas is neither sharp nor smooth but rather noisy. You can use this brush to add white color and paint along the edges of the white areas, or you can switch to black and paint the areas that have no duckweed. Use your imagination and add or remove as much of the white area as you like. When finished, if you hide the background layer, your image should look similar to the one in the following illustration.

30. Change the Blend Mode of the Mask_Duckweed layer to Normal. Save this image as Duckweed_ Mask.jpg. Now that we have finished this duckweed distribution mask, we can use it in our scene. 31. Return to your previously saved 3ds Max file or open the file Ch05-03.max to continue working. 32. Open the Material Editor. 33. In the Water material, for the Diffuse Water maps Mask parameter, load the bitmap that you just created called Duckweed_Mask.jpg. Change the name of the mask to Duckweed Location, as shown in the following illustration.

For the next step, we will create reflection and transparency maps for the water material. At this stage, they will be the same maps and will be created using the Diffuse Water maps as a base. 34. At the Water materials base level, place an Output map into the Reflect channel. Rename this map Invert Reflect-Refract.

Water Elements 5-11


The Output map will allow us to invert the colors of the reflection and refraction maps created using the Diffuse map. 35. In the Output maps Output rollout, enable the Invert option. 36. In the Map channel of the Output Parameters rollout, add a Mask map and rename it ReflectRefract. 37. Go into the Map channel and load a copy (as an instance) of the previously created map called Mask Duckweed. To do this easily, once you click the Map channel, find the map in the Material/ Map Browser and just double-click the map. 38. Into the Mask channel of the Reflect-Refract map, copy (as an instance) the previously created Duckweed Location from the Diffuse map. So far, the maps were creating should look like the following illustration.

Now, we have a mask that will be used for reflection and refraction. In the future, when we are working on the transparency mask, we will add more settings to this map. 39. Go up to the base level of the material and copy the Invert Reflect-Refract map within the materials Reflect channel and then paste it as an instance into the Refract channel of the materials parameters. Now, lets simulate a rippling effect on the waters surface. This is a small distortion on the surface of the water caused by wind, and is mostly noticeable when looking into its reflection. We will simulate this effect with the Bump channel. 40. In the current materials Maps rollout, temporarily turn off all maps that you have prepared by unchecking the checkbox next to the Diffuse map, the Reflect map, and the Refract map. Since the maps are temporarily disabled, make sure that the Reflect color swatch is set to white, so that you can see the effect of the bump map settings we are about to apply. This will help us do test renders faster, and overall makes it easier to control the Bump effect. 41. Assign a Noise map to the Bump channel, set Noise Type to Fractal and set Size = 30. 42. Return to the materials base level and set the Bump Amount to 12. 43. In the Reflection section of the material, enable Fresnel reflections and click the L icon to the right of this setting. This enables Fresnel reflections and unlocks the Fresnel IOR setting so that its not locked to the Refraction IOR setting. 44. Set Fresnel IOR to 1.8, as shown in the following illustration. By enabling this option, we are telling V-Ray to make reflection strength dependent on viewing angle. The more parallel you view a surface, the greater the reflections.

5-12 Water Elements

45. Assign the Water material to the Water Level object. 46. If you create a camera with a view that is a close-up of the water under the pier posts, and render the image, you should get something similar to the following illustration. Note that some objects were made invisible to the camera to speed up the renders, but were still allowed to be visible to reflections.

Lets get back to testing the render results. We can see that the rippling effect on the surface of the water is too large, so lets make it smaller. We can do it a couple of different ways ways. We can just change the size of the Noise map, but, in our case, it will be better if we add an additional Noise map with the help of the Mix map. 47. In the Bump channel, change the Noise map to a Mix map and choose to keep the old map as a sub-map. Rename the Mix map Map Mix Ripple. 48. Within the Color #1 channel of the Mix map is the previously created Noise map with Type = Fractal and Size = 30. Go into this map and rename it map Max Ripple. 49. Return to the Mix level and for Color #2 of the Mix map, place a Noise map with Type = Turbulence and Size = 10, and rename this map Mini Ripple. 50. Return to the Mix level of the material and set the Mix Amount parameter to 50.0. Refer to the following illustration to see the structure of the Mix map.

This mixes together the large and small rippling on the surface of the water. We can control the amplitude of the ripples with Amount setting for the Bump map.

Water Elements 5-13


51. Render the camera view. The result should be similar to the following illustration.

52. We can make the bump effect more noticeable by making the High and Low settings of the Noise maps closer to each other. By default, High is set to 1.0 and Low is set to 0.0. If we change High to 0.7 and Low to 0.3, for example, then the Noise map will have more contrast. Make this change for both Noise maps of the Map Mix Ripple map. 53. If you think there are too many small ripples and not enough large ripples, then you can enable the Use Curve option for the Mix map and adjust the curves Upper and Lower transition zones. This gives us an easy way to control which of the two types of ripples will be most noticeable when they are mixed together. Make this change, as shown in the following illustration. 54. Save your file. You can open the scene Ch05-04.max to compare your results.

Exercise 3: Water material creation


The creation of a realistic water material can be difficult and laborious, but if your water material is to be impressive and unique to your needs, you will need to spend some time on it. Lets continue by examining the waters properties. The creeks water changes color depending on the water depth. In shallow areas, a great deal of light can bounce back from the bottom, giving the water a lighter color. In deeper areas, less light makes it all the way to the bottom and back, and as a result the water color is darker. The number of small particles in the water also affects its transparency and color. Water also has its own index of reflection and refraction. Lets experiment with the water material, keeping in mind all the properties mentioned above. Lets start with the color of the water. As we already know, in the deeper areas of the creek, water gets darker; warmer and saltier water is bluer, while cold and less salty water tends to be greener. In our case, this creek has cold and fresh (saltless) water. In order to make the process of working with the water material easier, well simplify it a little. 1. Continue from the previous exercise or open the file Ch05-04.max. 2. In the Maps rollout at the base level of the Water material, disable the Bump map. 3. Set the Reflect color to pure black (R=0,G=0,B=0) and set the Refract color to pure white (R=255,G=255,B=255).

5-14 Water Elements 4. Set Refract IOR = 1.0. This is the IOR setting of a pure vacuum. This will prevent the light from being refracted at all and makes the material look invisible, unless there are other material qualities like reflection and bump that allow it to be seen. 5. Enable the Affect shadows option. This allows the materials transparency to affect the strength of the shadows. 6. Render the camera view. The result should look similar to the following illustration. Notice the water is invisible.

7. In the Refraction section of the material, set the Fog color to green (R=100,G=115,B=60). 8. Set the Fog multiplier = 0.001. 9. Render the camera view. The result should look similar to the following illustration.

We can see that the water in the deep areas is painted green while the color in shallow areas is unchanged. Now, lets make the deeper water darker. 10. Set the Fog bias to -0.25. This enhances the effect of the Fog multiplier. 11. Render the camera view. The result should now look similar to the following illustration.

Water Elements 5-15


The Fog multiplier allows us to change just how far light can reach into the water depth, basically we are increasing the contrast between the deep and shallow areas when we increase this value. Positive Fog bias values decrease the effect of the Fog multiplier and negative values increase it. On a different note, water has microscopic organisms living in it, plus sand and dirt, as well as other particles. The density of these objects can affect the transparency and clarity of the water. Lets simulate that. To change the clarity of the water, lets blur out what we see through the water in the deep areas, as these areas are far from the banks and dont have any objects on the surface. Lets use the VRayDirt map for the Glossiness parameter in the Refraction section of the current material. To enable us to fine-tune the VRayDirt map more quickly, it is better to use it on test material and then transfer it to our Water material. 12. Create a new VRayLightMtl material and call it TestGlossy. 13. In the Color parameters map slot, place a Mix map and rename it Glossy Mask. 14. Place a VRayDirt map into the Mix Amount parameters slot and rename it Mix Glossy Mask. Set Radius = 140. 15. Enable the invert normal parameter and set Subdivs to 20. 16. Assign the TestGlossy material to the Water Level object. Now, in order to conduct test renders with adequate lighting, lets change a few things in the Render Setup dialog box. 17. Open the Render Setup dialog box. Go to the Indirect Illumination tab and in the V-Ray:: Indirect Illumination (GI) rollout disable the On option. 18. Go to the V-Ray tab and in the V-Ray:: Global switches rollout disable Lights, Hidden Lights, Shadows, Reflection/refraction, Maps, and Glossy effects. To the right of the Default lights parameter, select Off from the drop-down list so that default lighting isnt engaged. See the following illustration for reference.

19. Render the camera view. The result should look similar to the following illustration; however, there will be noise in our rendering. If you have a fast computer, you can make the adjustment in the next step to remove the noise, or simply skip the next step. 20. In the Settings tab of the Render Setup dialog box, set the Noise threshold to 0.003. This will remove the noise sufficiently.

5-16 Water Elements

In the test rendering, we see that dark areas need to be blurred more, and white areas blurred less. However, V-Ray understands the map differently; it blurs out black colors more than the whites. In order to make V-Ray properly use this mask, we need to do the following: 21. In the Mix Parameters rollout of the Glossy Mask map, swap Color #1 and Color #2. 22. Render the camera view. Your image should look similar to the following illustration.

23. Adjust the positioning of the white and black areas by adjusting the Mixing Curve in the Mix Parameters rollout for the Glossy Mask. Enable the Use Curve option and set Upper to 1.0 and Lower to 0.98, as shown in the following illustration. With these types of values, the curve does not even appear and the black is only visible on the edges of the creek. 24. In the VRayDirt map parameters, set Falloff = 0.3.

Water Elements 5-17


The Upper and Lower parameters allow quick and easy changes to the degree of influence the black and white colors have on the material. Upper and Lower values close to 1 increase the influence of Color #1, while values closer to 0 increase the influence of Color #2. In our case the values were picked by performing many tests. For the creation of contrast masks, it is very convenient to use a VRayDirt map with a Mixing Curve. An important part of this technique is being able to control the contrast with the Mixing Curve. However, it is recommended that you use this technique only when high quality is not a requirement. If the project requires high quality contrast masks, then VRayDirt map is not necessarily needed with the Mix map; just the VRayDirt map on its own is enough to change the contrast by modifying its Distribution and Falloff parameters. As an alternative, we can assign the TestGlossy material to the object and use Render to Texture as described earlier in this chapter. We can get the bitmap image and adjust its contrast in Photoshop, then place the bitmap into the Glossiness slot of the Water material. The only disadvantage is that if we change the objects geometry, then well need to recreate the bitmap and do the whole process over again. So, lets continue. 25. Copy the Glossy Mask map from the TestGlossy material and paste it (as an instance) into the Glossiness slot of the Water material. 26. Assign the Water material to the Water Level object. 27. Open the Render Setup dialog and go to the Indirect Illumination tab. In the V-Ray:: Indirect Illumination rollout, turn on GI. Then go to the V-Ray tab and in the V-Ray: Global Switches rollout, turn on Lights, Shadows, Reflection/Refraction, Maps, and Glossy effects. 28. Render the camera view. If your render looks similar to the following illustration, then you did everything correctly.

29. Save the scene. You can compare your scene to our version saved in Ch05-05.max. Refraction is the optical effect that occurs when light travels through water. A geometric distortion on the waters surface will increase this effect. Therefore, we need to use the bump map and modifiers that we disabled earlier. The intensity of refraction is controlled by a real-world material quality called IOR (index of refraction). In 3ds Max, IOR is a parameter that affects an objects appearance based on this quality. Lets change it and see what happens. 30. In the Water materials Maps rollout, disable the map in the Glossiness channel and enable the map in the Bump channel. 31. In the Water Level objects modifier stack, turn on all of the modifiers.

5-18 Water Elements 32. In the Water material, set the IOR parameter in the Refraction group to 1.33. This is a typical IOR value for water. IOR charts for many different materials can be found on the Internet, as well as in the V-Ray manual. 33. Render the camera view. Your image should be similar to the following illustration.

Lets analyze this rendering. We can see that distortion is present. This distortion, caused by large waves, is not too obvious in a still image, but once animated, the effect will become more noticeable. A small distortion is present as well; we think that it is enough. What we do not like in this image is that the effect of the water getting darker at deep areas of the creek becomes less pronounced because the IOR made the water visually appear less deep and, as a result, the V-Ray renderers interpretation is incorrect. In order to add more darkness to the deep places in the river, we need to adjust the settings of the Fog parameter in the Refraction group of the V-Ray material. 34. Set Fog multiplier to 0.003 and Fog bias to -0.15. The result should be similar to the following illustration.

Now, we can begin working on the water reflections. 35. In the Maps rollout of Water material, enable the Reflect map that is already loaded. 36. Render the camera view.

Water Elements 5-19


We think that a falloff effect needs to be added to the reflection to make the water less reflective closer to the camera. 37. Go into the Invert Reflect-Refract map and click the Material Type button (currently labeled Output). The Material/Map Navigator (or Browser) dialog box will open.

38. Select Falloff. On the Replace map window choose to keep the old map as a sub-map. 39. Rename the falloff map to Reflect Falloff. 40. Swap the Invert Reflect-Refract (Output) map from the black slot into the white slot and set the parameters as shown in the following illustration.

You may have to change the Near & Far Distance amounts based on your scene. To help determine the correct value for the Near & Far distances, create a rectangle from the camera to the area where you want the blend to occur and use its measurement. You can see an example of this in Ch05-06.max. The Distance Blend falloff type allows us to control the falloff effect depending on the distance of the object to the camera. We can use this type of falloff in still renderings, or in animation with limited camera motion.

5-20 Water Elements 41. We have finished the material for the water. All that is left to do is to enable all maps in the Maps rollout, and render. The result should look similar to the following illustration. 42. Save your file. You can open the scene Ch05-06.max to compare your results.

Water Wheel
From the reference image shown in the following illustration, we can see that water travels from under the tree, over the rock gutter with slow speed, and then onto the water wheel. The speed and mass of the water turns the water wheel. We decided to increase the speed of the water so that the spinning of the water wheel looks natural and creates the feeling that it is actually spinning because water is hitting it. Upon impact with the water wheel, the water needs to break down into splashes and then flow down into the creek over the water wheels surface. The water wheel, as it rotates, creates small waves on the surface of the creek.

Figure 5-2. Water wheel in the reference image

Lets simulate the water falling and splashing on the water wheel. To achieve this, well use the glu3d plug-in, which is a particle system plugin that is perfect for simulating a small amount of splashing water. You can download a free trial version of this plug-in at http://www.3daliens.com. Just click the Downloads button to find the free trial. You will need to install this plug-in before you can do the following exercise.

Water Elements 5-21

Exercise 4: Creating water on the water wheel


1. Open the scene Ch05-07.max. This scene has all the geometry needed to create the falling, splashing water effect. Lets go over these objects and explain their purposes. Fountain is the rock gutter under the tree. Water will flow over it before it falls down to the water wheel. This object will participate only in the rendering, not in the physical creation of the water geometry. Gutter is a low-poly version of the gutter for use in the water simulation. Water Level is the surface of the creek. Wheel is the animated water wheel for the rendering, not for the water simulation. Wheel Low Poly is a low-poly version of the Wheel object to be used for calculating the water simulation. It will not appear in the rendering. All of the other objects are marked as invisible to the camera, as they only serve to provide reflections and refractions on the water. As a reminder, objects can be marked as invisible to the camera in their Object Properties dialog box. Lets make some splashing water. 2. In the Command panel, select Create Geometry glu3D pouring system and click the glu3D button.

When you click the button, three new objects are created in the scene: glu3DParticle01 is a particle emitter. The particles it creates will become the water surface. floorGlu3D is the collision object for water particles, similar to a deflector in 3ds Max. glu3D_01 allows us to create and control the water surface. In addition, the glu3D Toolbar appears.

5-22 Water Elements 3. Select the three new objects and then choose Hide Unselected. Zoom Extents to focus on the three new objects. Press the calculate glu3D button to perform a test simulation with the default objects and settings. The object Glu3DParticle01 starts generating particles, which react to gravity then collide with floorGlu3D and bounce around inside it. This will help you understand how glu3D works.

4. Delete floorGlu3D. You wont need this object for your scene; you will use scene objects as collision objects. 5. Unhide the objects you hid in Step 3. Place Glu3DParticle01 into the place where the waterfall begins, at the back end of the rock gutter under the tree. From the emitter, water needs to flow over the gutter and fall onto the water wheel. We will use the simpler Gutter object to direct the flow of particles rather than the bumpy gutter from our scene, since a bumpy surface can lead to unpredictable particle behavior. 6. Rename Glu3DParticle01 to Particle_Top and set Radius = 30.

Water Elements 5-23

7. In the Source parameters rollout, set Rate = 4, LOD = 5.0, and Thickness = 2.0. The Rate parameter controls the force that particles have when they are generated by the particle source. The LOD parameter refers to the Level of Density of the particles. Higher values lead to higher realism of the water but will slow down its calculation, so we will need to find a happy medium to balance quality and calculation speed. The Thickness parameter controls the stickiness or viscosity of the particles. Right now its value is set to 2, which is perhaps a little higher than it should be. If you want to see more splashes and less chunks of water, then this parameter should be set to 1. After following the exercise and performing some tests, you can tweak the water simulation however you like. 8. Set the stop@frame parameter to 200. This parameter defines when particles should stop emitting, but does not set the end time for the simulation. 9. In the Presets rollout, place a checkmark next to Override common params. Set Friction = 2.0, Adherence = 0.001, Bounce = 0, Col. GAP = 0, and Gravity = 40.0. Now, its time to fine-tune the interaction of the water with the collision objects. In our case, we have two collision objects: Gutter and Wheel Low Poly. 10. Select the Gutter and Wheel Low Poly objects. 11. In the glu3D Toolbar, click the glu3D Object Manager button to open the glu3D Object Manager window. Refer to the following illustration.

5-24 Water Elements 12. With the Gutter and Wheel Low Poly objects still selected, click Add selection to list in the glu3D Object Manager window. Both the selected objects appear on the list in the glu3D Object Manager window. 13. In the list of objects, highlight Gutter and set CollisionGAP = 0.001, Bounce = 0, Friction = 0, Adherence = 0. 14. Highlight Wheel Low Poly and set CollisionGAP = 2.0, Bounce = 0.2, Friction = 0.03, Adherence = 0.33. The parameter CollisionGAP defines the distance between the collision objects and where the particles begin to react to the collision objects. We want the Gutter object to simply deliver flowing water to the water wheel, not create any splashing effects, so we set the Bounce, Friction and Adherence for the Gutter object to 0. Conversely, the particles that collide with Wheel Low Poly need to simulate splashing, so these particles have parameter values that will make the particles react upon collision. After the water bounces off the wheel and falls into the creek, we wont need to see the particles once they penetrate the creek surface. To reduce the simulation time, we can place a Plane just below the creeks surface and make the particles disappear once they make contact with the Plane. 15. Create a Plane (standard primitive object) with Length and Width set to 1800. 16. Align the center of the plane object with the center of the water wheel along the X and Y axes, and position it slightly below the water wheel along the Z axis. Rename the Plane to Particle_ Kill_Plane. Refer to the following illustration.

17. Select Particle_Kill_Plane and open the glu3D Object Manager window. Click Add selection to list to add this object to the water simulation. 18. Highlight Particle_Kill_Plane and click Kill parts on collide. Also set CollisionGAP = 2.0, and the other Dynamic parameters to 0. See the following illustration.

Water Elements 5-25


19. Make sure that for all the objects in the glu3D Object manager button, the Add wetmap sequence option is turned off. We do not need to use wetmaps in this simulation. The simulation process generates a large amount of information about the location of the particles and geometry at each frame. glu3d stores this information in cache files so each frame can be regenerated quickly when you scrub the timeline to inspect the animation. By default, the file destination is set to c:\temp. We recommend using a different folder for this project. 20. Create a folder on your local drive called Cache_Top to store the cache files. 21. Select the glu3D_01 object. 22. In the Modify panel, find the Cache rollout. Click SET and change the directory path to Cache_Top. Refer to the following illustration.

The full path to the cache files will be ...\Cache_Top\surface\glu3d\waterfall_start_aux001. At this point, you could press calculate glu3D to start the water simulation. However, depending on the speed of your computer system, the simulation can take up to a few hours to calculate. Instead of waiting that long to make sure its working correctly, you can create a simplified version of the simulation to test the parameters. 23. Select Particle_Top, go to the Modify panel, and in the Source parameters rollout set LOD = 1. By doing this, you will decrease the number of particles generated and thus speed up the calculation process. During the simulation calculation process you can change all properties of the liquid and factors that affect it. Note that in the illustrations that follow we have left the LOD setting at its original value of 5. If you turned it down to 1, your water may look less dense. 24. Press calculate glu3D on the glu3D Toolbar. If you have set all the parameters correctly, the particle emitter will start generating particles, and they will flow over the gutter from one end to another and then fall down to the water wheel. Some particles will bounce off and thus create splashes and some particles will roll down the surface of the water wheel. After particles fall down below the level of the Particle_Kill_Plane, they will disappear. 25. Watch the calculation for a little while and click Stop to stop the simulation. If you stop the simulation and start it again, the new simulation always begins from the last frame recorded in the cache files. As a result, if you change the settings and want to restart the simulation calculation, you need to clear your cache files first. To do this, click Flush dynamics cache files on the glu3D Toolbar to clear information for the particles, and Flush surface mesh cache to clear information for the geometry.

5-26 Water Elements For a still rendering, it will be enough to run the simulation for 160 frames (assuming a 30 fps frame rate). Then you can choose the best-looking frame for rendering. We liked frames 109114, so we will base our work on those frames in the next exercise. 26. Save your work. You can compare your file to Ch05-08.max. 27. Now you will create the mesh surface for the waterfall. Position the time slider at frame 111 and click the Hide/Show mesh surface button on the glu3D Toolbar.

On the left side of the following illustration, you can see how the mesh surface of the water will look with the default settings. 28. Select the glu3D_01 object. Go to the Modify panel and in the Surface Params rollout, change the following parameters: Surface LOD = 9.0, Drop Size = 6.6, Melting Threshold = 4.2, Shrink Wrap = 0.66. The right image of the following illustration shows the result of these settings. By adjusting these parameters, we can adjust the look of the water mesh surface, size, and the amount of splashes.

In the future, the rendering of the water will be done separately from the main scene. From the main scene, we will be using only the environment so there are objects to reflect and refract. In order to add more realism to the waterfall, we will add a Motion Blur effect. A single frame would not be enough to do that, so we will use several frames. In our case, we have already chosen frames 109114. 29. Select the glu3D_01 object and in the Mesh controller panel of the Surface Params rollout turn off the Entire animation range checkbox. Set start@ = 109 and stop@frame = 114. 30. Press the Build surface button in Surface Params rollout, or you can press Build surface from the start of the playback range on glu3D Toolbar.

Water Elements 5-27


As a result, the water mesh surface will be created from frame 109 to frame 114. This mesh surface will be stored in the cache file in the folder you specified earlier, with \mesh appended to it. This cached data will remain in this folder until you clear the cache files. This way, you can place the particle source glu3DParticle in a scene at any time and load the particle and/or mesh surface information directly from the cache file, saving you the trouble of running the simulation again. glu3D gives you the ability to load mesh surface information from a cache file without the creation of a particle source. You can load such cache information to a gluBaker object. 31. Save your file. You can open the scene Ch05-09.max to compare your results. 32. Reset 3ds Max. 33. Go to the Create panel Geometry glu3D pouring system and click the gluBaker button. This will create the object gluBaker_01 in the scene. 34. Rename gluBaker_01 to gluBaker_Top. 35. In the Modify panel, for the parameter Cache path, set the path to match the path of your previously cached files.

36. Move the time slider to frame 109. If you did everything correctly, then you should be able to see the waterfall model in the viewport. The waterfall will show movement only at frames 109114. 37. Save your work. You can open Ch05-10.max to compare your results.

Exercise 5: Creek water reactions to the water wheel


Lets move on to the next stage: creating splashes in the creek in response to the falling water, and creating ripples on the surface of the creek in response to the water wheels motion. For this, we will use a new set of glu3D particles. 1. Merge the Water Level object from the Ch05-07.max scene. 2. Go to Create panel Geometry glu3D pouring system and click the glu3D button. A new set of glu3D objects appears in the scene. 3. Delete the floorGlu3D object. 4. Rename glu3DParticle01 to Particle_Bottom. 5. Go to frame 0. Place Particle_Bottom slightly below the place where the falling water meets the surface of the creek. Use Select and Rotate to rotate Particle_Bottom so its gizmo points upward along the Z axis.

5-28 Water Elements

6. In the Source params rollout for the Particle_Bottom object, set Radius = 40.0, Rate = 18.0, LOD = 3.0, Thickness = 1.5. You also need a collision obstacle to make the particles generated by Particle_Bottom form a crown-shaped splash. For this obstacle, an ordinary sphere will do. Using a simple object will keep the calculation time low and still give you sufficient control over the splash shape. 7. Create a sphere with Radius = 40 and Segments = 11. Name the object Sphere-Collision. Position the sphere at the place where the waterfall meets the creek, just above Particle_Bottom. Refer to the following illustration.

As particles flow up and then fall due to the gravity effect included in the simulation, they will fall below the creek surface and will no longer be visible. To delete unneeded particles, lets use the same process we used in the previous exercise, creating a Plane just below the creek surface and killing the particles when they collide with the plane.

Water Elements 5-29


8. Create a Plane with a Length and Width of 700 and place it slightly below the Particle_Bottom object. Rename this plane Particle_Kill_Plane. 9. Open the glu3D Object Manager. Select Sphere-Collision and Particle_Kill_Plane, and click Add selection to list. 10. Highlight Particle_Kill_Plane and click Kill parts on collide. Deactivate Add wetmap sequence. 11. Highlight Sphere Collision and set CollisionGAP = 1.0, Bounce = 90.0, Friction = 0.03, and Adherence = 0.0. Deactivate Add wetmap sequence and click Close. 12. In the scene, select the Particle_Bottom object. On the Modify panel, set stop@frame to 100. 13. Select the glu3D_01 object, click the SET button, and change the path for the cache files to ...\Cache_Bottom. 14. Read through the next two steps and then click the calculate glu3D button in the glu3D Toolbar. 15. While the simulation is calculating, move the Sphere-Collision object back and forth slightly every 35 frames. This will make the splashes uneven and thus more realistic. Also, at approximately frames 1824, turn off the Particle_Bottom generator. In order to do so without stopping the simulation calculation, select it and go to the Modify panel and turn on Disable source in the Source params rollout. Refer to the following illustration.

16. Click Stop to stop the calculation around frame 40. Now, we will create the mesh surface for the splashes. 17. Select the glu3D_01 object. In the Surface params rollout set the following parameters: Surface LOD = 8.0, Drop Size = 2.5, Melting Threshold = 4.1, and Shrink wrap = 0.3. 18. Under Surface Params, turn on Enable surface, and click Build Surface. This will allow us to build geometry for splashes based on calculated particles. If you think there are too many splashes, you can reduce the Radius of the sphere and reduce the Rate parameter for the particles source.

5-30 Water Elements

19. Save the current scene. You can compare your results to Ch05-11.max. Now, we will place the waterfall object and splashes object into the original waterfall scene. 20. Open the scene Ch05-08.max. 21. Save the scene as Ch05-12.max in case you need the original file later. 22. Open the Select by Name dialog box (keyboard shortcut H), to select the objects Particle_Top, Particle_Kill_Plane and glu3D_01. Press Alt+Q to Isolate Selection. 23. Go to Create panel Geometry glu3D pouring system and click the gluBaker button twice. You will see that two new objects (gluBaker_01 and gluBaker_02) have been created at the scenes origin. 24. Select the gluBaker_01 object and rename it gluBaker_Waterfall. This will be our waterfall object. 25. Go to the Modify panel and set the Cache path to the file with the waterfalls mesh surface data. For example, ...\Cache_Top\glu3D\waterfall_start_aux001. Because we calculated the mesh surface for frames 109114 only, we will be able to see the mesh surface only at these frames. 26. Go to frame 111. You should be able to see the waterfall mesh surface in viewports. 27. Select gluBaker_02 and rename it gluBaker_Splash. This will be the object that represents the splashes.

Water Elements 5-31


28. For this object, set the path to your Cache path to ...\Cache_ Bottom\glu3D\waterfall_start_aux001. Previously, we calculated the mesh surface for the splashes over frames 0-40. This frame range is different from our waterfall mesh surfaces frames, so we need to change the starting frame for the splash animation. 29. With gluBaker_Splash selected, in the Modify panel, in the Time transformation group, set the Offset parameter to 95, as shown in the following illustration. Now the animation will go from frame 95 to frame 135. You can move the time slider to frame 111 to make sure it works correctly.

Now, we have synchronized the animation of the splashes with the animation of the waterfall. 30. Assign the Water material to the objects GluBaker_Waterfall and GluBaker_Splash. 31. Conduct a test render. The result should be similar to the following illustration.

5-32 Water Elements For better realism, you can add a Motion Blur effect. You can see an example of this in the next illustration.

32. Save your work. You can compare your results to Ch05-13.max from the support files. The water doesnt look realistic yet because it is reflecting and refracting only the very limited number of objects in the scene. But you can see in the test render that the volume of water flowing from the gutter has a nice refractive thickness to it, and that the splashes look like water droplets. Next, the water wheel needs to create waves and ripples where it contacts the waters surface. The water wheel doesnt spin very fast, so the deformation of the water under the wheel doesnt need to be too intense. We will see only small waves and a rippling effect. For the surface of the water, we will use the Water Level object that we created in the first chapter. Lets temporarily disable objects GluBaker_Splash and GluBaker_Waterfall. 33. Select the GluBaker_Splash object and turn on the Disable option on the Modify panel. Do the same for the GluBaker_Waterfall object. 34. Select the Water Level object. 35. For the Water Level object, turn all of the modifiers off except TurboSmooth. In order to set up waves, we need to increase the number of polygons for the Water Level object. However, this can slow down the viewport navigation, so we need to hide the polygons that we dont need for the simulation. 36. At the Polygon sub-object level for the Water Level object, select the polygons under the water wheel. Click Hide Unselected to hide the unselected polygons.

Water Elements 5-33

37. For the TurboSmooth modifier assigned to the Water Level object, set Iterations = 6. Now, lets create the waves under the water wheel with the Wave and Ripple modifiers, using the Vol. Select modifier to limit the effects to a specific area. Vol. Select works by selecting faces or vertices contained within the Vol. Select modifiers Gizmo and passing the selection up the Modifier Stack to the next modifier, in this case a Wave or Ripple modifier. The Vol. Select modifiers Gizmo can be transformed and animated, creating an animatable selection for another modifier to affect. 38. Apply a Vol. Select modifier to the Water Level object and rename it Vol. Sel for Wave. Move and rotate the modifiers Gizmo so its positioned under the water wheel and is parallel to the wheel. Scale the Gizmo so it encompasses the area just under the water wheel. 39. For the Vol. Sel for Wave modifier, set Stack Selection Level to Vertex, turn on Use Soft Selection, and set Falloff = 125.0. Change the Selection Method to Add, and set Pinch = .2. Adjust the position and scale of the Gizmo as necessary so the selection looks like the following illustration.

40. Apply a Wave modifier to the Water Level object and rename it Wave Under Wheel. In the modifiers parameters, set Amplitude 1 = 12.0, Amplitude 2 = 0.0, and Wave length = 80.0.

5-34 Water Elements 41. Move and rotate the Wave Under Wheel modifiers Gizmo so that waves appear to crest in between the spokes of the water wheel. Refer to the following illustration.

In the next chapter, we will animate the Wave modifier so that the waves will move along with the water wheel. Now, lets add ripples to the water. 42. In the Modifier Stack for the Water Level object, copy the Vol. Sel for Wave modifier and paste it above the Wave Under Wheel modifier. Rename the modifier Vol. Sel Ripple1. For the Vol. Sel Ripple1 modifiers parameters, make sure the Stack Selection Level is set to Vertex, turn on Use Soft Selection, and set Falloff = 290.0. 43. Scale the Vol. Sel Ripple1 modifiers Gizmo to 120% along the X axis and 400% along the Y axis. You have just increased the area of influence for the Ripple modifier that you are about to apply to the object. 44. Apply a Ripple modifier to the Water Level object and rename it Ripple1. On the Modify panel, set Amplitude 1 = 11.0, Amplitude 2 = 0.0, Wave Length = 70.0, and Decay = 0.003. 45. Use the Move and Rotate tools to reposition the modifiers Gizmo in front of the water wheel approximately at the place where the major mass of falling water hits the surface of the creek. Then the waves created by the Ripple1 modifier will be aligned with the waves created by the Wave Under Wheel modifier. Refer to the following illustration.

In the next chapter, you will animate the Ripple1 modifier so that waves created by this modifier will move. You will also synchronize the Ripple1 and Wave Under Wheel modifiers animations.

Water Elements 5-35


To prepare for animation in the next chapter, all that is left to do is to add a few more Ripple modifiers in places where falling and splashing water hits the surface of the creek. To better determine these places, we need to see the waterfall geometry. 46. Enable the GluBaker_Splash and GluBaker_Waterfall objects by turning off the Modify panel Parameters Disable option. 47. Assign a Mesh Select modifier to the Water Level object. This modifier will reset the current subobject selection in the Modifier Stack, meaning the next modifier you apply will affect the entire object. 48. Copy the Ripple1 modifier and paste it above the Mesh Select. Rename the modifier to Ripple Front. Scale the modifiers Gizmo to 150%. 49. In the Ripple Front modifiers parameters, set Amplitude 1 = 4.0, Amplitude 2 = 4.0, Wave Length = 30.0, and Decay = 0.015. Position the gizmo in the spot where the falling water hits the surface of the creek in front of the water wheel. 50. Copy the Ripple Front modifier and paste it above itself in the Modifier Stack. Rename it Ripple Left. Set Amplitude 1 = 5.0, Amplitude 2 = 5.0, Wave Length = 30.0, and Decay = 0.018. 51. Reposition the modifiers Gizmo to the left of the water wheel at the place where the splashed water hits the creek. 52. Select the Water Level object and go to Polygon sub-object mode. In the Edit Geometry rollout, click the Unhide All button to unhide all hidden polygons. If you enable all the modifiers again, you will see that the Ripple Waterfall modifier from the first part of this chapter is creating ripples over the entire surface of the creek. We need to tell this modifier not to create ripples in the area under the water wheel. 53. In the Modifier Stack, copy the Vol. Sel Ripple1 modifier and paste it below the Ripple Waterfall modifier. Rename it Vol. Sel Waterfall. 54. In the Vol. Sel Waterfall modifiers parameters, in the Selection Method rollout, enable the Invert option to invert the area selected by the modifier. In the Soft Selection rollout, set Falloff = 400. 55. Add a Mesh Select modifier above the Ripple Waterfall modifier in the Modifier Stack. As a result, the Modifier Stack for the Water Level object should look as shown in the following illustration. The modifiers added in the first part of this chapter are shown in green, while the remaining modifiers were added in the second half of this chapter.

5-36 Water Elements You have now completed the creation of all of the water objects, and have set up modifiers for animation. 56. Save the scene. Open Ch05-14.max if you would like to compare your results.

Summary
Hopefully this chapter made you realize how important it is as a 3d artist to analyze environments and figure out how to break apart and recreate the various components. If we had simply built the creek surface and added some ripples to it, our scene would be lacking so much of the dimension that we created by adding different types of ripples to show various speeds of water movement and the influence of the various objects that impact the waters surface. Every small detail adds to the realism and impact in your final rendering. By showing not only the changing water depths and the varying ripple effects, but also the duckweed build-up at the banks, we have very convincingly created a slow moving creek. By showing the faster, more turbulent water by the water wheel we have added movement which creates a nice contrast. Study everything around you and look at the subtle details. Take the time to add as much detail as possible to your projects; it is this type of detail that draws the viewer in and invites them to get lost in your work.

ChaptEr 6

Background and Site Elements

I n thIs chapter , we wIll create the backdrop for the scene, as shown in Figure 6-1. We will use some of the modeling methods discussed previously in this book, but we will use some new tools to populate the background with dense foliage and natural elements. We will use the Hair and Fur modifier for grass, and Particle Flow and Scatter to place trees around the scene. We will also use the program Vue 8 xStream for the mountains and sky. You can download a trial version of this product at http://www.e-onsoftware.com/products/?page=try.

Figure 6-1. The background and site elements created in this chapter

6 - 2 B a c kg r o u n d a n d S i t e E l e m e n t s

Exercise 1: Preparing mountain textures


First, we will divide the scene into two parts: the near range (elements closer to the camera) and the far range (distant elements). In the near range we see fields and in the far range we see a forest and mountains. But before we start the modeling of the terrain, we need to define the area that is seen by camera. 1. Reset 3ds Max. 2. Make sure that the scenes Display Unit Scale is set to Generic Units and Lighting Units are set to International. 3. With the Perspective view active, open the Viewport Background dialog box (Alt+B) and load the reference image Fantasy.jpg as the background. In the Aspect Ratio section, select the Match Bitmap option. Click OK. This will assist us in determining near and far range objects. 4. Enable Show Safe Frames (Shift+F). 5. Open the Render Setup dialog box (F10) and set the Output Size to equal the reference image size, 1000 x 554.

The background image was created in Photoshop and served as the inspiration and main reference image from which the 3D scene was designed. The goal in this first exercise is to create a mountain that approximately matches one of the mountains seen in the reference image. In order to do this, we need to create a rough model and manipulate the view so that the model appears to match the silhouette of the chosen mountain in our reference image. Once we create one mountain object, we can make copies of it and modify the copies slightly to create the entire mountain range. 6. Create a Sphere object with parameters shown in the following illustration. Since this object will be turned into a mountain, lets rename it Mountain.

7. Turn on Wireframe mode (F3). 8. Use the viewport navigation tools to change the Perspective view so that the object appears to match the mountain in the reference image, as shown in the following illustration. When you are satisfied with the alignment of the view, then we can create a camera from this view and temporarily turn off the background image.

If this project were not a tutorial but rather just a regular project for hire, you would probably want to leave this image on, create numerous low-poly models and then position them, in order to get a proper environment set up. However, since this is a tutorial, we will not spend an enormous amount of time experimenting with the sizing and placing of objects. We will simply direct you to create objects in a certain fashion and you can position them on your own.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 3

9. Press Ctrl+C to create a camera from the current view. 10. Open the Viewport Background dialog box (Alt+B) and deselect the Display Background option. 11. Disable Show Safe Frames (Shift+F). 12. Convert the Mountain object into an Editable Poly and delete the polygons on the bottom half of the object. 13. Use the Connect command to add the horizontal edges shown in the middle image of the following illustration and then add the edges shown in the right image.

14. Manually move vertices to modify the object and make it similar to the following illustration. The exact placement is not as important as the fact that the object needs to have noticeable deformation that roughly mimics a mountain similar to the one we see in the reference image.

6 - 4 B a c kg r o u n d a n d S i t e E l e m e n t s

15. Using the following illustration as a guide, add additional edges and deformation to the object so that when we add the TurboSmooth modifier later, the result will look more like a natural mountain rather than a hemisphere. Try to make your object look similar to the following illustration. It does not need to be identical, it only needs to be similar and have some distortion. You can compare your work with the file Ch06-01.max.

16. Continue from the previous step with your own file or open the file Ch06-01.max to continue with the object already prepared up to this point.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 5
17. Apply the Unwrap UVW modifier to the object, and in the Modifier Stack, go to Face sub-object mode and select all of the polygons. The shortcut Ctrl+A is the best option to select all the polygons because, by default, the Ignore Backfacing option is enabled, which would prevent some polygons from being select during a Window selection. 18. In the Map Parameters rollout, click the Pelt button. The Edit UVWs dialog box appears and the object should look like the left image of the following illustration. For display purposes, and because of the limits of CMYK printing, the checker background was turned off and the color appears different than what you would actually see in 3ds Max. 19. In the Pelt Map dialog box, click the Start Pelt button. Within a second, the motion should stop and the object should look similar to the right image. Click Stop Pelt.

The goal of the pelt procedure is to flatten out the mapping of the object and achieve a nice even spread of the vertices that make up the object. The next three steps may or may not be beneficial, depending on the topology of your object. If the results of the next three steps produce a more skewed appearance to your pelt than what you already have right now, then you can click the Reset button, start the pelt process again, and leave these steps out. 20. In the Relax section of the Pelt Map dialog box, click the Settings button and in the Relax Tool dialog box, select Relax By Face Angles. 21. Click Start Relax and allow the procedure to run for few seconds. When you see that motion in the Edit UVWs windows has slowed, click Stop Relax. 22. In the Relax Tool dialog box, click the Apply button and close this window. If the results of these last three steps did not produce a better pelt, then simply click the Reset button in the Pelt Map dialog box, click Start Pelt again, and stop the pelt when its finished moving. 23. In the Pelt Map dialog box, click the Commit button. Now close the Edit UVWs dialog box. 24. Close sub-object mode and apply a TurboSmooth modifier to the object with Iterations = 2.

25. Open the Material Editor. Choose any empty material slot with the Standard material type, and assign a Checker map to the Diffuse channel. 26. In the Checker maps settings, set the Tiling parameter to 40 for both U and V.

6 - 6 B a c kg r o u n d a n d S i t e E l e m e n t s 27. Click the Show Standard Map in Viewport button and then assign this material to your mountain object. Your object should look similar to the following illustration. Because of the Checker map, you can clearly see how this texture wraps around the 3D object.

28. In the Modifier Stack, choose the Unwrap UVW modifier, and in its parameters, click the Edit button. 29. From the Tools menu, select Pack UVs. 30. From the drop-down list, select Linear Packing and click OK. This will move the object so that it takes up the entire texture space. You can also compare your results with the file Ch06-02. max and continue with this file if you have had any problems.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 7
Now, we need to create a texture for the mountain model. 31. In the Edit UVWs dialog box, go to Tools menu Render UVW Template. 32. Type 1024x1024 for the Width and Height and click Render UV Template. Save the resulting image as Rock-UVW.jpg. 33. Go to Photoshop and open the following images: Rock-UVW.jpg, Mossy Stone-small.jpg, and Rock Grass.jpg. 34. Copy and paste Mossy Stone-small.jpg into Rock-UVW.jpg as a new layer. Make sure the pasted image is centered on the background.

35. Also add Rock Grass.jpg to Rock-UVW.jpg as a new layer. This image is significantly smaller than the Rock-UVW.jpg image, so we will need to clone it over the entire surface of the canvas by holding down Alt + Shift while dragging this layer over the canvas multiple times to create copies. This will also create several additional layers of the grass image. 36. Copy the new layer over and over until it fills the image with a seamless appearance. 37. Select all the grass layers and execute the Merge Layers command (Ctrl+E). 38. Click the Add Layer Mask icon at the bottom of the Layers palette. Make sure the Layer mask thumbnail is selected. 39. Select the Brush tool (B), right-click and set the brush Master Diameter to 100 and the Hardness to 0%. 40. Change the Foreground color to 100% black.

6 - 8 B a c kg r o u n d a n d S i t e E l e m e n t s 41. Using the left image of the following illustration as a reference, paint away the center of the grass layer to reveal the image below it, which will represent the rocky mountain top. Because we are painting with a black brush, we are painting a mask and revealing the layer below. 42. Change the Foreground color to 100% white. Pure white will allow us to delete parts of the mask that we just painted with the pure black. 43. Using the middle image of the following illustration as a reference, paint around the edges of the rectangular mask to hide the edges so that the two images blend without a noticeable seam. Continue painting so that you get something similar to the right image, whereby the two images used to texture the mountain blend more naturally. You can switch brush types and sizes to get even better results. We suggest using a Splatter brush from the standard brushes library with a transparency of 30-70%.

In the previous illustration, we can see that the grass and rock colors do not match, requiring a small color correction. 44. Select the grass layer and execute the Color Balance command (Ctrl+B).

45. Disable the Preserve Luminosity option and enable the Shadows option. Set the following values for Color Levels: +20, +3, -4. 46. Switch the selector to Midtones and set the Color Levels to +34, -27, +6. 47. Switch to Highlights and set the Color Levels to -2, +18, +15. Click OK to complete the command. 48. Execute the Levels command (Ctrl+L) for the grass layer. Set the Channel parameter to RGB. 49. Set the Input Levels parameters to 0, 0.57, 255. 50. Set the Output Levels parameters to 0, 191. Click OK to complete the command. The results of the previous few steps should look similar to the following illustration.

51. From the Layer menu, select Flatten Image.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 9
If we look closely at the image details, we see that the green and brown grass elements are standing out too much. We need to tone them down a little. 52. Use the Hue/Saturation (Ctrl+U) command. 53. For the Red channel (Alt+3), set Hue = +50 and Saturation = -20. 54. For the Green channel (Alt+5), set Saturation = -75. Click OK to complete the command. 55. Save the resulting image as Rock.jpg. To make the mountain surface rougher we will eventually use the VrayDisplacementMod modifier. In order to do that, we need to prepare a texture for the displacement. 56. Press the shortcut Shift+Ctrl+U to completely desaturate the image. 57. Duplicate this layer and apply the Gaussian Blur filter with Radius = 2 pixels. 58. For the new layer, set Blend Mode to Lighten. 59. Duplicate this layer and set its Blend Mode to Multiply. As a result you should have three layers, each with a different blending mode: the lower layer with Normal, middle layer with Lighten, and upper layer with Multiply. 60. Select all three layers and merge them. 61. To the resulting image, apply a Craquelure filter (Filter menu Texture) with the following parameters: Crack Spacing = 42, Crack Depth = 1, Crack Brightness = 10.

62. Access the Levels command and set the Input Levels to 0, 1.49, 255. 63. Your resulting image should look similar to the following illustration.

6 - 1 0 B a c kg r o u n d a n d S i t e E l e m e n t s 64. Save the image as Rock Disp.jpg or continue with the already prepared image of the same name provided in the books support files. 65. Return to 3ds Max, select the mountain object and apply a VrayDisplacementMod modifier to it. 66. Within the Modify panel, load the bitmap Rock Disp.jpg in the Texmap channel and set Amount = 1.5. This represents the maximum displacement amount. 67. Open the Material Editor, select the material assigned to the mountain object, and within the Diffuse channel, replace the Checker map with the bitmap Rock.jpg.

68. Enable the Show Standard Map in Viewport option. 69. Render any view that shows the mountain properly. You should get something similar to the following illustration. At this point, you can manipulate the images applied to the mountain using Photoshop, and render again to tweak your results if you want. 70. Save your file. You can open the scene Ch06-03.max to compare your results.

Exercise 2: Site modeling


In this section, we will model background objects in a way that works specifically with the current camera view. We will also describe how to utilize powerful tools such as Compound Objects, Particle Flow and V-Ray for our scene. 1. Continue from the previous exercise or open the file Ch06-03.max. 2. Select the Mountain object and disable the TurboSmooth modifier. We do not need it on right now. 3. Delete the VRayDisplacementMod modifier. We will reapply it later to the entire mountain range as one object.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 1 1
4. Clone the Mountain object several times as an Instance. For each clone, change the rotation and size of the object, and move it along the horizon. Overlap the objects to make them look like a continuous mountain range. An example is shown in the following illustration.

Now, we will create the guides for the fields closer to the camera, as shown in the following illustration. Notice that these objects represent where we want the different land areas to exist.

5. Continue from the previous step or open the file Ch06-04.max. This scene already has the mountains in place. 6. Switch to the Top view and create a Sphere object with the following parameters: Radius = 100, Segments = 32, Hemisphere = 0.9. 7. Use the Scale tool to scale the object 260% along its Y axis, and rotate the object so it points away from the camera. 8. Use the Clone tool to create two more copies of this object. 9. Name these three spheres as follows: Field01, Field02, and Field03. These spheres will serve as the ground objects for the fields on which other objects will be placed. 10. Switch to the camera view and position these objects as shown in the following illustration. The two spheres farthest from the camera can be made see-through to aid in correct placement in relation to the reference image.

6 - 1 2 B a c kg r o u n d a n d S i t e E l e m e n t s

You can also look at the next illustration to see how the spheres are placed in relation to the camera. Next, well create a planar object to serve as the terrain for the forest. Rather than use a flat Plane, youll create a Patch object so you can more easily create small hills on the surface. 11. Continue from the previous step or open the file Ch06-05.max. 12. Switch to the Top view and create a closed Spline with four vertices that follows the cameras view cone and overlaps it slightly. Two of the edges define the near and far ranges of the forest. See the following illustration as a guide. 13. Name this object Terrain. This object will be where most of the trees that are not on the mountains will reside. 14. Apply the Face Extrude modifier to this object. 15. Apply the Edit Patch modifier. If the face normals are backwards, reverse the direction of the spline.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 1 3

16. Switch to the Right view, go to Vertex sub-object mode within the Editable Spline object, and select the vertices closest to the mountains edge. 17. Convert these vertices to the Bezier Corner type, and move them along the World Z axis to align them with the base of the mountains.

The Terrain object intersects one of the fields. We need to correct this by making the object go around the field, not through it. 18. While still at the Vertex sub-object level of the ground object, add a few more vertices to the spline near the field (intersecting sphere). Move the vertices so the ground goes around the field, as shown in the following illustration.

6 - 1 4 B a c kg r o u n d a n d S i t e E l e m e n t s You can also see that some mountains hover above the ground. You need to adjust the mountains so they are sitting on the ground. 19. Select one of the mountains. Go to the Edit Geometry rollout of the Editable Poly object and turn on the Preserve UVs option. To get there, you will probably have to acknowledge a warning message that appears. Select Yes to dismiss it. 21. Select the cap polygon that represents the bottom of the mountain and use the Bevel tool with the following parameters: Bevel Type = Group, Height = 50, Outline Amount = 120. 22. Turn the TurboSmooth modifier back on.

20. Click the Cap button under Border sub-object mode to cap the bottom of the mountain.

The result should be similar to the following illustration. Because you cloned each mountain as an Instance, they will all receive these edits automatically. If you cloned them as unique copies, you will need to repeat this edit on each mountain.

Now, we need to delete extra geometry. 23. Continue from the previous step or open the file Ch06-06.max. 24. Convert each mountain into an Editable Poly.

25. Use any tools that you want to delete the areas of the mountains that overlap each other. We suggest the ProBoolean feature with the Merge option, but in reality there are many ways to do this. Regardless, we need a clean model without extraneous hidden faces, so that when we scatter trees on the object, they will scatter properly, and not be placed buried into the mountains in some places. In addition to the overlapping mountain geometry, cut the areas of the terrain out that lie beneath the mountains. 26. Attach all of the mountains together into a single Editable Poly object.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 1 5
In the end, the model should look similar to the following illustration.

27. Continue from the previous step or open the file Ch06-07.max.

28. With the Mountain object selected, add an Unwrap UVW modifier. Do not change any of its parameters. This modifier is just required for proper displacement display. Apply a VrayDisplacementMod to this object. 29. In the VrayDisplacementMod parameters, set Type = 3D mapping and Amount = 1.5, and assign Rock Disp.jpg to the Texmap slot. 30. Open the Material Editor and select the Rock material. Copy it into an empty sample slot and rename it Terrain. 31. Click the map in the Diffuse channel. In the Bitmap Parameters rollout, find the Cropping/Placement group and change the parameters as follows: U=0.0, V=0.0, W=0.4, H=0.4. Enable the Apply option.

With these parameters, we have defined the area of the texture that will be applied to the Terrain object, in this case the area of the texture that has grass only. If you click the View Image button, you will see the selected area marked with a bounding box. In our case, it is important to match the mountains base material and ground material. 32. Apply this material to the Terrain object. 33. Apply a UVW Map modifier to the Terrain object. Set the Type to Planar and set the following parameters: Length = 100, Width = 100.

We can also cut away extra geometry from the three fields, especially polygons that are not visible from the camera. However, we need to be careful and not cut away too much. You should reserve a little bit of extra geometry on these hidden fields to hold tall vegetation that will come up behind the foreground field.

6 - 1 6 B a c kg r o u n d a n d S i t e E l e m e n t s 34. As you see fit, cut away parts of the fields as shown in the following illustration. Furthermore, if you want to perfect your Terrain object, as we mentioned earlier, we suggest cutting away the areas under each mountain so that these areas of the Terrain object receive no trees.

35. Save your file. You should have something similar to the scene shown in the following illustration. You can open the file Ch06-08.max to compare your results.

Next, we need to model two types of pine trees with an approximate size of 6x6x9. The first one will be in the near range, so it will have to be more detailed. The second will be in the far range, so it can have fewer details. For the near range pine tree, we will model the tree and then use the Hair and Fur modifier to create the needles.

Exercise 3: Creating high-poly trees


1. Reset 3ds Max. 2. Make sure that the scenes Display Unit Scale is set to Generic Units and Lighting Units are set to International. 3. In the Perspective viewport, create a Cylinder object with the following parameters: Radius = 1000, Height = 600, Height Segments = 3, Cap Segments = 1, and Sides = 16.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 1 7
4. Zoom Extents All and enable Edged Faces. 5. Convert this cylinder into an Editable Poly and go to Edge sub-object mode. 6. Select the edges highlighted in the left image of the following illustration and position approximately as shown. 7. Go to Polygon sub-object mode and select the bottom cap of the cylinder. Use the Inset tool with an Inset Amount = 80 to create another polygon with a smaller radius, as shown on the right side of the following illustration.

8. Delete this new polygon and also delete the top cap polygon. 9. Go to Border sub-object mode and select the top border of the object. 10. Turn on the Use Soft Selection option in the Soft Selection rollout and set the Falloff parameter to 550. 11. Scale the selected edges 30-40% smaller along the X and Y axes. Refer to the left side of the following illustration. 12. Turn off Soft Selection and in Edge sub-object mode, select the ring of edges second from the top, and then position and scale them as shown on the right side of the following illustration.

13. Leave the sub-object level, go to a Front view and perform a Zoom Extents. 14. From the Tools menu, select Array. 15. Click the Preview button and set the parameters to match the following illustration. Click OK.

6 - 1 8 B a c kg r o u n d a n d S i t e E l e m e n t s

16. Select the bottom object and in the Edit Geometry rollout, click the Attach List icon. In the dialog box, choose all objects and click the Attach button. 17. Apply the Taper modifier with the following parameters: Amount = -0.95 and Curve = 0.24. The result should look similar to the image on the left side of the following illustration. 18. Use the Squeeze modifier with the following parameters: Amount = -0.12 and Curve = 0.2. The result should look similar to the right image of following illustration.

19. Apply the TurboSmooth modifier with Iterations = 2.

NOTE: With 2 iterations, the object will have 4 times as many polygons. Unless your computer is a dual quad-core with at least 12GB of RAM, you should leave this value set to 1. Otherwise, your computer will probably struggle later to create the necessary instances of the tree.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 1 9
20. Apply the Noise modifier with the parameters shown in the following illustration. This will add random deformation to the tree and make it look more realistic.

21. The tip of the pine tree should not be as deformed as the rest of it. Apply a Vol.Select modifier below the Noise modifier in the Modifier Stack. In the Stack Selection Level group of parameters, select the Vertex option, turn on Soft Selection and set the following parameters: Falloff = 340, Pinch = 1, and Bubble = 0. 22. Open the modifier and move its Gizmo downward towards the bottom of the tree so that it doesnt encompass the tip of the pine tree. Refer to the following illustration.

23. Apply an Edit Mesh modifier to the top of the Modifier Stack. This will hide the vertices selected by the Vol. Select modifier. 24. Apply the Edit Poly modifier and position it between the TurboSmooth and Squeeze modifiers.

6 - 2 0 B a c kg r o u n d a n d S i t e E l e m e n t s 25. Go to the Border sub-object level and one by one select and scale down the top (inner) borders of the top six levels of the pine tree. Refer to the left image of the following illustration. You do this to make the openings between the levels of the pine tree more pronounced. In the following illustration, you can see the tree before (middle) and after (right) we changed it (after we closed the Edit Poly modifier). Do not close the modifier yet. 26. Select the top border of the top level of the pine tree and click the Collapse button to cap the hole in the geometry. 27. Click on Border to close the sub-object level on the Edit Poly modifier. If you do not click Border, the Noise and Vol. Select will have no effect.

28. Apply a Push modifier to the top of the Modifier Stack. Set Push Value = 25. This will slightly puff out and soften the tree. 29. Save your scene. 30. Continue with your saved scene or open the file named Ch06-09.max. 31. Make this object invisible for rendering by disabling the Renderable option in the Object Properties dialog box. Now lets add needles to the fur tree using the Hair and Fur modifier. 32. Apply the Hair and Fur modifier to this object. 33. In the Styling rollout, click the Style Hair button. When you do this, manual hair editing mode will be turned on and you will get a brush that you can use to style the hair. In the viewport, hair will be displayed as shown in the following illustration.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 2 1

The length of the hair for this object is too long. Lets reduce it. 34. In the Styling section of the Styling rollout, disable the Distance Fade option.

35. Increase the size of the brush with the slider that can be found between the Ignore Back Hairs option and the Translate icon. The size of the brush needs to be much greater than the size of the object so that brush will affect all of the hairs at once. 36. In the Styling section, click the Scale icon, as shown in the following illustration. This editing mode will allow scaling of the hairs.

37. Place the brush over the object so that it covers it entirely.

6 - 2 2 B a c kg r o u n d a n d S i t e E l e m e n t s 38. Click, hold, and drag with the Left Mouse Button until the hair is scaled down to proper size, as shown in the right image of the following illustration. Release the Left Mouse Button when finished.

The direction of hair also needs to be changed. 39. In the Utilities section of the modifier, click the Recomb icon. This is the icon that looks like a comb. The hair will lay down against the object. 40. Click the Stand icon (near the Scale icon). 41. Ensure that the brush size covers the entire tree and then click and drag to the right so that the hair is slightly raised, but just slightly.

If at any time you do not like a change youve made, while in hair editing mode you can click the Pop Selected icon (above Comb) to reset the hair to its initial state. 42. In the Styling rollout, click the Finish Styling button to exit from hair editing mode. 43. Go to the Display rollout within the modifier. 44. Make sure that Display Hairs option is enabled. Set Max Hairs to 100000. This will allow you to see up to 100000 hairs (or geometry instances) in the viewport. This number can be reduced as necessary, depending on the power of your computer.

Note that the parameters in the Display rollout do not affect the model or render. They only affect the way hairs are displayed in the viewport. Display Guides allows us to see or hide hairs that were visible in hair editing mode with the Style Hairs button enabled. The Percentage setting allows us to set a percentage of how many hairs to display in the viewport. 45. Set Percentage to 100. Now, lets change the hairs to branches using an object already prepared with diffuse and opacity maps in its material. 46. Merge the object Pine_Needles from the file named Ch06-10.max into the current scene. 47. Select the pine tree object and open the Tools rollout within the Hair and Fur modifier. 48. Click the Instance Node (None) button and select the Pine_Needles object. Refer to the following illustration.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 2 3

Now, all of the hairs in the modifier will be replaced with the Pine_Needles object. 49. In the General Parameters rollout, set the Root Thick value to 20. This will allow the instanced branches to maintain their proper aspect ratio.

50. Set Hair Count to 15000. This defines the number of hairs, or in this case, the number of Pine_ Needles geometry instances.

6 - 2 4 B a c kg r o u n d a n d S i t e E l e m e n t s If you think that the direction of growth of the branches is too chaotic, you can fix it by lowering the Frizz Tip setting in the Frizz Parameters rollout. 51. Save your scene. You can compare your results with the file named Ch06-11.max. More information regarding the Hair and Fur modifier can be found in chapters 3 and 7.

52. After you create and set up the hair, go to the Hair and Fur modifiers Tools rollout and press the Hair Mesh button. This converts all hairs into a single Editable Mesh object. Now, we need to create the material for the pine tree. 53. Assign a UVW Map modifier to the tree with the parameters shown in the following illustration. Make sure the mapping is set to Planar. Note that Map Channel = 2. Using this value for the Map Channel ensures that the texture coordinates you apply now are only applied to textures set to the same Map Channel value in the Material Editor. 54. To more clearly accentuate the pine trees levels, create a VRay material and place a Mix map in the Diffuse channel. Place the Pine_Dark.jpg and Pine_Light.jpg bitmaps from the support files into the Mix maps Color #1 and Color #2 slots, respectively. 55. In the Mix Amount channel, place a Gradient Ramp map. Set Map Channel = 2 and set up the gradient colors and other parameters as shown in the following illustration. The idea is to fill the upper side of each pine trees layer with white and the lower side with black as shown in the illustration. You can compare your results with the file Ch06-12.max.

56. With the material still at the Gradient Ramp map level, right-click the materials sample slot and choose Render Map from the menu. In the menu dialog box, set the texture render size to 512 x 512 and click Render. 57. Save your result as Mix_Pine.jpg. 58. Open this file in Photoshop and paint the top black line with white. Change the contrast of this image to make the light areas 100% white (RGB 255,255,255). Save the file with the same filename. You may want to blur or paint some softness into the transition between the black and white values.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 2 5
59. In 3ds Max, go back to the Mix map level. In the Mix Amount slot, replace the Gradient Ramp map with a Bitmap and choose the image you just saved (Mix_Pine.jpg). This will help to free the computer resources during render. Be sure to set Map Channel = 2 for this new map. 60. At the materials base level, place the Pine_Refr.jpg image into the materials Refract slot. 61. Under the Basic Parameters rollout, set IOR = 1.0, and enable the Affect shadows and Affect channels (Color+alpha) options. These options cause the strength of the shadows and the alpha channel to be dictated by the refraction color swatch (i.e., the amount of transparency).

If you enable the Show Standard Map in Viewport option within the Mix Amount channel, you can see the effect of the Mix map on the object. The left image of the following illustration highlights the effect. 62. Render the tree. You should see something similar to the right image of the following illustration. Notice the variations in light and dark leaves.

63. Save your file. You can open the scene Ch06-13.max to compare your results.

Exercise 4: Creating low-poly trees


We have finished the material for the high-poly version of the pine tree for the near range. Now, we will create a low-poly version for the far range. 1. Continue from the previous exercise with your own file or open the file Ch06-13.max to continue with the scene already prepared up to this point. 2. Go to the Front view and activate the Show Safe Frames option. 3. Set the render output size to Width = 600 and Height = 1000. You may have to unlock the Image Aspect to accomplish this. 4. In the Environment and Effects window, set the scenes Background: Color: to RGB (61,94,43). 5. Perform a Zoom Extents so that the object takes up as much of the viewport as possible.

6 - 2 6 B a c kg r o u n d a n d S i t e E l e m e n t s 6. Render the view and save the rendering as Pine_Image.tif with the Alpha Channel option turned on. 7. Turn off Safe Frame mode. 8. To the side of the 3D tree, create a Plane object with Length = 3700 and Width = 2300. 9. Make the object See-Through. 10. Create a VRay material and place Pine_Image.tif in the Diffuse channel. 11. Copy this map into the Refract slot (not as an instance). 12. Set IOR = 1 and enable the Affect Shadow and Affect Channels (Color + alpha) options. 13. In the Refract maps settings, in the Bitmap Parameters rollout, turn on the Alpha as Gray option in the RGB Channel Output group. Also, turn on the Invert option in the Output rollout. Assign this material to the plane. 14. Return to the top level of the material and enable the Show Standard Map in Viewport option. 15. Make two copies of the plane and rotate each by 60 degrees around the Z axis from the previous plane (as seen from Top view). 16. Convert one of the planes into an Editable Poly and use Attach to attach the other two copies to it. 17. Create a Cylinder with Radius = 1150 and Height = 1200. Set Sides = 6 and Height Segments = 3. Position the object as shown in the left image of the following illustration. 18. Convert this object into an Editable Poly and edit the object to make it similar to the one shown in the right image. One way you can do this is by selecting each edge loop and scaling it down.

19. Copy the object two times along the Z axis. Adjust the shapes of the new copies to look similar to the left image in the next illustration.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 2 7
20. Select the bottom object and use the Attach tool to attach your copies to the original object. 21. Turn off the See-Through option for the object. 22. To these objects, assign the same material you assigned to the planes. 23. Apply a UVW Map modifier with the Mapping set to Box. 24. Select the plane object and attach the cylinder object to it.

You have just finished the low polygon version of the pine tree. The result should look similar to the right image of the following illustration.

25. Save your scene. You can open the file CH06-14.max to compare your results. This file shows the result of the next step as well.

6 - 2 8 B a c kg r o u n d a n d S i t e E l e m e n t s 26. Because all of the pine trees in the near range need to be different, create two additional copies of the high-poly pine tree model, leave the original model unchanged, and apply a Bend modifier with Angle = 15 to the first copy. Then apply the Bend modifier with Angle = 40 to the second copy. The result should be three slightly different high-poly pine trees, as shown in the following illustration. 27. Often in modeling, we use generic units and then adjust the scale of the final object to fit the scene. In the scene we will be using these pine trees in, we need them to be approximately 9 units tall. Scale them now.

28. Select all three high-poly tree objects, and the low poly pine tree. Right-click inside the active view and select VRay mesh export from the quad menu. Enable the Export each selected object in a separate file and Automatically create proxies options. Click OK to complete the command. This exports the objects into V-Ray meshes. 29. Name the trees as shown in the following illustration.

30. If you want to render areas of the scene where you need to show more variation in the shape of the low-poly pines, you can repeat the previous few steps to create three unique versions of the low-poly trees and export them as V-Ray meshes. Name the proxies with the prefix Pine-LP- and unique numbers at the end. In our case, this object will be far off in the distance, so we will continue working with only one variation of the low-poly pine. 31. Save your file. You can open the scene Ch06-15.max to compare your results.

Exercise 5: Populating the scene with trees


Now, lets use Particle Flow to populate the terrain with pine trees. The idea for this method is that it can scatter pine trees over the terrain, and we can control the distribution of the trees with a color map. Because we have three different high-poly models of a pine tree, we will be using three RGB ranges. First, lets create the terrain material. 1. Continue with the file you saved at the end of Exercise 2, or open the file Ch06-08.max. 2. In the Material Editor, select the Terrain material, which is currently applied to the Terrain object, and click the Standard button. Change the material type to Multi/Sub-Object, and choose Keep old material as sub-material. 3. Click the Set Number button and set the number of sub-materials to 3.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 2 9
Material 1 will hold the terrain material, Material 2 will control the distribution area of the high-poly pine trees, and also the placement of the three different types of trees within that area. Material 3 will control the distribution area of the low-poly trees. Now, lets create the three-colored texture that will be used to define the distribution area and placement of the high-poly pine trees. 4. Access Material #2, name it High-Poly, and place a Mix map into its Diffuse channel. In the Mix maps Color #1 slot, place a Noise map. Change the following parameters: Size=1.0, High=0.501, Low=0.5, Color #1 = RGB (255,0,0), Color #2 = RGB (0,255,0). As a result, you should see a contrasting red-green Noise map with distinct borders. Note that the High and Low values must not be the exact same value or the border between the two colors will be highly blurred. 5. Return to the base level of the Mix map and copy the Noise map for Color #1 to the Color #2 slot. For this map, set Color #1 to RGB (0,255,0) and Color #2 to RGB (0,0,255). The resulting map is a contrasting green-blue Noise map. 6. Return to the base level of the Mix map and copy the new Noise map into the Mix amount channel of the Mix map. For this newest Noise map, change the following parameters: Color #1 = RGB (0,0,0), Color #2 = RGB (255,255,255), Size = 0.3.

This is a black and white mask that will dictate how to blend the red-green and green-blue Noise maps. 7. Return to the base level of the Mix map. Right-click the sample slot and choose Render Map. Set the Dimensions to 2000 x 2000 and save the rendered map as Placement.jpg. Click Render.

Because the resulting green color dominates the texture, we will use this color to dictate the distribution of the straight pine trees. We will use two other colors to distribute the bent pine trees. We did this color separation to prevent the pine trees from intersecting each other when they populate the terrain. Now that we have created a map to control the placement of the three different high-poly pine trees, we need to use it in conjunction with a map that will control the area on the terrain where they will be placed. We will define this area with the help of the Gradient Ramp map.

6 - 3 0 B a c kg r o u n d a n d S i t e E l e m e n t s 8. Within the High-Poly material, set the Diffuse color to RGB (0,0,0) and change the map in the Diffuse channel from Mix to Mask. Choose Discard old map. 9. Assign the Placement.jpg bitmap that we just created to the Map channel. Change the following parameters: Tiling U=4, V=4, Map Channel = 2. 10. Go one level up to the Mask maps parameters and assign the Gradient Ramp map to the Mask channel. Set Map Channel = 2, and in the Angle section, set W = 90. 11. In the Gradient Ramps parameters rollout, set three flags with the following parameters: RGB (0,0,0) at Pos=0, RGB (0,0,0) at Pos=50, and RGB (240,240,240) at Pos=100.

This limits the distribution of the high-poly pine trees to the foreground of the terrain, as seen in the following illustration.

Now, with help from the Gradient Ramp map, lets define the area of the terrain where the lowpoly pine trees will be distributed. 12. Go to the base level of the Multi/Sub-Object material and go to Material 3, and name it Low-Poly. 13. Assign a Gradient Ramp map to the Diffuse slot. Set Map Channel = 2, and for the Angle parameter, set W = 90. 14. In the Gradient Ramp maps parameters, set two flags with the following parameters: RGB (96,96,96) at Pos=0, and RGB (15,15,15) at Pos=100. 15. Select the Terrain object and apply another UVW Map modifier to it. Set the Map Channel to 2.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 3 1
This map will distribute the low-poly pine trees towards the back of the terrain object, at a further distance than the high-poly pine trees. Refer to the following illustration.

Now lets set up Particle Flow to populate the terrain with the pine trees, using the maps we just created. 16. Open the Particle View (or press 6 on the keyboard). From the list of operators at the bottom of the window, select Empty Flow and drag it into the Particle View workspace. 17. Drag the Birth Texture operator to the Particle View workspace. 18. Now create a link between the established events, PF Source 001 and Event 001, by clicking and dragging the small blue dot at the bottom of the PF Source 001 event to the circle at the top of Event 001. Note that the events and operators that you add might be named with a 01 or 001 suffix. 19. In the PF Source 001 event, click on the word Render, and choose the Mesh Per Particle option in the right side of the dialog box. This will allow instanced geometry to be created for every particle you create. 21. Click Initialization Parameters, and in the Modify panel, select Separate and set this parameter to 3. 22. Set the following parameters as well: Timing: Start = -10, Stop = -1, turn on Latency and set it to 1. 23. Change Emission By to Sub-Mtl Global and set Sub-Mtl ID = 2.

20. Go to Event 001, select the Birth Texture operator, and set Emit Start to -10 and Emit Stop to -1.

6 - 3 2 B a c kg r o u n d a n d S i t e E l e m e n t s 24. In the RGB settings, turn off the R and B buttons and leave only button G turned on. This will generate particles only in the green range of the texture.

25. Click the Add button directly below the Emitter Objects field and add the Terrain object to the Emitter Objects. 26. Click Initialize Particle Emission at the top of the rollout. Now you can see how the emitters have positioned themselves over the terrain surface. 27. From the file Ch06-15.max, merge the Vray Proxy objects Pine-01, Pine-02, and Pine-03 and the object Pine-Low-Poly.

Next, we need to replace the emitters with these pine trees. Before we attempt something like this that puts a strain on system resources, lets save the file. 28. Save your file and continue with your own file, or open the file Ch06-16.max. 29. In order to replace the emitters with pine trees, go to the Particle View window and drag the Shape Instance operator from the list of operators to Event 001, between Birth Texture 001 and Display 001. 30. Select the Display operator and, in its properties, change its color to green (RGB 0,255,0). 31. Select the Shape Instance operator that you just added and click the None button in the Particle Geometry Object section of the dialog box. 32. Click on the high-poly pine tree (Pine-01) in the active view. Nothing should look different yet.

NOTE: Do not perform the next step if you do not believe your computer is powerful enough to display hundreds of instances of the high-poly tree. If in doubt, save your file prior to attempting the next step. If you try the next step and your system stalls or crashes, you can try several approaches. You can try to modify the tree using 1 iteration of the TurboSmooth modifier instead of 2, as discussed earlier in the chapter. You can also use the low-poly version of the tree and if all else fails, you can create a simple box the same size as the tree and let it serve as your instanced geometry for the purpose of finishing the exercise. 33. In order to make the pine trees visible, select the Display 001 operator within Event 001, and in the parameters section of the dialog box, change the Type from Ticks to Geometry. This operation could take a few moments. You can set this back to Ticks after you view the pine trees in the viewport, if the performance is adversely impacted. 34. Because the source object of the pine tree was a V-Ray Proxy, there is a chance that the pine tree textures wont display correctly, or might not display at all. If this happens, then you need to select the V-Ray Proxy object for the pine tree and re-apply the UVW Map modifier with the parameters we set previously. You may have to do this for each type of pine tree in the scene. Lets make all of the copies of the pine tree slightly different from each other. 35. Add Scale and Rotation operators to Event 001. 36. In the Scale operators parameters, set Type to Absolute and Scale Variation = 10% for all axes. 37. In the Rotation operators parameters, change Orientation Matrix to Random Horizontal and set Divergence = 10.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 3 3
In the following illustration, you can see what the chain of events should look like in the Particle View window.

38. Click the Event 01 header so that the event window turns white at the top, indicating that the entire event has been selected. 39. Within the Particle View dialog box, go to the Edit menu and select Copy. 40. Return to the Edit menu and select Paste. This creates another copy of the event. 41. Repeat the copy and paste step twice more to create a total of four events. 42. Link all three new copies to PF Source 01. Do this the same way you created the first link. The flow should look like the illustration below.

43. In Event 02, select the Birth Texture operator and click the Initialization Parameters button. 44. In the Emission By group of parameters, turn off G and turn on R. In this event, the pine trees will be generated using only the red channel of the texture.

45. Click Initialize Particle Emission. 46. Go to the Particle View window and select the Shape Instance operator in Event 02. In the Shape Instance properties, change the Particle Geometry Object to Pine-02. 47. Select the Display operator of the current event and change its color to red (RGB 255,0,0). This will make all of the pine trees generated by this event red and thus easy to distinguish from other sets of trees.

6 - 3 4 B a c kg r o u n d a n d S i t e E l e m e n t s 48. Select Event 03 and repeat the same steps, but this time turn on B instead of R to use the blue channel of the texture. In the Particle Geometry Object parameter of the Shape Instance operator, change the object to Pine-03, and in the Display operators parameters change the color to blue (RGB 0,0,255). If the Initialize Particle Emission button in the Birth Texture operators parameters is red, then you need to click this button so that the program can recalculate the particles placement. If you see multiple objects generated at the same point, then change the Uniqueness value in the Birth Texture operator and refresh particles by pressing the Initialize Particle Emission button. 49. Go to Event 04, select the Birth Texture operator, and click Initialization Parameters. 50. In the Timing group of parameters, set Latency = 2. In the Emission By group of parameters, set Sub-Mtl ID = 3 and click the Initialize Particle Emission button. 51. Go to the Particle View window and select the Shape Instance operator in Event 04. 52. Go to the Shape Instances parameters and change Particle Geometry Object to Pine-Low-Poly. 53. Select the Display operator and, in its properties, change its color to yellow (RGB 255,255,0). As a result, you should see something similar to the following illustration.

54. Save your file. You can open the scene Ch06-17.max to compare your results. We will now clone a few V-Ray Proxy pine trees and manually position them along the edges of the distant field. Then, we need to generate pine trees over the surface of the mountains but only in the lower grass-covered parts. Because we will be using only one type of pine tree for the mountains, well use Scatter to distribute these trees. But first we need to create a mask to limit the tree placement. 55. Continue from the previous step or open the file Ch06-17.max. 56. Make a copy of the mountain object, delete the VRayDisplacementMod and collapse its Modifier Stack.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 3 5
57. Apply the Vol. Select modifier to this object.

58. Set the Stack Selection Level to Face and Select By to Texture Map. Choose Rock Disp.jpg as the texture. 59. Drag this bitmap into an empty Material Editor slot as an Instance. In the bitmaps Output rollout, turn on Invert and set RGB Offset = -0.3. When you turned on the Invert option, this caused the selection to include only polygons that are not part of the mountains rock surfaces, as shown in the following illustration.

Now, lets populate the selected mountain polygons with trees. 60. Make a copy of the Pine-Low-Poly object. 61. Apply the Scatter Compound Object to the copy. Click Pick Distribution Object and click on the second Mountain object. In the Scatter Object rollout, set Duplicates = 20000 and Base Scale = 40%.

62. Turn off Perpendicular, turn on Use Selected Faces Only, and set Distribute Using to Area. 63. In the Display rollout, enable Hide Distribution Object. Lets add a little bit of variety to the trees. 64. In the Transforms rollout, change Rotation to X = 10, Y = 10, Z = 360. 65. In the Transforms rollouts Scaling group, turn on Use Maximum Range, and set the value to 10%. 66. If the trees appear to be sunken into the ground, raise them to the desired height. 67. Once you are satisfied with the result, delete the distribution object (the copy of the mountains with selected polygons).

68. Add a light and render the camera view. If you notice the difference in the colors of the highpoly and low-poly trees, then you will need to assign a Color Correction map over the current Diffuse map of the low-poly trees material. Choose Keep old map as sub-map and adjust the color correction parameters to match the colors between the two types of trees. The resulting render should look similar to the following illustration. 69. Save your file. You can open the scene Ch06-18.max to compare your results.

6 - 3 6 B a c kg r o u n d a n d S i t e E l e m e n t s

Exercise 6: Creating fields


Now, we need to adjust the look of the fields. We will create the grass in the fields using the V-Ray Fur tool. First, we need to prepare the materials. Lets begin with the green and yellow fields. Each has a road going across it. In order to make the roads on the model match the roads on the reference image, we will use Viewport Canvas. While Viewport Canvas was originally introduced in the previous version of 3ds Max Design (2010), it has been significantly enhanced and improved to the point that it is, in effect, an entirely new feature in Autodesk 3ds Max Design 2011. Most of the instructions should translate fairly easily to 2011; however, please refer to the 3ds Max help files if you have any difficulties. 1. Continue from the previous exercise or open the file Ch06-18.max. Hide everything except for the 3 field objects. 2. Select the model of the green field and apply the UVW Map modifier to it. All default settings remain unchanged. Convert this field into an Editable Poly object. 3. Choose Tools menu Viewport Canvas to access the Viewport Canvas module. 4. In the Viewport Canvas window, click the Setup button. In the Object Setup window, change the color to green (RGB = 72,241,72). 5. In the Assign Texture group of parameters, set the size of the texture to 1024 x 1024. 6. In the Save new texture to: parameter, set the path to the texture file, and set the texture name to Green Field.tif. 7. Click the Setup button again. The field will turn green. 8. Press Alt+X on the keyboard to make the object see-through, allowing you to see the road in the reference image. 9. In the Viewport Canvas window, choose the filled brush type for painting the road. Adjust the size of the brush appropriately. Click the Brush button and paint over the area where the road appears on the reference image. Toggle Alt+X on and off to see what youve painted. 10. Click the Brush button to deactivate the brush tool and close the Viewport Canvas window. 11. Repeat the same procedure for the yellow field (making the color yellow instead of green this time), and save the texture as Yellow Field.tif. 12. Open both files in Photoshop and use them as a reference to create sharper black and white masks for the roads. Keep in mind that the vegetation on the fields will partially cover the road, which means you can make the masks for the roads slightly wider than the roads in the reference image. 13. Save these masks as Green Field.jpg and Yellow Field.jpg.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 3 7
14. In order to make V-Ray Fur on these fields, they must have no intersecting polygons. Remove intersecting polygons in the same way you did for the mountains, by using ProBoolean to join them together and then deleting unnecessary polygons inside the objects. You can also manually adjust the geometry using the Cut tool under Editable Poly.

We have three fields in the scene, each having a different level of texturing complexity. The red field, the one farthest from the camera, is the easiest, so we will start with that one. 15. Select an empty material slot in Material Editor and change the material type to VrayMtl. Name the material Field_01. Assign this material to the object Field01. 16. In the materials Diffuse channel, place the bitmap Green_Grass.jpg. 17. Apply the UVW Map modifier to the red field, using the following parameters: Mapping = Planar, Length = 10, Width = 10. 18. Assign the VRayDisplacementMod modifier to the Field01 object. 19. In the VRayDisplacementMod modifiers parameters, set the following parameters: Type = 3D mapping, Amount = 2.0, Edge Length = 0.5 pixels.

20. Assign a Noise map to the Texmap slot. Drag this map into any free Material Editor slot to make a copy of it, and choose Instance as the copy method. 21. In the Noise maps parameters set Noise Type = Fractal and Size = 0.1. 22. Save your work. You can open the file Ch06-19.max to compare. In the following illustration, you can see how the farthest field will look once rendered.

6 - 3 8 B a c kg r o u n d a n d S i t e E l e m e n t s The next field we will work on is the Field02. 23. In Material Editor, make a copy of the material you assigned to the red field. Rename the material Field_02 and apply it to the green field, Field02. If you used Proboolean to delete the intersecting polygons, you may have to detach Field02 and Field03 back into separate objects. Make sure you name them correctly. 24. Place a Composite map into the Diffuse channel, and choose the Keep old map as sub-map option.

25. Click the Add a New Layer button to add another layer to this map and place Yellow_Grass.jpg into the Layer 2 texture slot. 26. Place Green Field.jpg into the Layer 2 mask slot and enable Show Standard Map in Viewport.. 27. In the Green Field.jpg parameters, turn on the Invert option in the Output rollout. 28. Add a UWV Map with the mapping type set to Planar. You can see how the road goes across the green field in the viewport. Now lets generate vegetation with V-Ray Fur. 29. Select the object Field02, select VRay from the drop-down list within the Create Geometry panel, and apply V-Ray Fur. 30. Assign the same material to the V-Ray Fur as you assigned to Field02. 31. In the V-Ray Fur object, change the following parameters: Length = 1.0, Thickness = 0.03, Bend = 0.28, Direction var. = 0.5, Distribution: Per area = 40.0. 32. Place Green Field.jpg into the Density map (mono) slot. 33. Save your work. You can open Ch06-20.max to compare your results.

In the following illustration, you can see how Field_02 will look in the camera view once rendered.

Now lets create the material for Field03. The method for this material is the same as the one used for Field02. The only difference is that there are parallel paths cutting across this field. 34. Select an empty slot in the material editor and change the material type to a VrayMtl. Name the material Field_03. Assign this material to the yellow field object, Field03. Add a UVW map with Planar mapping.

35. Place Yellow_Grass.jpg into the Diffuse channel. Assign a Composite Map to the Diffuse channel, choosing Keep old map as sub-map. 36. Click Add a New Layer and change the new layers blending mode to Soft Light. Set Opacity = 30. Place the Gradient Ramp map into the texture slot and set the following parameters: Tiling U = 8 and Angle W = -5.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 3 9
37. In the Gradient Ramp maps parameters, set 5 flags: RGB (255,255,255) at Pos=0, RGB (252,252,252) at Pos=40, RGB (100,100,100) at Pos=50, RGB (254,254,254) at Pos=60, RGB (255,255,255) at Pos=100.

38. Go back to the Composite map level and click Add a New Layer. Change the new layers blending mode to Color Dodge. Place a Gradient Ramp map into the texture slot of the new layer. 39. For the Gradient Ramp maps parameters, set 5 flags: RGB (100,100,100) at Pos=0, RGB (100,100,100) at Pos=5, RGB (0,0,0) at Pos=50, RGB (100,100,100) at Pos=96, RGB (100,100,100) at Pos=100.

6 - 4 0 B a c kg r o u n d a n d S i t e E l e m e n t s 40. Go back to the Composite maps parameters level, click the Add a New Layer button to add another layer to the composite map, and copy Yellow_Grass.jpg from the first layers texture slot into the new layers texture slot. 41. Place Yellow Field.jpg into the new layers mask slot. In the Yellow Field.jpg maps parameters, turn on Invert in the Output rollout. 42. Select the yellow field object and apply V-Ray Fur to it.

If you did not close 3ds Max since you set up the V-Ray Fur parameters for the green field, then the new V-Ray Fur object will remember the last set of parameters. However, if you closed 3ds Max, then the new V-Ray Fur object will have default parameters that you will need to change. 43. Set Length = 1.5 and Bend = 0.15. 44. Place the Yellow Field.jpg into the Density map (mono) channel.

45. Place a Gradient Ramp map into the Length map (mono) slot. 46. Drag the Gradient Ramp map from the V-Ray Fur parameters slot into any free Material Editor slot, using Instance as the copy method. 47. Set Tiling U = 8 and Angle W = -5. 48. In the Gradient Ramp maps parameters, set 5 flags as follows: RGB (255,255,255) at Pos=0, RGB (252,252,252) at Pos=29, RGB (100,100,100) at Pos=50, RGB (254,254,254) at Pos=71, RGB (255,255,255) at Pos=100. 49. Select Field03s material in the Material Editor and copy it into any unused slot. Rename it and apply it to the yellow fields V-Ray Fur object. 50. Go to the Diffuse slot of this material and then go to the Texture slot of Layer 2. 51. Change the flags to RGB (255,255,255) at Pos=0, RGB (252,252,252) at Pos=47, RGB (100,100,100) at Pos=50, RGB (254,254,254) at Pos=53, RGB (255,255,255) at Pos=100. Change Tiling U to 8.

52. Change the Opacity of Layer 3 of the Composite map to 75%. 53. Go to the Texture slot of Layer 3 and change the flags to the following: RGB (100,100,100) at Pos=0, RGB (100,100,100) at Pos=33, RGB (0,0,0) at Pos=50, RGB (100,100,100) at Pos=65, RGB (100,100,100) at Pos=100. Change Tiling U to 8. 54. Save your work. You can compare your results to Ch06-21.max. In the following illustration, you can see how the yellow field will look once rendered.

55. Render the entire background scene and save it as Background_Geometry.png with an alpha channel. Your result should look similar to the following illustration.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 4 1
56. Save your file. You can open the scene Ch06-22.max to compare your results.

Exercise 7: Creating the mountains and sky


The next step in the creation of the background is the creation of mountains and sky with Vue 8 xStream. You can download a trial version of this product at http://www.e-onsoftware.com/ products/?page=try. We need to start with the proper placement of all of the scene elements and setup of all the scene parameters. 1. Continue with the previous exercise or open the file ch06-22.max. 2. Load Vue 8.5 xstream PLE. Select the Sun light, and position it in relation to the camera to match the reference image in the camera view. When you select the Sun light and move it in the camera view, it will automatically orient itself to the camera. 3. In the list of scene objects, select Main camera, right-click, and on the pop-up menu choose Edit Object. 4. Set the Horizontal Fov to 23.9, which is the same parameter used for the camera in the final 3ds Max scene. This will match the camera perspectives precisely. Click OK. 5. Go to Render Options (Ctrl+F9), and in the Render destination rollout, choose Render to screen. 6. In the Picture size group, select Aspect ratio = Free (user defined) and set the image size next to the Other parameter. 7. In the bottom/right corner of the Render Options window, click OK. Now lets model some more mountains. 8. On the Object Menu choose Create Heightfield Terrain Standard Heightfield Terrain (Shift+T).

A new Terrain object will appear in the scene. This default object needs to be edited for our scene. 9. Double click the Terrain object to bring up the Terrain Editor window. 10. In the Terrain Editor window, keep clicking the Mountain button until you see geometry that looks good enough for your project.

We need to add a few mountaintops at approximately the same height so the mountains created with Vue 8 xStream will be visible between the mountains created in 3ds Max.

6 - 4 2 B a c kg r o u n d a n d S i t e E l e m e n t s 11. In the Terrain Editor window, turn off Invert in the Paint rollout, if it is on. Then paint a few mountain tops over the terrain surface. For more accurate editing, you can adjust the Size, Strength and Falloff parameters in the Brush tip group. 12. When the result looks good enough, click OK at the right side of the Terrain Editor window. 13. Adjust the position of the mountains in the camera view to get your desired look.

Now, we need to texture the mountains. You can continue with Mountains-01.vue, if you like. 14. Select the mountains. To the right of the workspace, select the Aspect tab (the first tab on the left) and double-click the Terrain material sample sphere. 15. In the Advanced Material Editor window, select the Mixed material in the Type group. 16. Double-click Material 1 in the Materials to mix tab. 17. In the new Advanced Material Editor window, change the Name to Grass. 18. In the tree view below the Type group, click Grass. In the Color production group under the Color & Alpha tab at the lower left, change the Coloring mode to Mapped picture and then back to Procedural colors, then double-click the color swatch (not the sphere). In the Please select a color map window, choose Solid Colors from the Collections menu. 19. In the color slots, choose black (C:\...\Solid Colors\01_Black.clr) and on the right side of the screen click OK. Click OK again to close the Advanced Material Editor: Grass window. 21. Using the same technique, assign white (C:\...\Solid Colors\03_White.clr) to it and change the name to Stone. 22. In the main Advanced Material Editor window, select the Influence of environment tab and turn on Distribution of materials dependent on local slope, altitude and orientation.

20. In the main Advanced Material Editor window, double-click Material 2 in the Materials to mix tab.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 4 3
After executing this command, you will see a sharp transition between black and white areas in the material. This will help you distinguish between the rocky and grassy parts of the mountains. 23. Adjust the smoothness of the transition from black to white using the Influence of altitude and the Influence of slope parameters. You can also slightly adjust the Influence of orientation parameter.

24. Adjust the Mixing properties (below the material) so that only the mountain tops are white.

6 - 4 4 B a c kg r o u n d a n d S i t e E l e m e n t s Now, to create the differing areas of grass and rock, you need to replace the black material with grass and white material with rock. 25. In the Materials to mix tab, double-click the Material 1 sphere. 26. In the new Advanced Material Editor: Grass windows Color production group, double-click to access the materials settings. In the Please select function window, go to the Collections menu and choose Color Productions. 27. In the updated slots, select Grass Fractal (C:\...\Color Productions\14_Grass.fnc) and click OK on the right side of the screen.

28. Go to the Bumps tab and in the Bump production group, double-click to access the material settings. In the Please select a function window, choose Bumps from Collections menu. 29. In the updated slots, select Desert Bump (C:\...\Functions\Bumps\ Desert Bump.fnc) and click OK on the right side of the window. 30. In the Bump production group, right-click the sphere and choose Edit Function. In the Function Editor window, double-click Basic Repeater and adjust your settings as shown in the following illustration.

31. Select Combiner and change Amplitude to 0.55. Close the Function Editor windows by clicking OK. 32. In the Advanced Material Editor: Default window, go to the Effects group and change Mapping to World-Standard. 33. In the Advanced Material Editor: Grass window, set Scale = 0.05. 34. Go to the Stone materials settings. Select the Color & Alpha tab and then in the Color Production group, double-click to access the materials settings. In the Please select a function window, select Color Production from the Collections menu.

35. In the updated slots, select Brown-White Fractal (C:\...\13_ Brown-White Fractal.fnc) and click OK on the right side of the screen. 36. While still in the Advanced Material Editor: Stone window, go to the Bumps tab. In the Bumps Production group, double-click to access the materials settings.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 4 5
37. In the Please select a function window, select Fractals from the Collections menu.

38. In the updated slots, select Stones in Dirt (C:\...\Fractals\Stones in Dirt.fnc) and click OK on the right side of the screen. 39. In the Advanced Material Editor: Stone windows Effects group, make sure Mapping is set to WorldStandard and click OK to close the window. 40. In the Advanced Material Editor: Default window for the stone material, set Scale = 0.2. 41. Close the Advanced Material Editor: Default window by clicking OK. 42. Switch to the camera view, switch the Preset Render Quality to Final, and render your scene to see the result.

As you can see in the rendering, there are some problems with the geometry. We can fix this by increasing the density of the geometry and smoothing it out. 43. Open the Terrain Editor and click the Double Terrain Resolution button twice. 44. On the right side, go to the Effects tab and execute the Diffusive command a few times.

45. Render the camera view. If your work looks very different from the following illustration you can load the file Mountains-02.vue to continue. As a result of these changes, our mountain terrain will look smoother and more detailed in the rendering.

6 - 4 6 B a c kg r o u n d a n d S i t e E l e m e n t s

The mountain terrain is finished. Now it is time to set up the atmosphere. 46. Open the Atmosphere Editor (F4) and go to the Light tab. Turn on Global illumination in the Lighting Model group. 47. Go to the Clouds tab and click the Add button in the Cloud Layers group. Under Collections, choose Clouds and then choose Spectral from the Collection menu.

48. In the updated slots, select Large Cumulus (C:\...\Clouds\Spectral\Large Cumulus.mat) and click OK on the right side of the screen. Use the settings from the following illustration.

B a c kg r o u n d a n d S i t e E l e m e n t s 6 - 4 7
49. Go to the Sky, Fog and Haze tab and change the Sky Color to RGB (60,131,229). 50. Change the other parameters according to the following illustration.

51. Render at 2000 x 1108 px (or whatever size you decide to make your final image rendered out of 3ds Max), and save the result as Mountain_Sky.jpg. You can load Mountains-03.vue to compare your file. Now, lets assemble the entire background.

52. Open Background_Geometry.png and Mountain_Sky.jpg in Photoshop. 53. Copy Mountain_Sky.jpg into Background_Geometry.png. It will automatically turn into a new layer, make sure it is placed at the bottom of the layers list. 54. Reposition the new layer so that the mountaintops are slightly visible behind the other layers mountains. 55. Save the resulting image as Background.jpg. The result should look similar to the following illustration.

6 - 4 8 B a c kg r o u n d a n d S i t e E l e m e n t s

56. Save your file. You can open the scene Ch06-final.psd to compare your results.

Summary
The ability to create realistic and believable background and site elements is one of the most critical skills you can acquire as a 3D artist. It requires a keen artistic eye and a delicate balance between detail and efficiency. When you consider that these elements often comprise a majority of the pixels that make up an image, its easy to see why their appearance is so vital. This chapter involved some meticulous and challenging exercises, but hopefully you were able to follow along and learn the techniques that they illustrated.

ChApter 7

Animation

I n thIs chapter , we wIll go over several types of anImatIon using different parts of the scene. With each new exercise, we will discuss some great ways to animate creek water, grass and leaves, birds, smoke, and cameras. This chapter doesnt take you through the steps of rendering out the animations, but rather just their setup and how to animate the various object types.

Water Surface Animation


In the first part of the chapter, we will examine how to animate the creeks surface. Modifiers will be animated and the materials Bump map will be animated as well. Some parameters of the Ripple and Wave modifiers will be changed to make them work with animation as opposed to still images. These parameters will be adapted for each camera individually in order to make the animated water look correct from any camera. Animation of the waterfall was covered in chapter 5, so we wont be explaining it in this chapter.

Exercise 1: Creek animation


1. Open the file Ch07-01.max. This scene already has all the objects needed to animate the water: Wheel, Water Level, VRayProxy_Waterfall_Top, Ripple Boat, Ripple Boat01, and Ripple Boat02. For this exercise we set the camera so that it views the entire water surface. The length of animation for any camera will not be more than 600 frames; however, for convenience and simplicity, we will set our Active Time Sequence to 1000 frames and make all the animation work for this range. 2. Open the Time Configuration dialog box and, if necessary, set the End Time to 1000. Click OK.

7-2 Animation 3. Select the Water Level object, temporarily disable the TurboSmooth modifier if you want to make the updates faster, and select the Wave modifier. Set its parameters as shown in the following illustration.

Remember that besides simulating the waves rippling because of the falling water, we also added dynamics to the overall water surface with the Wave modifier. To animate this modifier, we need to use the Phase parameter. 4. Move the Time Slider to frame 1000. Click Auto Key to turn on animation recording. 5. In the Wave modifiers parameters, set Phase to -10. Turn off Auto Key. Two keys will be created automatically and show up on the Trackbar, one at frame 0 and one at frame 1000. In this case, the speed of the Phase parameters change determines the waves speed. 6. To check the animation click the Play Animation icon at the bottom-right of the screen. To stop the animation click Stop Animation. Now, if you move the Time Slider along the Trackbar, you can see the waves move along the Water Level object. This motion will be slow at the beginning of the animation and will increase in speed as you move the time slider farther away from frame 0. As you move the Time Slider closer to the second key at frame 1000 the waves speed will decrease. This effect is based on the default animation settings built into any key that gets created, in this case the key created for the Phase parameter. We want to even out the speed so that its constant all the way through the animation, so we need to edit the objects animation curve. 7. With the Water Level object selected, right-click in the active viewport and select Track ViewCurve Editor from the quad menu.

Animation 7-3
8. In the hierarchy panel on the left of the window, locate the Water Level object. For this object, click the plus sign (+) next to the Modified Object listing to expand the list and show all modifiers applied to the object.

9. Expand the Wave modifier listing and select the Phase parameter from that list. The animation curve for this parameter appears, as shown in the following illustration. Here, you can see the Phase value displayed on the left hand side of the animation curve and the time frame along the bottom. As with any key created, the speed of the animation starts from the resting point and accelerates as it eases out of the first frame and decelerates as it eases into the last frame. To make the speed of the animation constant, we need to make this line perfectly straight.

10. Select both keys on the curve and click the Set Tangents to Linear icon on the Curve Editor Toolbar.

7-4 Animation

The curve will turn into a straight line. If you play the animation, you will see that the waves speed is now constant throughout the animation. Next, we will animate the Ripple Waterfall modifier. 11. Select the Water Level object and in the objects Modifier Stack, select the Ripple Waterfall modifier and set its parameters as shown in the following illustration.

This modifier simulates waves spread over most of the creek surface. The area affected by the Ripple Waterfall modifier is controlled by the Vol. Select modifier just below it on the Modifier Stack. 12. To animate the waves, move the Time Slider to frame 1000, and turn on Auto Key. 13. Set Phase to -50 and turn off Auto Key. If you play the animation, you will see that the waves are now animated. 14. Using the same process you used earlier in the Curve Editor, make the waves speed constant by turning the Phase settings curve within the Ripple Waterfall modifier into a straight line. The remaining steps follow a similar pattern. 15. For the modifiers Ripple Dock1 and Ripple Dock2, make sure their parameters are the same as the following illustration. These modifiers simulate the small waves caused by water colliding with the piers posts.

Animation 7-5
Earlier, we used the TurboSmooth modifier to increase the number of polygons for the Water Level object. However, we only significantly increased the Render Iters parameter, which only affects the rendering, not the viewports. If you want to see the effect in the viewports, you will need to increase the Iterations parameter to a higher value. 16. Turn on Auto Key. At frame 1000 set the Phase parameter for the Ripple Dock1 modifier to -24, and for the Ripple Dock2 modifier set it to -25. Turn off Auto Key. Small differences in the parameters will add variety to the waves speed. Now, for both modifiers we need to change the animation curve. 17. In the Curve Editor, open the Modified Object list for the Water Level object and select the Ripple Dock1 modifier. A single curve will appear, which is responsible for the animation of the Phase parameter of the Ripple Dock1 modifier.

18. Open the list for the Ripple Dock2 modifier. Another curve will show up. This is the curve controlling the animation of the Phase parameter of the Ripple Dock2 modifier.

7-6 Animation Now, we see animation keys for both modifiers. 19. Select all 4 keys and click Set the Tangents to Linear button on the Toolbar. In this way, you have changed the curve for both modifiers at once, rather than for each separately. 20. Select the Water Level object. In the Modifier Stack, select the Wave Under Wheel modifier and set its parameters as shown in the following illustration.

This modifier is responsible for simulation of the water under the water wheel. The area of influence of this modifier is limited by Vol. Sel for the Wave modifier. The wheel will be rotating and the motion of the waves should be synchronized with the wheel hitting the water. For this animation, instead of animating the Phase parameter it will be easier to animate the position of the Wave Under Wheel modi-fiers Gizmo. 21. In the Modifier Stack, open the Wave Under Wheel modifier and select its Gizmo. 22. To animate the Gizmo, position the Time Slider at frame 1000 and turn on Auto Key. Now as we move the Gizmo, the waves will move as well. 23. Right-click the Select and Move button on the Main Toolbar to open the Move Transform Type-In dialog. Reposition the Gizmo using the coordinates shown in the following illustration.

24. Turn off Auto Key. As you can see by playing the animation, animating the gizmo like this animates the waves made by the Wave Under Wheel modifier. 25. Using the Curve Editor, make the curve linear for the animation keys of the Wave Under Wheel modifiers Gizmo.

Animation 7-7

26. Select the Ripple1 modifier and set its parameters as shown in the following illustration.

27. Move the Time Slider to frame 1000 and turn on Auto Key. 28. Change the Phase parameter for the Ripple1 modifier to -30 and turn off Auto Key . 29. Using the Curve Editor, make the Phase curve linear for this modifier. 30. Select the Ripple Front modifier and set its parameters as shown in the following illustration.

31. Move the Time Slider to frame 1000 and turn on Auto Key. 32. Change the Phase parameter of the Ripple Front modifier to -50 and turn off Auto Key. 33. Using the Curve Editor, make the Phase curve linear for this modifier. 34. Select the Ripple Left modifier and set its parameters as shown in the following illustration.

7-8 Animation

35. Move Time Slider to frame 1000 and turn on Auto Key. 36. Change the Phase parameter of the Ripple Left modifier to -37 and turn off Auto Key. 37. Using the Curve Editor, make the Phase curve linear for this modifier. The animation of the modifiers is complete. Now, we need to animate the Ripple Space Warp object. This tool is used to animate a few objects at once and simulate waves moving away from the boat. 38. Use parameters from the following illustration for the following objects: Ripple Boat, Ripple Boat01, Ripple Boat02.

39. Move the Time Slider to frame 1000 and turn on Auto Key. 40. Change the Phase parameter of all three objects to -25, and turn off Auto Key . In order to add variety to the waves, we can use slightly different values for the Phase parameters of each Ripple Space Warp object. However, we need to make sure that the waves speed is the same for each of these objects. We can do this by making sure the difference in Phase values is the same between frames 0 and 1000 for each object. For example, if the Phase is 0 at frame 0 and 27 at frame 1000 for one object, and on another object you set the Phase to 2 at frame 0, then the Phase value for that object on frame 1000 should be 29 to maintain a difference of 27 between the start and end values. 41. Using the Curve Editor, make the Phase curve linear for each of the three space warps, Ripple Boat, Ripple Boat01 and Ripple Boat02. Next, lets animate the Noise and Bump maps. 42. Open the Material Editor and click the map in the Bump channel for the Water material.

Animation 7-9

The map called Map Mix Ripple is used for the Bump slot now. This Mix map consists of two types of Noise maps: Max Ripple and Mini Ripple. We created these maps in Chapter 5, and now we only need to animate them. 43. Move the Time Slider to frame 1000 and turn on Auto Key. 44. In the Material Editor, go to the Max Ripple map and set the Phase parameter to 85. 45. Go to Mini Ripple map and set its Phase parameter value to 85 as well. 46. Turn off Auto Key. Changing the Phase parameter is what animates the Noise map. We figured out an appropriate value for the Phase parameter with a few tests. If your scene is slightly different, you might need to experiment to find the right values to use. 47. Using the Curve Editor, make the Phase curve linear for the Max Ripple and Mini Ripple maps. 48. With the Water Level object selected, open the Curve Editor. In the animation controllers list, select and expand the Water Level list, and then expand the Water material list.

7-10 Animation 49. In the Water materials controllers list, expand the Bump map list.

50. In the Bump map list, expand the Color 1: Max Ripple and Color 2: Mini Ripple controllers, highlight the Phase listing, and change the curve to a straight line. 51. If you disabled the TurboSmooth modifier earlier, re-enable it and save your work. You can refer to Ch07-02.max to compare your results.

The Water Level object is now animated and ready for rendering. For other cameras in the scene, you might need to use different Amplitude and Bump values to make the water look right, but the waves speed should remain the same for every camera.

Grass Animation
This section describes the process of creating and animating the grass and the tree leaves created in a previous chapter. All of the grass will be made with the Hair and Fur modifier. This modifier was covered in an earlier chapter, so in this exercise we will focus on scene management with regard to hair, such as how to optimize a scene with large quantities of hair (grass). Using the Hair and Fur tool to create and animate a large number of objects consumes a lot of resources and greatly increases the chances of running out of memory and crashing 3ds Max. To prevent this, we will divide the grass scene elements into layers based on distance from the camera (close, medium, and far range) and then put the renderings together later with a video compositing program.

Animation 7-11
For the animation itself, it will be more efficient to further divide the grass into zones based on type and density of the grass, then animate each zone independently in separate scenes. You can animate grass (hair) in 3ds Max in a few different ways. Here, we will calculate real dynamics using Wind and other Space Warp tools, and also animate the bending grass with Frizz Parameters from the Hair and Fur modifier. The grass animation in this chapter has been done 3ds Max 2011. If you can do it with 3ds Max 2011, you should do so. But if necessary, it can be done using 3ds Max 2010.

Exercise 2: Grass creation


1. Open the file Ch07-03.max. In this scene you can see the landscape, camera, and lights. 2. In the reference image, determine how many types of grass are present and how these types are distributed over the landscape. In the following illustration, different types of grass are highlighted with various bright colors.

3. Using the previous image as a reference, use the Paint Selection Region tool to select individual groups of polygons on the Ground object that pertain to each kind of grass, and use Detach As Clone to separate each set of polygons to a separate object. As you detach each polygon grouping, assign a descriptive name to the detached object. For example, the grass closest to the camera could be called Grass_front. By labeling them all with the prefix Grass_, they will be easy to find in your scene objects list. 4. For vegetation growing in the water, such as the cane and grass around the tree on the far right side of the reference image, create a few base objects for the grass using any modeling method you want. Make sure that the pivot point of each base object is set at the bottom of the object. 5. Delete the Ground object. 6. Select all of the grass base objects, open the Object Properties window and turn off the Renderable option. In the following illustration, you can see the camera view of the scene at this stage.

7-12 Animation

7. Save your scene. At this point, you can use the support file Ch07-04.max if you want. This scene contains not only the grass base objects but also several types of individual grass objects that you can use as instances with the Hair and Fur modifier. If you dont use this scene, create a few grass blade objects with any polygon modeling method. Be sure to keep the polygon count low on the grass blades. 8. Apply the Hair and Fur modifier to each grass base object. Each object will need its own unique modifier, so you should either apply the modifier individually to each object, or apply it as an instanced modifier and click the Make Unique button on the Modifier Stack before you work with each object in later steps. 9. For each Hair and Fur modifier, set all the values in the Frizz Parameters, Kink Parameters and Multi Strand Parameters rollouts to 0. This will prevent these parameters from affecting the grasss shape. 10. In the Styling group, click Style Hair and use the various styling tools, especially the Scale tool to adjust the length and curvature of the hair guides to roughly match the reference image. If at any stage you want to reset the guides and start again, you can click Regrow Hair in the Tools rollout. If you want to style the hair further once the instances have been added, go into the Guides sub-object mode of the Hair and Fur Modifier and use the Styling tools. You will see the instanced geometry modified accordingly. 11. When the guides look satisfactory, click the None button in the Instance Node group in the Tools rollout, and click on any grass blade object to instance it across that grass base surface. The objects wont appear over the surfaces until a later step. The following illustration shows which types of grass blades are to be instanced over which grass base objects if you are using the support file provided. On the Reed Center and Rose Leaf Center01 objects, we created two types of grass by adding two Hair and Fur modifiers to each with different parameters.

Animation 7-13

12. For each Hair and Fur modifier, many of the values in the General Parameters rollout can be the same for all base objects: Hair Segments = 5, Hair Passes = 1, Density = 100, Scale = 100, Cut Length = 100, Tip Thick = 0, Displacement = 0. In the following illustration, you can see the values in the General Parameters rollout that need to be set differently for each base object.

7-14 Animation 13. For each Hair and Fur modifier, turn off Display Guides in the Display rollout to hide the guides, and turn on Display Hairs to display the grass geometry in the viewports. 14. Turn on the Override option. This will assign a unique color to each grass area for easier identification later on. 15. The Percentage and Max. Hairs parameters control the number of hairs displayed in the viewport. Lowering these values will help free up system resources and speed up the programs response. Set Max. Hairs to the same value you used for the Hair Count parameter, and set Percentage to 20. Repeat this for each Hair and Fur modifier in the scene. 16. Turn off the As Geometry checkbox next to the Override parameter. This will disable the display of hairs as objects and free up system resources, and will also show the hair color that you assigned. At this point, the camera view should look similar to the following illustration.

17. Save the scene. You can compare your result with the support file Ch07-05.max.

Exercise 3: Grass animation


Now lets animate the grass. The animation will be done with real hair dynamics calculations using the Wind Space Warp. 1. Continue from your own scene or load the file Ch07-05.max. 2. Open the Time Configuration dialog box, set Start Time = -100, End Time = 500, and click OK. The animation is now 600 frames long, but the first 100 frames (-100 to 0) will be used exclusively to stabilize the grass dynamics. Frames 0 to 500 will hold the actual animation to be rendered.

Animation 7-15
3. Add a Wind Space Warp to the scene using Create panel Space Warps Forces Wind. 4. On the Modify panel, set the Wind objects Icon Size to 200. 5. Use Select and Rotate to rotate the Wind object so it points to the right and slightly up when viewed in a Front viewport. Refer to the following illustration.

6. In the Wind group, set the following parameters: Turbulence = 0.5, Frequency = 0.0, Scale = 1000. 7. In the Force group set Decay to 0. Wed like the wind strength to change over time for a more realistic effect. To do this, we can create a varying motion curve for the Strength parameter. 8. Right-click the numeric entry field next to the Strength parameter and choose Show in Track View. This opens the Selected window, which is essentially the same as the Track View - Curve Editor window that you used earlier in this chapter. 9. Using the Add Keys and Move Keys tools, add and position points on the curve approximately as shown in the following illustration. Leave the first and last keys at 0, and put all the other points in the range between -1 and 1. When the curve goes to values below 0, the wind will blow in the opposite direction.

If later you decide to increase or decrease the overall wind strength, you can simply select all points on the Strength curve and use the Scale Values tool.

7-16 Animation If you decide to change the frequency of the strength change (meaning the curve will take up less than the full 500 frames), click the Parameter Curve Out-of-Range Types button on toolbar and turn on the Loop option with both the left and right arrows selected (see the following illustration). This will repeat the curve infinitely in both directions. In the Curve Editor window, a repeated curve is displayed as dashed line.

Now that the wind is set up, lets set the parameters on the Dynamics rollout for each Hair and Fur modifier. Well make the values for these parameters the same for all grass base objects. 10. In the Modify panel for the Hair and Fur modifier, in the Dynamics rollout under the External Forces group, click Add and select the Wind object. 11. In the Collisions group select the Polygon option and turn on Use Growth Object. This will prevent individual grass leaves from intersecting the base object. 12. In the Dynamics Parameters group, set Gravity to 0.0 to disable gravitation. Otherwise, the grass will wilt during the simulation. 13. Set Stiffness to 0.4 to limit the bending of the grass when it is affected by the wind, and set Root Hold to 1.0 to keep the base of each grass blade stiff despite the wind. Set Dampen to 0.0 so the grass can freely wave under the wind. 14. Before recording the grass animation you can view it in real time. In the Mode group of the Dynamics rollout, choose the Live option to activate the dynamics calculation in the viewports, and click Play Animation. 15. The playback will very likely be too slow to be useful due to the large amount of memory needed for live simulation. To make it possible to see each grass simulation in real time, save a separate scene for each area of grass and include the Wind Space Warp with each scene. 16. Open one of the scenes and watch the simulation in real time. Make any necessary adjustments, such as increasing the wind strength with the motion curve as described earlier.

Animation 7-17
17. When the animation looks right, you can record the dynamics animation. This will allow you to load the precomputed animation later on for faster playback and rendering. In the Hair and Fur modifier, in the Dynamics rollout under the Mode group, choose the Precomputed option. Then in the Stat Files group, click the button to the right of the path directory to choose a location for the files generated during the calculation. 18. In the Simulation group, set the values for the start and end frames: Start = -100 and End = 500. Click Run to perform the simulation. 19. Save your scene after the dynamics calculation. 20. Open each of your grass scenes and perform the same operation on them. 21. When you have finished making simulations for all the grass base objects and have saved the simulations, open the original scene that contains all the grass areas. Use Merge to merge in the grass base objects from the separate files. Make sure you delete the older version of each grass base object as you merge in each animated one. 22. Save the scene. As mentioned earlier, working with such a large amount of animated grass in a scene can be a strain on your system resources. We put all these animated objects together so we can break them apart again, this time into layers set by distance from the camera (rather than breaking them into separate scenes by grass type, as we did earlier). All those layers will be animated separately later. 23. Put each grass base object on one of three layers: Grass_Anim_Far, Grass_Anim_Middle or Grass_Anim_Near. In the left image of the following illustration, you can see the layer structure in the Layer window, and in the right image you can see the objects in those layers as viewed from the camera view. There are also two other layers in the scene: 0 (default) and Grass_ Instances. The first holds all the lights and cameras, and the second holds the instanced objects for the Hair and Fur modifier.

7-18 Animation 24. Save the scene. You can also open Ch07-06.max from the support files and compare the grass animation if you like. Now, you will animate the leaves on the tree with the existing wind setup. 25. Open Ch07-07.max, which has the Hair and Fur modifier already set up for the leaves. For the Hair and Fur modifiers assigned to trees, the parameters in the Frizz Parameters rollout have values other than zero. These parameters were used to style the guides for the leaves, rather than using the manual styling tools as we did for the grass. 26. For the Hair and Fur modifiers on the trees, in the Dynamics Parameters group in the Dynamics rollout, set Gravity to 0.01 to make leaves respond to gravity and droop a bit when the wind dies down. All other parameters from this group should be set to 0. 27. Perform the simulation again. 28. Save the scene. You can also open Ch07-08.max from the support files to see the finished animation. Now, lets animate the grass directly in front of the camera. 29. Open Ch07-09.max. This file contains the grass to be animated, and the instanced object Grass01 is already assigned within the Hair and Fur modifier to replace the hair guides. In the General Parameters rollout, all the parameters relating to the size and thickness of the grass are also set up already. In the Display rollout, the Percentage parameter is set to display in viewports 20% of the total amount of grass. The style and animation of this grass will be created with parameters in the Frizz Parameters rollout. 30. Adjust the bending force of the grass by changing these parameters: Frizz Root = 30 and Frizz Tip = 300. 31. Set Frizz X Freq., Frizz Y Freq., and Frizz Z Freq. to 2. This will determine the bending for the grass along each of the coordinate axes. The range for these parameters is from -0.0 to 100.0, with higher values allowing more variation in bending directions. To better understand how these parameters work, look at the following illustration. The top, middle, and bottom images show how the grass looks with these values set to 0.1, 0.8, and 2 respectively.

Animation 7-19

32. Set the bending amplitude by setting Frizz Anim to 10. 33. Set the grass bending speed by setting Anim. Speed to 100. It is easier to see and fine-tune the effects of the Frizz Anim and Anim. Speed parameters with Play Animation turned on. In this way, you can see how settings affect the grass behavior in real time. Now, the second type of animated grass is complete. 34. Save your scene. You can also open the support file Ch07-10.max and compare your results.

7-20 Animation

Birds Animation
In this section, we will cover the animation process for birds in a nest. To animate the birds, we will use the Biped system that comes with 3ds Max as well as the Skin modifier to associate the bird models with their skeletons. If youve never used Biped or Skin before, it will be helpful for you to explore the final files first to see how they work, then do these exercises afterward.

Exercise 4: Skinning the birds


In this exercise, we will use Biped and the Skin modifier to create a system for animating the birds. You can use the bird models provided in the support files, shown in the following illustration, or any bird model that you have in your library or that you have modeled yourself.

1. Open the file Ch07-11.max, or open your own bird file. Select all the objects that make up the bird mesh, then right-click and choose Object Properties. Turn off Show Frozen in Gray, turn on See-Through and then choose Freeze to freeze the mesh. 2. Select Create Systems Biped from the menu or Command panel, as shown in the following illustration.

Animation 7-21
3. Click the Biped button, and in any viewport drag the cursor to create a Biped of the desired size.

4. Select the bone Bip01. This is the virtual center of mass of the skeleton. 5. In the Motion panel, make sure that the Parameters button is pressed (rather than the Trajectories button).

6. Turn on the Figure Mode button so that you will be able to edit the skeleton configuration.

7. With Bip01 selected, rotate the skeleton 90 degrees, so it is facing the same direction as the bird model. Then drag the skeleton in a side view to align the skeletons center of mass with the birds center of mass. In the following illustration, the birds center of mass is marked with a red dot.

7-22 Animation

8. In the Structure rollout, set Spine Links to 2, to give the skeleton only two bones in its spine. Set the other parameters as shown in the following illustration.

9. Select the bones of one leg and rotate them to follow the shape of the birds leg. You can scale the foot so that its long and thin and use the foot bone for the birds lower leg. Select one of the toes and reposition it to the back side of the birds foot using the Select and Move tool. Refer to the following illustration as a guide.

Animation 7-23

To avoid having to do the same manual adjustments for the second leg, we will mirror the leg pose that we already set up. 10. To make selection of bones easier, on the Main Toolbar set the Selection Filter and choose Bone instead of All. This will only allow bone objects to be selected in viewports.

11. Double-click over the hip joint of the leg that you already set up to select all the bones in that leg. This will select all the bones in the hierarchy from the hip down to the toes. 12. With the leg bones selected, click the Copy Posture button in the Copy/Paste rollout. If this button is inactive, then click the Create Collection button first. In the window on the panel, you will see the leg shown in red. Refer to the following illustration.

7-24 Animation 13. To transfer the posture from one leg to another, click Paste Posture Opposite. There is also a Paste Posture button that pastes the posture to the same leg. Refer to the following illustration to see the location of the copy/paste buttons.

14. If you use the bird model from the support files of this book, then you can hide the leg bones as well as the birds feathers. Just select the leg bones and feathers and right-click the viewport to choose Hide Selection from quad menu. You may have to unfreeze the birds feathers first by going to the Display Panel and in the Freeze group, choosing Freeze Unfreeze by Name.

15. Adjust the spine, neck and head bones by rotating, scaling and moving them to the proper places. Use the same copy/paste technique to set the position of one wing bone and then copy it to the other side, as shown in following illustration.

Animation 7-25

16. Turn off Figure Mode. Save your work. Refer to the following illustration to see what the final skeleton structure should look like and how it aligns with the bird model. You can open CH07-12.max to compare your results.

7-26 Animation Now in order to animate the bird, we need to bind the bird model to the Biped system with the Skin modifier. 17. Continue with your scene or open the file Ch07-13.max. 18. Select the Bird object and apply the Skin modifier to it. 19. In the Modify panel, in the Bones group, click the Add button and choose all the bones in the scene from the list, except the objects that represent the eyes and the feathers. Refer to the following illustration.

20. On the Modify panel, click the Edit Envelopes button. This will allow you to adjust how the bones affect the geometry. 21. In the Select group, enable the Vertices option. This will allow you to control each individual vertex or entire group of vertices by changing their weight. Refer to the following illustration.

When the Edit Envelopes button is pressed, you can see all bones as links in the viewports, each shown as a gray line.

Animation 7-27
22. Click the gray link line for Bip01 L Calf in the viewport or select this object from the Bones list on the Skin modifier. This will turn the link yellow and show a Gizmo around it, and will also cause the mesh to change colors to indicate the vertices that are affected by this bone. See the following illustration.

The mesh colors display how much geometry is affected by the selected link(s). Red areas receive the maximum effect from the bone, while yellow and orange indicate a medium effect, and parts of the mesh that are not affected at all are blue. In the Skin modifier, in the Weight Properties group, you can click the Weight Table button to display the Skin Weight Table. This table shows you which vertices are affected by which bones. In the following illustration you can see the Skin Weight Table.

7-28 Animation Each vertex has its own identifying number. The minimum weight value is 0 and the maximum is 1. The total weights for any one vertex add up to 1. For example in this table you can see that the vertex with ID #0 is affected by link Bip01 Neck with a weight of 0.500, and is also affected by Bip01 Head with weight of 0.500. This means that this vertex is equally affected by both bones, so if we rotate Bip01 Head the vertex will move also, but will still be held in place 50% by Bip01 Neck. You can set vertex weights in the Weight Table, and also with the Abs. Effect parameter in the Weight Properties group. Lets start associating vertices with the bones. 23. Select the toe bone Bip01 L Toe11. 24. Select the vertices that need to follow the motion of this bone, and set Abs. Effect to 1.

25. Select the vertices that follow the bone between the foot and the toe, and set the Abs. Effect for Bip01 L Toe11 to 1. 26. For bone Bip01 L Toe1 set Abs. Effect to 0.5. Now the vertices at the joint will be affected by two bones with same weight of 0.5. When we changed weight for Bip01 L Toe1 to 0.5, it changed the weight for Bip01 L Toe11 from 1 to 0.5 automatically to make the total weight add up to 1.0. Refer to the following illustration.

In the previous illustration, you can see red, orange, yellow, and light yellow vertices. Red vertices have a weight of 1 for the currently selected bone, orange has 0.7 5, yellow has 0.5, and light

Animation 7-29
yellow has 0.25. Those are the weights by which bone Bip01 Toe11 is affecting the geometry. Bip01 L Toe1 affects the same vertices with the reverse order of values: where the weight is 0.7 5 for Bip01 Toe11, it is 0.25 for Bip01 L Toe1, and so on. 27. Set the weights for the vertices for Bip01 L Toe1 and Bip01 L Toe11 so the weights match the previous illustration. If you find the Weight Table cumbersome, you can try out the Weight Tool (the icon to the left of the Weight Table). When this tool is open, select vertices in the viewport, and you can make quick weight changes using the Weight tool for the selected vertices. 28. Use the same technique to associate the vertices with the other bones of the skeleton. If youre new to Biped, associating vertices can take quite a long time. If you like, you can open Ch07-14.max to skip ahead and see the final results. The next steps continue the exercise as if you were continuing with your own file, so if you open Ch07-14.max, you should not do the following two steps in this exercise. Instead, just follow along by looking at the result in the Ch07-14.max file. 29. Apply the Skin modifier to the Feathers object as well, and associate its vertices with bones too. 30. Link the birds eyes to Bip01 Head using the Select and Link command. Refer to the following illustration.

31. Save your work. You can refer to Ch07-14.max to compare your results. 32. Now, open Ch07-15.max. In this scene, you can see the birds chick model. 33. Use the same technique to create a Biped and associate vertices with the bones. 34. Using a side view, create two bones for the beak. Refer to the following illustration for the placement of the bones. Click Create Systems Bones again, and then click the bone where you want to begin branching. The new chain of bones branches from the first bone you click.

35. Add these two bones to the other bones in the Skin modifier, and associate the vertices that form the chicks beak so the beak can be opened or closed by moving those bones.

7-30 Animation 36. Select the Chick Feathers object and apply the Skin Wrap modifier to it. 37. On the Modify panel, click Add button and select the Chick object. Use the parameters from the following illustration.

The Skin Wrap modifier allows geometry to deform by mimicking the shape of another object. It allows you to fine-tune how the geometry reacts to the bones. 38. In a side view, create three bones to follow the shape of the tongue. Refer to the following illustration. Make sure the bones are aligned in the Top view as well.

39. Select the bone at the base of the tongue. 40. Select HI Solver (Animation menu > IK Solvers > HI Solver). A dashed line appears which currently connects the selected bone with the cursor. 41. Click the very last bone at the tip of the tongue. This will create the HI Solver and blue IK Solver crosshairs, as shown at the left side of the following illustration.

Animation 7-31

42. Associate the tongue vertices with the tongue bones using the Skin modifier as described in earlier steps. 43. The bone at the base of the tongue is responsible for positioning the entire tongues bone structure, so we need to link it to head bone. Link the base tongue bone to Bip01 Head with Select and Link. In the same way, link the IK Solver object to Bip01 Head. 44. Save the scene. You can also open Ch07-16.max to see the final result.

Exercise 5: Bird animation


Now, we will animate the birds using their Biped skeletons. 1. Open Ch07-17.max. This scene contains a model of a birds nest and birds. Note that Figure Mode has been turned off for each Biped in the birds. This will allow you to transform and animate the birds. 2. Select the chicks center of mass and place it into the nest. Refer to the following illustration.

7-32 Animation 3. Select the foot bone L Foot01 of the chick and go to the Motion panel. 4. Within the Motion panel, click Set Planted Key on the Key Info rollout. That will make the foot stay fixed at its current position regardless of other animation you set on the body. 5. Select the other foot, and click Set Planted Key for that foot also. 6. Place the second chick into the nest by moving its center of mass, and repeat the same procedure to plant the second chicks feet as well.

7. Turn on Auto Key. 8. At frame 0, move the chicks bones so they are in a neutral pose. You need to have Auto Key turned on for this step so animation keys will be set for the Biped on frame 0. Key creation works differently for Biped than most other object types. It doesnt automatically set keys at frame 0 when you make an intitial transform at a later frame. You have to deliberately set keys at frame 0 yourself. 9. Move the Time Slider to frame 10 and put the chicks in other poses by moving or rotating their Biped parts. This will animate the chicks from frame 0 to frame 10. Refer to the following illustration to see the keys on the Time Slider.

10. Continue to move the Time Slider by 10 frames and change the chicks poses on each keyframe. The end result you are going for is to simulate chicks impatiently waiting for their mother to come back and feed them. Turn off Auto Key.

Animation 7-33
11. Go back to frame 0. Select the large bird and lower both its wings. To do this, you can position one wing and use Copy Posture and Paste Posture Opposite to copy its posture to the other wing. Turn on Auto Key. 12. Move the Time Slider to frame 5 and raise the wings. Turn off Auto Key. 13. Now lets copy the keys for the wings to other frames. Select the bones of both wings. On the Trackbar, select the key markers at frames 0 and 5. Hold down Shift on the keyboard and move the two key markers 10 frames to the right. This will create a new set of keys at frames 10 and 15. 14. Repeat this step to copy the keys along the entire timeline. If you play the animation, you will see the birds wings flap. 15. At frame 40, move the bird so it is just outside the camera view. At frame 100, move the birds center of mass to the edge of the nest. Then create keys at frames 70 and 90 to make the bird fly up and down as it approaches the nest. Refer to the following illustration to see the birds trajectory. If you want to see the trajectory for the bird biped, use the Bipeds own trajectory tool found on Motion Panels Key Info rollout, the icon on the far right with the tooltip Trajectories.

16. On frame 70, swing the birds legs toward its back. 17. On frame 90, move the birds legs closer to its body and spread its toes in preparation for landing. 18. On frame 100, extend the birds legs and head in a landing pose. Move the large birds center of mass so its feet touch the nest edge. Use Set Planted Key to plant its feet at this frame. Now you will animate the bird feeding the chicks. Because the bird will fly away after feeding the chicks, you can leave the wings animated during this section of the animation. 19. At frame 140, rotate the large birds head bone so its beak touches the beak of one chick. Have the large bird hold that position for 20 frames, then move its head to the next chick, and so on. 20. Use the same techniques to create interim keys for the large bird, adding more details and dynamics to the animation. Refer to the following illustration for the main postures for the large bird.

7-34 Animation

21. Save the scene. You can also load Ch07-18.max to compare your results with a finished file.

Smoke Animation
In this section, we will animate smoke coming from the buildings chimney. In 3ds Max, smoke can be done in many different ways. 3ds Max includes a few tools for fire and smoke, but you can also use plug-ins such Afterburn, Chaos Aura, or FumeFx. In this exercise, we will use FumeFx, as we feel it provides superior results to the standard 3ds Max functionality.

Exercise 6: Smoke animation


1. Open the file Ch07-19.max. This scene contains a chimney that needs some smoke. 2. In the Command panel, select Create panel Geometry, and from the drop-down list, select FumeFX.

3. Click the FumeFX button and create a FumeFX container in the active viewport. 4. Create the container in such a way that it includes the chimney, and extends to the place where the smoke will end. Refer to the following illustration.

Animation 7-35

5. Create a circular mesh object and scale and place it to fit in the chimney, as shown by the red object in the following illustration. This object will serve as the smoke emitter. Even though we are not applying a material, we recommend applying a UVW map to the emitter. According to our tests, sometimes if the object did not have this applied, smoke was not emitting correctly and a missing map channel error was generated.

7-36 Animation 6. Anywhere in the viewport, create an Object Src helper. To do this, go to the Create Panel Helpers. On the drop down menu choose FumeFX, and then choose Object Src. In the Object Src Parameters rollout, click the Pick Object icon and choose the circular object that you just created. 7. Select the FumeFx container, open its parameters and click Open FumeFx UI. This will open the FumeFx UI dialog box. Refer to the following illustration, and use these settings.

8. In the Output rollout, you can see the Output Path bar. Input the path where you want the FumeFx cache files to be saved upon the smoke dynamics calculation. 9. Set Start to -200 and End Frame to 250. This will cause the smoke dynamics to be calculated starting at frame -200 so smoke will already be coming out of the chimney at frame 0. Refer to the previous illustration. 10. In the FumeFX UI window, click the Obj/Src button. In the window that opens, click Add Object and choose the FFX Object Src object that you created earlier. This adds this object to the dynamics calculation. 11. In the same way, add the chimney and tree crown objects to the dynamics calculation. Because both of these objects do not belong to any FumeFX helper, they will play the role of deflectors, as obstacles for the smoke. Refer to the following illustration.

Animation 7-37
12. Because we need only smoke and not fire, we need to turn the fire off. In the FumeFx UI dialog box, click the Rend button and turn off the Fire option.

13. Click the Obj/Src button. In the Object Source Parameters rollout, in the Temperature group, set Amount = 3000. 14. In the Smoke group, set Amount to 100, and in the Map channel, change Disabled to Source from Intensity. 15. Open the Material Editor. Create a Noise map in an unused slot and set the parameters Size to 200, Noise Type to Fractal, and change Color 1 to gray (RGB: 120,120,120). 16. The Phase parameter needs to be animated. Set the Time Slider to the last frame of the animation, click Auto Key, and set the value of the Phase parameter to 10. Turn off AutoKey. 17. In the FumeFX UI window, in the Object Source Parameters rollout, the None button is now available, because we changed Disabled to Source from Intensity. Drag an instance of the Noise map from Material Editor to this button. This tells FumeFx how to create the density of the smoke. Refer to the following illustration to see examples of the Noise map and the Smoke parameters group.

18. In the FumeFX UI window, click the Sim button and set Buoyancy to 2 and Vorticity to 0.1. Refer to the following illustration.

19. Click the Gen button, then in the General Parameters rollout, set Spacing = 2. This parameter is responsible for the quality of the smoke effect. Lower values correspond to better quality, however, consider your computers power when setting this parameter because lower values of this parameter will consume more computer memory.

7-38 Animation 20. Click Start Default Simulation to start the smoke dynamics calculation. 21. Click Open Preview Window to see the simulation calculation process in action. In the following illustration you can see the location of these buttons.

Now we need to recalculate the smoke simulation with the wind. Everything looks good now except that there are no natural forces affecting the smoke. Lets add wind to the scene. Instead of creating a new Wind object, you also have the option of merging the Wind object from Ch07-20.max, where the Wind object is already animated. 22. Select Create panel Space Warps Wind to create a Wind object. Add it to the smoke simulation. 23. On frame 0 set the Strength parameter to 0. Then set a few keys over 250 frames of animation, animating the Strength parameter with values between 0 and 1. In the following illustration, you can see every 50th frame of the animation.

24. The smoke is finished. Calculate the smoke simulation then save your scene. You can compare your results with Ch07-20.max from the support files.

Animation 7-39

Cameras
This section is mostly self-explanatory. We will explain how shooting angles were chosen for this scene, and how the cameras were created and animated. The idea of this project was to show a silent, stylized village surrounded by nature conveying a calm and peaceful environment. There is no specific script or storyboard, so we did not use these tools to determine the camera angles, as we would normally have done for a longer or more complex project. All we need is a few animated cameras that show the scene from different angles. We decided to use three cameras: The first camera shows the entire scene and pans slightly. The second camera features the spinning water wheel. The third camera focuses on a birds nest with chicks and another bird approaching it. All of the cameras move very slowly to align with the peaceful mood of the scene. The only limitation is the fact that this scene was originally designed for still renderings, and the idea to animate it was proposed afterward. This limits the choice of shooting angles, unless we want to invest a great deal of time to add additional details to the scene. If you are thoroughly familiar with 3ds Max cameras and their settings, you can skip to the start of the next exercise.

Cameras in 3ds Max


In 3ds Max, you can have two types of cameras: Target cameras and Free cameras. Each type has its advantages and disadvantages. Both are found in the Create panel Cameras.

Target Camera
A Target camera consists of two objects: the camera itself and a target. The camera represents your point of view while the target represents the point at which the camera looks. You can select and move both the camera and target as individual objects, but the camera always looks in the direction of the target. To create a Target camera, click Target in the Create Cameras panel, then drag in the scene. The initial point where you click places the camera, and the point where you release the cursor is where the target is placed. By default, Target cameras try to keep their local Y axis aligned to the Z axis of the World Coordinate System. Creating cameras in the Top view allows you to create cameras with correct initial alignment to world coordinates, thus giving more predictable results. Creating Target cameras in other types of views can lead to unexpected camera tilting. With a Target camera, the ability to transform the camera and target separately gives you great flexibility when setting up camera angles and animating the camera.

Free Camera
A Free camera is a single object. This camera does not have target, so you change the camera angle by transforming (rotating) the camera itself. To create a Free camera, click Free in the Create Cameras panel, then click in the scene. When you create a Free camera, it points into the viewport you use for creation. For example, if you create a Free camera in a Top view, it will be looking down. Free cameras can be rotated to view in any direction. Unlike Target cameras, they do not attempt to retain any particular alignment with the World Coordinate System.

7-40 Animation If youve created a camera and want to switch to another type, you can do that. A Free Camera can become a Target Camera, and vice versa. Just go to the Modify panel and change the Type field to whichever you want.

Camera Parameters
The scene area visible through the camera is defined by two independent parameters: FOV and Lens. FOV stands for field of view, while Lens is the length of the virtual lens, which affects the focal distance. These two parameters are linked so if you change one of them, the other changes accordingly. Changing these values not only changes how much of the scene is visible, but also alters the relative sizes of near and far objects in viewports, making them seem closer or farther away depending on the settings. Lens length is always measured in millimeters. The smaller the value of the Lens parameter, the wider the FOV. Small Lens values simulate a wide-angle lens, where faraway objects appear farther away. Larger Lens values simulate a zoom lens, where distant objects appear closer to camera.

Camera Tools
To move cameras and targets into the right position for your shots, you can use standard transforms, but it is often easier to see what the camera is seeing in a Camera view, and adjust that view directly. To switch to a camera view, press C on the keyboard and choose the camera from the Select Camera window. You can also select a camera object in the scene and press C to automatically show the camera view in the active viewport. It is always a good idea to give your cameras names to associate them with the camera angles they represent. This makes it much easier to select cameras as you work with the scene. To adjust a camera view directly, you can use the navigation buttons at the bottom/right corner of the 3ds Max interface. The navigation controls are: DollyMoves the camera towards or away from the target along the viewing axis. PerspectiveMoves the camera similarly to Dolly, but also adjusts the FOV parameter during the movement to keep the same amount of the scene in view. Because the FOV is changing, faraway objects will appear to move closer or farther away from the camera as you move the camera. Animation with this tool is a special effect. RollRotates the camera around the viewing direction (local Z-axis), thus tilting the view. Animation with this tool is a special effect. FOVChanges the cameras FOV parameter. TruckMoves both the camera and camera target along the view plane. Compare with Pan, which moves only the camera or target individually. Pan and OrbitRotates the camera around the scene. Pan rotates the target around the camera, similar to a camera being rotated on a tripod. Orbit rotates the camera around the target. With a Free camera, its Target Distance parameter defines the point used as a target for these tools. By holding down Shift, you can constrain the Pan or Orbit tool to a single axis. Sometimes its hard to select the camera target in the viewport because its blocked by too many other objects in the scene. In this case, select the camera itself, then right-click and choose Select Camera Target from the quad menu. If you have an active Camera Viewport, you can also select the Camera or Camera Target from the menu accessed through the plus (+) sign in the top-left corner of a viewport. The Safe Frame is also very important when you work on the final rendering. The Safe Frame displays the rendering aspect ratio in the viewport, showing you exactly what will appear in the rendered

Animation 7-41
image. If you dont use this tool, you might accidentally crop the image with your camera placement. You can enable the Safe Frame for a viewport with the keyboard shortcut Shift+F. To animate the cameras for this project, its enough to just create a camera, go to the desired frame, click Auto Key and move the camera and/or target. With this method, animation keys will be created automatically. After you set the shooting angles for the animation, turn off Auto Key. If you need to change the camera position, go to the appropriate frame, turn on Auto Key again, and move the camera. Use as few interim keys as possible to keep the animation smooth. Whenever possible, control the orientation, position and speed of the camera between keyframes using the transform curves in the Curve Editor. This recommendation is applicable not only to cameras but to other objects as well. For example, if you want to slow the animation down, you could add a large number of interim keys, but then the animation will become more difficult to adjust and control. Use the Curve Editor to control transform curves whenever possible.

Exercise 7: Camera animation


Now with all that in mind, lets create the animated cameras for your scene. 1. Open Ch07-21.max and analyze the speed and type of motion. Look at the Lens and FOV values at the beginning and end of the animation, and look at the transform curves in the Curve Editor. 2. Notice in the Time Configuration dialog box that the length of animation for each camera is set to 10 seconds, which is 250 frames at 25 frames per second. 25fps is PAL standard, and was our chosen frame rate; however, your needs may call for something else, such as 30 (NTSC) or 24 (film). 3. Examine the camera movement by looking at the cameras from the top viewport. You can turn on the Trajectory (through the Object Properties dialog box) to see this. You can also use the Trackview Graph Editor to see the curves for the camera movement as well. 4. For one of the cameras, delete all objects that arent visible in the camera view and save the scene into a separate file, then reload the original file and do this process again for the other cameras. This will free up system resources and speed up render times. After all the cameras are created, animated, and saved into separate files, this exercise is complete.

Summary
Too often, great 3D work is made less spectacular by the lack of animated objects in a scene, such as the kind discussed in this chapter. While many animations contain photorealistic lighting and materials and have plenty of large animated objects, such as cars, its the lack of animation on the smaller objects like blades of grass or a column of smoke that can really make an ordinary animation stand out as spectacular. If you are trying to push the boundary in terms of quality, we suggest trying to find small details in your next animation project that you have never tried to animate, and then attempt to put those objects in motion. It may require a lot of additional work and creativity in order to get your system to handle the task, but the rewards are worthwhile.

Chapter 8

Lighting

T his chapTer is dedicaTed To exTerior lighTing , which is usually the last step in developing a scene in 3ds Max before rendering the final product. All further work on the image or animation is usually done with compositing and editing programs. We try to plan lighting strategies at the start of the project so we can keep them in mind when developing textures and materials for the scene. When placing lights in the scene, it is important to consider several factors, including the size of the scene, the number of objects, the possibility of breaking down the rendering into layers for compositing, and the visibility of objects and their color in areas of shadow. Knowing all the factors is vital for determining which global illumination (GI) solution is most suitable and how bright the GI should be. Additional lights can be used if required, for example if we need to focus attention on a particular object, but then you need to optimize the light settings in order to use less system resources and render faster. In this chapter we will cover the creation of a daylight scenario with the V-Ray renderer, and a nighttime lighting scenario with standard 3ds Max lights. Despite this chapter being based on V-Ray, the overall principles and techniques can be applied to any render engine. Many of the features found in V-Ray appear in other render engines under different names, such as color mapping, which is V-Rays version of exposure control. In other features, the names of many settings will even be identical, such as the many real world settings found on the VRayPhysicalCamera, like shutter speed and focal length.

Daylight
For daylight on a sunny, cloudless day, two light sources are usually enough: the sun and skylight. Sunlight provides diffuse and specular lighting, as well as shadows, while skylight delivers ambient light throughout the scene. Fortunately, the process of placing these light sources is rather quick and easy once a few principles are understood. We need to consider the placement of the sun since it will dictate the direction and look of the shadows. It is generally not a good idea to place the sun directly in front of or behind the camera, as 1

8-2 Lighting this tends to flatten out a rendering. A rendering looks best when it has a good mixture of direct light (or diffuse light), indirect (or ambient light), and hotspots (or specular light). The skylight map, which you can place in conjunction with the sun, provides Global Illumination for all the scene objects and also sets the color of the sky to match the time of the day. The brightness of the skylight should be enough to light all of the objects that are not lit by direct light.

Exercise 1: Daytime lighting


To set up a daytime scene, we will use the VRayPhysicalCamera in conjunction with the VRaySun/ VRaySky. The settings for these tools are very well designed and easy to use, and when they are used together, you will get what is referred to as real-world lighting. During this exercise we will provide only basic information about the V-Ray tools used. If you want to get more information about V-Ray, please see the V-Ray user manual or other learning resources. The actual rendering of the scene will be covered in chapter 9. The scene that well use for this exercise consumes a lot of system resources, so we recommend that you use a computer with a lot of RAM. However, by adjusting a few key settings that control detail and precision, you can easily complete these exercises on a system with less RAM. If you need to, you can merge some elements from this scene into a new file and avoid importing the elements like the grass and leaves if they are too much for your machine to handle. That way you can still follow along. In this exercise, you will be instructed to place the camera and lights at specific coordinates. You can use the coordinates given, or use similar coordinates as you like to create your own scene. 1. Open the file Ch08-01.max.

For the purpose of this exercise, we removed several elements of lesser importance in order to make the scene render faster. Generally, this is a good approach for any scene where you are experimenting with lighting and materials and dont want to induce unnecessarily long test renders. On the other hand, we increased the level of detail for some elements so that they would look good from a specific camera position. This too is a critical aspect of efficient scene creation, and usually requires multiple versions of the same scene, where some objects appear more detailed in one scene than they do in others, depending on which camera is being rendered. In this scene, the greatest impact to the system resources is made by the Hair and Fur modifier. To speed up test renders, we disabled this modifier; however, you can turn it back on during your final renders if you want. 2. Add a VRayPhysicalCamera to the scene (Create Cameras VRay VRayPhysicalCamera) and place it at X: -560, Y: -800, Z: 130. Place the target at X: -340, Y: -510, Z: 170. We will start with the camera in this position, but you may want to move it around to match the illustrations and to see the effects of the different lights we will be placing in the scene in the following exercises. 3. Add a VRaySun (Create Lights VRay VRaySun) to the scene and position this light so that it points almost vertically down into the scene to simulate a noontime sun position. When asked if you want to automatically create a VRaySky map and place it into the Environment Map channel, choose Yes. 4. Place the light at X: 5050, Y: 3220, Z: 11350 and its target at X: 0, Y:0, Z:0. 5. Within the Modify panel, disable the VRaySun and keep all other settings at their default values. In a moment, we will render the scene without the effect of the VRaySun, but rather with just the VRaySky map.

Lighting 8-3
By default, the VRaySun settings are set to values that work with the VRayPhysicalCamera. If you used a Standard camera instead, the intensity multiplier value would have to be about 12% of its current default value of 1.0. Therefore, if you ever use a Standard camera, you will need to use a VRaySun intensity value of about 0.01 or 0.02 for a scene where you would normally use a multiplier of 1.0. If you do use the VRayPhysicalCamera, or a real-world camera in another render engine, try getting into the habit or adjusting the camera settings to control exposure rather than adjusting the suns intensity value. By adding a VRaySky map to the Environment Map channel, you are adding an indirect light source to the scene that will play a big role in the Global Illumination solution. An indirect light source like this is analogous to an HDRI (High Dynamic Range Image), where all the objects in the scene are illuminated by an image, according to the light source location within the image. Both of these tools add to the realism of a rendering, since they closely simulate how light operates in the real world. The intensity and color of the VRaySky map depends on the angle of elevation of the VRaySun above the horizon. The closer to the horizon that the VRaySun is, the less intense the VRaySky will be. In addition, as the VRaySun approaches the horizon, the light produced will be more orange/red, simulating sunlight at dawn or dusk. The closer the VRaySun is to a noontime position, the brighter and bluer the VRaySky will be. This map affects both the overall scene lighting and the treatment of shadow areas. With the VRaySun high in the sky, you would see a very noticeable blue tint to white surfaces. In short, by adjusting the VRaySuns position you can adjust the overall scene lighting and simulate different times of day. Lets take a look at the lighting created by the VRaySky alone. The two images that follow show how the same VRaySky map with the same parameters can affect scene lighting differently depending on the VRaySuns position. In both illustrations, we used VRaySky in the Environment Map channel, but the VRaySun light is turned off. This means all lighting in the scene is provided by the VRaySky map, the color and brightness of which is controlled by the position of the VRaySun. If you rendered the camera view with the sun directly overhead, you would see something similar to the left image of the following illustration. If you moved the sun to a point low on the horizon and rendered again, you would see something similar to the right image of the following illustration. The impact of the VRaySuns position in the sky is clearly evident.

8-4 Lighting Experiment with different VRay Sun positions and render each position to see its effect on the lighting of the scene. When finished, return the VRaySun to its original position of being overhead. 6. In the Modify panel, enable the VRaySun.

The brightness and color of the VRaySun not only depends on its position in relation to the horizon, but also to the VRaySun parameters. For example, the Turbidity parameter sets the amount of dust particles in the air and thus affects the color of the light; lower values allow more blue color to come through and create an impression of very clean air. Higher Turbidity values will add an orange tint to the scenes lighting. The Ozone parameter dictates the color of the sun. The minimum value of 0.0 adds a yellow tint, and the maximum value of 1.0 adds a blue tint. Lets get back to the exercise. To make test renders faster, lets make a few changes to the rendering parameters. 7. Open the Render Setup dialog box, and within the V-Ray tab V-Ray:: Global Switches rollout, disable Displacement, enable Override mtl and put any Standard material into the Override mtl slot.

This will render all the objects in the scene as if they had the same material applied to them. This technique makes it easy to see how the light is affecting objects, so you can test the lighting and make changes without having to wait for all your complex materials to render. 8. Go to the V-Ray tab of the Render Settings dialog box and in the V-Ray:: Image sampler rollout, disable the On option in the Antialiasing filter section. Despite how this may appear, doing this does not disable antialiasing. Antialiasing occurs as a result of the image sampling. We have simply disabled a feature that allows the rendering to be slightly blurred or sharpened, which is something that might be done to make an image crisper or to remove the likelihood of antialiasing artifacts such as pixel swimming or flickering. Any filter used, especially blurring filters, will induce longer renders, and in some cases dramatically longer renders. For test renders, you could also set your Image sampler to Adaptive Subdivision with the default Min/ Max setting (-1,2) to get even faster renders at the expense of quality.

The next 6 steps illustrate the most important settings that were changed from their default values to setup the scene the way it is now. 9. Go to the Indirect illumination tab and in the V-Ray:: Indirect illumination (GI) rollout, activate Indirect illumination by enabling the On option. 10. Set Primary bounces GI engine to Irradiance map, and Secondary bounces GI engine to Light cache. A different engine can be assigned to calculate primary bounces and secondary bounces separately, which can allow for quicker and more efficient approximation of global illumination in a scene. Simply stated, primary bounces are bounces directly visible by a cameras view or visible in the reflection and refractions from other objects and secondary bounces are bounces that occur outside of the rendered view. By assigning an accurate engine to primary and more approximate solution to secondary, we can save a tremendous amount of time in the calculation (or rather the approximation) of GI. The irradiance map and light cache combination is by far the most widely used in V-Ray. 11. In the V-Ray:: Irradiance map rollout, in the Built-in presets section, set the Current preset to Very low, HSph. Subdivs to 20, and Interp. Samples to 100. These are optimal test render settings that control the number, quality, and blurring of GI samples, respectively.

Lighting 8-5
12. In the V-Ray:: Light cache rollout, set Subdivs to 100. 13. Within the V-Ray tab, go to the Color mapping rollout and enable Sub-pixel mapping and Clamp output. This will prevent bright white dots from appearing as incorrectly exposed pixels. 14. Within the Settings tab, go to the DMC Sampler rollout and set the Adaptive Amount to 1.0. Ensure that the Noise threshold is set to its default value of 0.01.

Noise threshold is by far the most important quality setting in V-Ray as it controls all blurry effects. Blurry effects include everything from depth-of-field, to motion blur, to GI, to image sampling, and just about every quality setting within V-Ray. It specifies the minimum level of quality, in terms of noise produced, that a given solution (or setting) has to achieve. A value of 0.01 means 1% and a value of 1.0 means 100%. When this value is at its default value of 0.01, it means that two adjacent samples have to be within 1% of each other to be acceptable. So in the case of image sampling, if two adjacent samples are more than 1% apart from each other in terms of color, more samples will be taken until the threshold is reached. This number should remain at a value of 0.01 because changing it can induce much longer render times. Likewise, the Adaptive amount setting is critical because it dictates how much importance to assign to the Noise threshold value. If the Adaptive amount were set to 0.0, then the Noise threshold value would be rendered useless and all solutions that could be adaptive will be prevented from being adaptive. This value should always be set to 1.0 (100%) unless there is a specific problem occurring that cant be fixed elsewhere. For example, HDRIs tend to produce unacceptable levels of noise when an Adaptive amount of 1.0 is used. Therefore, when using HDRIs, its a good idea to set this value back to its default value of 0.85. Except for HDRIs, this value shouldnt have to be changed from 1.0. Values less than 1.0 will simply cause long render times unnecessarily. Keep all the other settings at their default values. We will cover these in detail later. Lets take a look at a few of the camera settings, which are designed to simulate real-world camera features. There are three main ingredients to film exposure, both in the real world and with the VRayPhysicalCamera. These are shutter speed, film speed, and f-stop (called f-number in VRay). These three settings can be changed in endless combinations to produce the same exposure. You can offset a change in one of the settings by changing one of the other two settings and get the exact same film exposure. The first ingredient to a films exposure, film speed, controls the sensitivity of the film to light. Lower values mean the film develops slower, which causes the image (or rendering) to appear darker. The default value is 100, which is a good starting point in any 3D renderer. The following illustration depicts standard film speeds. If we double the films speed, the film will expose twice as fast.

15. Render the camera view. The image is darker than it should be so lets make it brighter (or more exposed), as shown in the left image of the following illustration. 16. Set the film speed to 200 and render the camera view again. The image is now twice as bright, as shown in the right image.

8-6 Lighting

The second ingredient, shutter speed, is simply the length of time that the shutter is opened and light is allowed to expose the film. The slower the shutter speed, the more exposed the film (or rendering) will be. Additionally, slower shutter speeds also allow for greater motion blur. The default value in V-Ray is 200, which simply means that the shutter will be open for 1/200 th of a second. This is the most common shutter speed on a generic consumer camera where the value is not displayed and it is a good starting point in any 3D renderer that uses this setting. The following illustration displays the standard shutter speeds on a typical professional camera. By decreasing the shutter speed from 200 to 100, we double the amount of time that the shutter stays open from 1/200 th of a second to 1/100 th of a second. Since this doubles the amount of time the light is allowed to expose the film, the film (or rendering) will appear twice as bright. 17. Change the shutter speed to 100 and render the camera view. The image is again twice as bright as before. It is too bright now, but well fix this shortly.

Before the third ingredient to exposure is explained, a brief discussion of focal length is necessary. Focal length specifies the distance from the surface of a lens to its focal point, or the point at which light is focused on the film. It plays a major role if you are using a depth-of-field effect, as it controls the range (within a scene) in which objects would have to be positioned in order to be in focus. Lower values increase the spread, from the focus distance, in which objects can be in focus, and higher values, decrease that range. Lower values also correspond to wide-angle lenses, and are generally those values less than 35mm. Higher values correspond to telescopic lenses, and are generally those values of 100mm or greater. As a side note, it can also be stated that with one eye open, humans see approximately the same field-of-view as is seen through a 50mm lens. F-stop (or f-number) is a term to describe the relationship between focal length and aperture size, but its purpose is to provide an easy way to display the area where light is allowed to pass through the lens and expose the film. Rather than displaying this relationship in some complicated and hard to understand fractional value, the f-stop allows us to display the relationship in one easy to understand number.

Lighting 8-7
In the next illustration, you can see the standard f-stops found on a typical professional camera. By stepping down the f-stop from one value to a lower value, you double the area where light is allowed to pass through, and therefore, double the amount of exposure on the film. The default value in V-Ray is 8, which is also the typical default f-stop found on a generic consumer camera where the value is not displayed. This is a good starting point, but we will change it here to offset the change we just made to the shutter speed value.

18. Change the f-number to 11 and render again. This change cuts the exposure in half and returns the total amount of exposure to what it was before we changed the shutter speed.

In the following illustration, you can see how various combinations of shutter speed and f-stop can produce the exact same amount of exposure.

Lets look at one more setting in the VRayPhysicalCamera at this point. Custom balance allows a special type of modification to the image, whereby the selected color will appear as white in the rendering. This parameter effectively sets the color or lighting hue that we want to eliminate in the rendering and replace it with no color (or white). White balance does effectively the same thing, except in a preset fashion. 19. Set the White balance to Daylight and render again. Notice the subtle changes in exposure. Experiment with different custom colors if you want to see the effects you can achieve.

At this point, we need to choose the type of Color mapping we want to use. Color mapping is V-Rays version of exposure control, and is critical to any rendering. Although there are seven different options for color mapping, we recommend using one of 3 different options; Exponential, HSV exponential, or Reinhard. Lets look at each briefly. The Exponential option will saturate pixels, i.e. add color, based on their intensity. What this means is that pixels that are really intense, or bright white, will be given more color, thereby replacing the white with color, and pixels that are less intense will be given less color. The end result of this is that brighter areas in the scene will not appear so bright and darker areas will not appear so dark.

8-8 Lighting The HSV exponential option is a minor variation of exponential. HSV stands for hue, saturation and value, and this type of color mapping preserves the hue and saturation of a pixel and only allows the value to be altered. The result of this color mapping is similar to exponential except HSV exponential will provide a more vibrant display of colors and keep materials from being washed out so easily. The final color mapping mentioned is Reinhard. This is a great option to use because it provides a mixture of linear and exponential color mapping. Linear color mapping usually allows too many surfaces to be overexposed while exponential often provides too much change in hue and saturation. The mixture of these two color mapping types is controlled by the Burn value. When Burn is set to 1.0, the result is purely linear color mapping and when Burn is set to 0.0, the result is an exponential-like color mapping. A good place to start color mapping in any scene is with Reinhard and a Burn value of 0.5. This provides a 50/50 blend of Linear and Exponential and the result is usually a great place to start testing the lighting in a scene. Just like so many other areas of V-Ray, you really need to test different color mapping types and different settings within the various types. So in the case of Reinhard, if you render a scene and determine that theres just too many areas of overly bright highlights, all you need to do is reduce your Burn value and bring it closer to Exponential color mapping. With the first four color mapping types available in the drop-down menu, you are give the capability of increasing or decreasing the illumination of dark areas of your image separately from bright areas. Raising the Bright multiplier increases illumination in already bright areas of your scene and decreasing the bright multiplier decreases illumination. The Dark multiplier works the same way. Therefore, raising the dark multiplier increases illumination in already dark areas of your scene and decreasing the dark multiplier decreases illumination. In the following illustration, you can see the result of using the default Linear color mapping along with the three other viable options available. 20. In the Color mapping rollout, set Type to Reinhard. 21. Render the camera view.

From this rendering we can see that some textures are burned out and overexposed. This is because Reinhard with a Burn value of 1.0 is exactly the same thing as Linear, which tends to be overexposed in exterior renderings with a bright light source such as the sun. By reducing the Burn value, we make the exposure less linear and more exponential, thereby removing the tendency for parts of the image to be burned out. 22. Set the Burn value to 0.5 and render again. The result should look similar to the 2nd image from the right in the following illustration.

Lighting 8-9
This adjustment helps us fix overexposed areas of the grounds surface; however, it also reduces the brightness of objects that we would prefer to keep bright. For example, the stone staircase looked much better when it was slightly overexposed. However, it is better to keep the rendering neutral and then add brightness to selective areas later during post-production. It is also easier to add brightness to the image instead of reducing it. In the following illustration, you can see the final rendering with Displacement re-enabled, Hair and Fur re-enabled, render quality settings increased, and with post-production processes applied. We did the post-production with Adobe Photoshop after using the Render Elements to create multiple layers from the same rendering. Render Elements can be found in the Render Setup dialog box under the Render Elements tab. We used the VRayLighting render element to add more sunlight to some objects, the VRaySpecular render element to add specular highlights to some objects, and the VRayZDepth render element to simulate depth of field. These processes will be discussed later in this and the next chapter. 23. Save your scene. If you would like to see the final test render version of this file, open Ch08-02test.max. If you would like to see the final production version with Displacement enabled, Hair and Fur enabled, and with final production render settings applied, open Ch08-02-production. max.

8-10 Lighting

Nighttime Lighting
Nighttime lighting is more difficult to recreate than daytime lighting, both technically and creatively. From a technical standpoint, it is more difficult to reduce noise in a nighttime rendering because noise always appears most noticeably in areas of lower illumination. Therefore, you will almost always need to use higher quality settings to achieve the same noise free image that you would produce with daytime lighting. From a creative standpoint, there are usually so many more real world lighting characteristics to deal with, such as attenuation, ambient shadows, light colors, and the expectation to see more sophisticated elements such as volume lights and fog. To simulate daytime light, it was enough to simply place a VRaySun and VRaySky as our light sources, but for nighttime lighting we need to be more creative. So it is very important to imagine what the final picture should look like first and then think about ways to get there. We had a specific picture in mind. Its a cool, crisp night with plenty of moonlight, rich with high contrasting areas of brightly lit surfaces adjacent to dark surfaces. The owner of the house is still up so all the interior lights are turned on. There are no completely dark areas of the image and we have good visibility for all the textures. The house is lit from behind by white moonlight and from inside by bright orange tinted lights. In this exercise, we will explain how to set up lights, how to do the rendering, and how to post-process the rendering. As an example of how low quality render settings can adversely affect a nighttime rendering well beyond the affect of similar settings applied to a daytime scene, look at the following illustration. Both images were rendered with the ubiquitous Irradiance map/Light Cache combination. In the left image, Light Cache Subdivs is set to 100, and in the right image it is set to 1500. The left image shows incorrect secondary bounce light distribution, as the walls and ivy leaves appear self-illuminated and have visible splotches. Due to a low number of Light Cache subdivs, the light from the window is distributed incorrectly. These artifacts will become even more noticeable during post processing.

Rendering with high quality GI settings would take a long time to calculate in a scene like ours with a high Hair Count value for the Hair and Fur modifier, so in this scene we decided to reduce render time by breaking down the rendering process into a few separate steps: Step 1: Render with only skylight Step 2: Render with only moonlight

Lighting 8-11
Step 3: Render with only attenuated lights to create limited light effects in specific areas such as windows Step 4: Add volumetric effects to a few of the attenuated lights This separation of steps will allow us to render a scene with a large number of polygons on a computer with limited resources without sacrificing render quality. This approach will also give us more flexibility at the post-production stage. We will demonstrate this approach in the exercise that follows.

Exercise 2: Nighttime lighting


1. Open the file Ch08-03.max.

In this scene, only the necessary objects are present and we have disabled the Hair and Fur modifier as well as Displacement. If you have fast computer or dont mind longer render times, you can turn these features back on if you like. To create a skylight, we will use an HDRI within the Environment Map channel in conjunction with a special type of V-Ray light called, quite ordinarily, the VRayLight. 2. Open the Material Editor and place a VRayHDRI map into any free sample slot. You can do this easily through the Material/Map Browser, which is accessed through the Get Material icon under the sample slots. 3. Put sky0038.hdr in the HDR map slot, and rename this map HDRI Sky. This nighttime image, from the Evermotion HDRI map collection, contains a very dark sky and a bright light at the horizon. Drag the HDRI Sky map onto the map slot in the GI Environment (skylight) override rollout of the VRay:: Environment rollout. Make it an Instance.

4. In the Parameters rollout of the HDRI Sky map, set Map type to Spherical environment. This image is spherical and needs to utilize this option so that it wraps around the scene properly. 5. Render the image. This image is much too dark, so well need to increase the brightness of the map we just loaded. 6. In the Parameters rollout of HDRI Sky map, set Render mult to 3.0. This will increase the brightness of this map threefold.

8-12 Lighting

In order to make the light emitted by the HDRI sky map a richer blue, well apply a Color Correction map to it. 7. For the HDRI Sky map, click the Material Type button and select Color Correction from the Material/ Map Browser dialog box. On the Replace Map dialog box, select the Keep old map as sub-map option, and click OK. 8. For the Color Correction map, set Hue Shift to 7.0 and Saturation to 50.0. Rename this map to GI Environment. Refer to the following illustration.

This adds saturation to the sky, which is important for maintaining the stylized, somewhat cartoonish, look of this composition.

Lighting 8-13
Now lets create the environment reflection map. 9. Copy the HDRI sky map into any empty sample slot, and rename the map Reflect Environment. 10. Drag and drop the Reflect Environment map from the Material Editor as an instance into the Reflection/refraction environment override channel, as shown in the following illustration.

As mentioned earlier, we should avoid placing sunlight directly in front of or directly behind the camera. Likewise, for a nighttime scene with an HDRI, it is best to orient the HDRI so that the light source is in neither of these positions. For the best HDRI image appearance, we need to rotate the HDRI so that the brightest areas will be at the right side of the camera view. 11. Select and isolate the Ground object with the shortcut Alt+Q. 12. Create a Sphere of any size on the ground in front of the camera. We will use this to orient our HDRI maps appropriately. 13. Create a new VRayMtl with 100% reflection and apply it to the sphere. 14. Within the Reflect Environment map, adjust the Horiz. rotation value so that the light source within the HDRI image appears on the right side of the sphere when rendered. By gradually changing this parameter and doing test renders each time, we can orient the map properly. In this case, a value of 100 works well, as shown in the right image of the following illustration. 15. Set Horiz. rotation value to 100.

You can use a useful utility called VRayHDRItool that allows you to manipulate the HDRI map and see changes. This utility is free from http://www.tepavicharov.com/scripts.html. 16. Within the GI Environment map, set Horiz. rotation to 100.0 as well. 17. Delete the Sphere object, as it is no longer needed, and Exit Isolation Mode.

8-14 Lighting 18. Render the camera view. The results should look similar to the left image of the following illustration. With HDRIs applied to the Environment channel, you will need to use higher quality GI settings to prevent the onset of erratic shading. Notice the bright spots in the left image (current rendering). When you are ready to render the final image, you should use a High preset for the Irradiance map and 1000 or more Subdivs for the Light cache, as shown in the right image.

Now, we will add more depth and interest to this scene by adding additional light sources. 19. Add two large VRayLight light objects (Create Lights VRay), using the Plane option, so that they light all the objects from behind, as shown in the following illustration. While this particular type of light is most widely used as a fill light for interior scenes, it can also perform the role of fill light for exterior nighttime scenes such as this.

Lighting 8-15
These two lights need to highlight objects so that light just touches the objects edges. This effect will add volume to the rendering and improve its overall look. You might want to spend some time and try different brightness, color, size and position parameters to see which combination delivers the best results. If you prefer, you can simply merge the lights from the Ch08-04.max scene. 20. If its not already done, go to the Modify panel and for each of these lights set Color to blue, approximately RGB(80,125,255), and Multiplier to 20 or 30. 21. Rename one light Backlight01 and the other Backlight02. 22. Select Backlight01 and in the Modify panel click Exclude to open the Exclude/Include dialog. Choose the Include option. Include only the objects you want to be illuminated see our suggested list in the following illustration. Repeat the same procedure for Backlight02.

23. In the Parameters rollout turn on the Invisible and No Decay options, and turn off Affect Specular and Affect Reflections. Set Subdivs to 20. 24. Open the Render Setup dialog box. In the Common panel, set the output file name to GI_Environment and the file format to PNG. For this file type, choose 48 Bit with Alpha Channel. In the Render Elements panel, add the VRay_Lighting element with the output filename set to Backlight.png.

This will cause our rendering to be saved into a PNG file with the name GI_Environment.png. We will also have another file saved with the VRay_Lighting render element in the file named Backlight.png. This will give us the ability to apply additional corrections later in the post-production stage. Note that you must save the image with an Alpha Channel in order to preserve the transparency of unlit areas and layer the renderings in Photoshop later on. For maximum flexibility, you can save results into Open EXR (*.exr) or HDR (*.hdr) formats. These two formats have a wide dynamic range, or variation in lighting information stored within the images. In our case, however, a 16 bit per channel PNG format will be enough, as this will allow us to freely adjust color and brightness without having banding problems (obvious gradations between adjacent colors in the rendering). If you want even more flexibility at the post-production stage, we also recommend that you try other Render elements such as VRay_Reflect, VRay_Specular, and VRay_Refract. 25. Save your scene. You can also open the file Ch08-04.max to compare your results. 26. Render the camera view. 27. Open both files in Photoshop and copy the Backlight.png image into GI_Environment.png as the second layer. Rename the layers GI_Environment and Backlight, as shown in the following illustration. You can add a solid dark layer as a background for now. Name it Back Sky.

8-16 Lighting 28. For the Backlight layer set Blend Mode to Screen and adjust Curves and Levels until you are satisfied with the result.

In the following illustration, you can see the GI_Environment and Backlight layers and the result of both layers combined together with the Curves and Levels corrections applied.

29. Save the file as Night_Scene.psd. Step 1 of the light creation is now complete. This is the most important step because all other lighting will be based on this primary skylight.

Lighting 8-17
For Step 2, we will create moonlight. 30. Return to 3ds Max using your previously saved scene or using the file Ch08-04.max. 31. Create a Target Direct light to serve as the moon in your scene and position it in front of the camera and slightly to one side. Rename this light Moon.

32. For the light, set the Multiplier to 0.5 and its color to blue or white. In the Directional Parameters rollout set Hotspot/Beam to 2100. Set the shadow type to VRayShadows. All standard lights that incorporate shadows must use either VRayShadows or the VRayShadowMap. 33. In the VRayShadows params rollout, turn on Area shadow. Set U size, V size and W size to 10.0, and set Subdivs to 15. 34. Open the Render Setup dialog box. In the Indirect illumination tab, turn off the On option to turn off GI.

35. In the V-Ray tab, go to the V-Ray:: Environment rollout and turn off GI Environment (skylight) override and Reflection/refraction environment override. 36. Make sure that the color swatch in the Environment Map channel of the Environment and Effects dialog box is set to pure black, so that no skylight is created through this channel. This will allow you to perform a quick render with only light from the moon. 37. In the Common tab of the Render Setup dialog box, set Render Output to Moon.jpg (maximum quality).

38. In the Render Elements tab, add VRay_Specular with the output name Moon_Specular.jpg. Remove all other Render elements from the list. We are saving the output to JPG format since the element/layer does not require complicated modifications in post production and so that we could also save hard drive space. 39. Save your scene. You can open the file Ch08-05.max to compare your results. 40. Turn off BackLight01 & BackLight02 and render the camera view. 41. In Photoshop, open Moon.jpg and Moon_Specular.jpg. Copy these images into Night_Scene.psd as new layers.

8-18 Lighting 42. Rename layers to Moon and Moon specular accordingly, place them at the top of the layers list and change their blending mode to Screen. Correct layers using Curves, Levels and Color Balance. 43. Save the file as Night_Scene.psd.

For Step 3, well create a few attentuated lights in the scene to enhance a few of the scene details. We usually use this technique for interior scenes, but here we can use it to simulate light from fireflies and light coming out through the house windows. First, well need to turn off all other lights in the scene and re-enable the GI calculation. 44. Return to 3ds Max using your previously saved scene or using the file Ch08-05.max.

45. Turn off the Moon, Backlight01 and Backlight02 lights. 46. In the Indirect illumination tab of the Render Setup dialog box, enable GI again. Note that you will leave the GI Environment (skylight) override and Reflection/refraction environment override in the V-Ray:: Environment rollout turned off. Next, we will create the attenuated lights with limited range created specifically for certain effects. Some of these lights will simulate man-made light sources from inside the house and on the pier, while others will simulate fireflies buzzing around near the ivy. The effects of these lights will be subtle, as they are not intended to illuminate the entire scene. Make sure BackLight01, BackLight02, and Moon are turned off. 47. Create five Omni lights and position them inside the house just behind the window and door openings. We will change their settings in a moment.

48. Name the lights as shown in the following illustration. The light coming from the door is named Spot From Door because it will eventually be turned into a Spot light. If you prefer, you can simply merge all the Omni and Spot lights from Ch08-06.max.

Lighting 8-19
Naming objects intelligently, including lights, is an important part of keeping the scene organized. In this case, it is critical to name the lights as shown so you can follow the steps in this exercise. 49. Go to the Modify panel, and for each Omni light, set the shadow type to VRayShadow (General Parameters rollout). 50. For each Omni light, in the Intensity/Color/Attenuation rollout, set the Multiplier to a value between 2 and 5, different for each light. For each one, set the color swatch to pink, RGB (255,175,175), and make sure they are turned on. Next, you will set up attenuation for the Omni lights. Attenuation will be used here to simulate the effect of light shining out of a window or doorway on a dark night. In real life, such lights shine only so far before the light dims down to zero. Attenuation creates this effect in renderings. 51. In the Far Attenuation section, turn on the Use option and set End to 450. To see the attenuation area in viewports, turn on the Show option.

Most of the lights shine out of windows, where the light would never reach the ground. But the light near the door, Spot From Door, needs to shine some light directly on the ground. For this reason, we will change it to a Spot light. 52. Select Spot From Door and change its Light Type to Spot. In the Intensity/Color/Attenuation rollout, set its Multiplier to 2.0, and angle the light so it points onto the ground outside the door. In the Far Attenuation section, set End to 1200. Set the Area Shadows size to 10 and Subdivs to 16. Refer to the following illustration.

The interior of the room through the closest window needs to be visible, so we will light it.

8-20 Lighting 53. Create a VRayLight with the Spherical option and position this light inside the house to illuminate the part of the house seen through the closest window (or merge VrayLight Room from Ch0806.max). 54. Set its Radius to 60 and its Multiplier to 41.0, and rename the light to VRayLight Room. 55. Place an Omni light near the pier. Use the same values for Color and Multiplier as you used for other Omni lights from this exercise. In the Far Attenuation section, set End to 850. This will create a feeling that there is a lantern on the pier that is creating additional illumination. In order to add more lights to the scene, lets simulate small lights from fireflies. 56. Create an Omni light and position it near the ivy plant. Set the color swatch to lime green (RGB: 220,250,125), set the Multiplier to 8.0, and in the Far Attenuation group set Start to 1.68 and End to 37.0. Rename this light Omni Firefly. Refer to the following illustration.

57. Create a few more copies of Omni Firefly with the Instance option, and position them near the ivy and in the grass to simulate more fireflies. Refer to the following illustration.

Lighting 8-21
58. Set the output file to Illumination.png (48 bit). Remove all elements from the Render Elements tab. 59. Save your file. You can open Ch08-06.max to compare your results. 60. Render the camera view. The resulting rendering should look similar to the following illustration, showing only the attenuated lights.

All that is left to do now is to add this rendering as an additional layer in Photoshop. 61. Open Night_Scene.psd in Photoshop and add Illumination.png as the top layer. Rename this layer Illumination.

62. For this new layer change Blend Mode to Screen, and use the Curves, Level and Color Balance tools to adjust the layer until you are satisfied with the result. There are many more adjustments you can make to these layers to make different effects. To increase the brightness of the attentuated lights, you can duplicate the Illumination layer. You can also apply a Blur effect to the duplicated layer to add a soft glow to each light. You can also make the light from some windows brighter or change the light colors.

8-22 Lighting In the following illustration, you can see the before and after results of our adjustments to the rendering.

63. Save file as Night_Scene.psd. It is important to remember that every time you conduct a render, the rendering will fall into one of two categories: a test render or a production render. If you are not producing the final rendered image, then you are undoubtedly performing a test render to test something. Whenever you conduct test renders, you should always strive to configure your 3ds Max and your rendering program to render as quickly as possible while still providing the minimum level of quality needed to see what it is youre testing. Throughout this chapter, we have rendered with good test render settings. If at any point you were satisfied with a test rendering and wanted to produce the final rendered image (or a layer of the final image), then we recommend switching to production settings. The following is a small but effective list of the most critical quality settings that we recommend you use for production renders: Image sampling = Adaptive subdivision, Min/Max = 2/5, Clr thresh = 0.005 Irradiance map = High preset Light cache = Subdivs = 1500, Use Light cache for glossy rays Adaptive Amount = 1.0 Noise thresh = 0.01

Lighting 8-23
For Step 4 we will create a volumetric effect on the most prominent artificial lights, the light behind the closest window and the light shining out the door. Setting up volumetric lights is a relatively quick process. For this we dont need all objects in the scene, just the ones that will be affected by the volumetric light. 64. Open Ch08-07.max. This scene has all the objects required for the volumetric light effect: lights, house, ivy plant, door, ground, camera, and a few other objects. To create the volumetric light effect, we do not need Global Illumination or Reflections, so you can disable these functions. 65. Open the Render Setup window, and under the V-Ray tab in the V-Ray:: Environment rollout, turn off the GI Environment (skylight) override and Reflection/refraction environment override options. 66. In the Indirect illumination panel of the Render Setup window, turn off the On checkbox to deactivate the GI calculation. With these settings, when we render we will see only the volumetric light effect. Now, we will set up the two volumetric lights. 67. Select the Spot From Door light and change its shadow type from VRayShadow to Shadow Map. VRayShadows is not currently compatible with Volume Lights.

68. Open the Environment and Effects dialog box (shortcut=8) and in the Atmosphere rollout, click Add and select Volume Light from the Add Atmospheric Effect dialog to add it to the Effects list. 69. In the Volume Light Parameters rollout, click the Pick Light button and pick Spot From Door light from the scene. Set the parameters as shown in the following illustration.

70. Select the Omni Room light in the scene, and change its shadow type to Shadow Map. 71. In the Environment and Effects window add another Volume Light to the Effects list, click Pick Light and pick Omni Room in the scene. Use the same settings you used for the Spot From Door volume light, but set Start = 100 and End = 150 in the Attenuation section. Refer to the following illustration.

8-24 Lighting 72. Do a test rendering. In this rendering we see one area that needs to be corrected. See the following illustration.

The problem with this area is that that the house interior seen through the window is light when it should be black. We will fix this by placing a Plane in the room to limit the volumetric light effect. 73. Create a Plane object and position it inside the house as close to window as possible, but behind the Omni Room light. 74. Open the Object Properties dialog for the Plane, and disable the Apply Atmospherics option.

As a result, the Plane object is visible to the camera, but the volumetric light effect is not affecting it. 75. Render the image again. The area around the same window should look similar to the following illustration.

Lighting 8-25
76. Save the rendered image as Volume_Light.jpg. 77. Save your file. You can open the file Ch08-08.max to compare your results.

78. In Photoshop, open Volume_Light.jpg and copy it into Night_Scene.psd as a new layer. Change the new layers name to Volume Light and move it to the top of the layers list. Set its Blend Mode to Screen with Opacity = 73% The final structure of the layers in Night_Scene.psd should be similar to the following illustration.

8-26 Lighting The final image should look like the following illustration.

The advantage of rendering several layers is that each layer can be adjusted separately, allowing very precise control of the final images look. The image looks clean and error-free even with low render settings. A very important point that can be taken from this is that when you build more detail into your scene, whether structurally or through materials, you do not need to use such high quality render settings especially GI. If you look close enough at the final rendering, you can probably notice erratic or incorrect lighting; however, there is so much going on and so many colors bouncing around that you could never notice them if you werent familiar with the production process. This method might also be the only solution for rendering large and complex scenes such as this one. The only drawbacks are that you need to spend extra time setting up the lighting over several stages, and also that you end up with multiple rendered layers that you need to keep organized for compositing.

Lighting 8-27

Summary
Lighting in any 3D application is as much of an art as it is a science, and most would argue that the importance of good artistic skills outweighs the importance of good technical skills. Learning the technical side of a lighting program like V-Ray requires nothing more than good instruction and focus on the part of the student. Unfortunately, learning the artistic side of good 3D lighting is much more difficult and takes far longer, regardless of the quality of instruction or focus of the student. We could only scratch the surface on whats possible with 3D lighting, but hopefully, this chapter provided you with a little bit of inspiration to try to improve on the different aspects of lighting. In the final chapter of this book, we will build on some of the techniques discussed in this chapter and really get into some advanced concepts for producing the final product.

ChapteR 9

Rendering

F or the Final chapter oF this book , we will cover rendering and post production in more detail. These two processes depend a great deal on one another, and it is important to understand how they work together. Rather than spending enormous amounts of time doing multiple test renders and trying to achieve the look you want in 3ds Max with countless adjustments and tweaks, it is far easier to make fine adjustments in post production, and youre more likely to get exactly the results you want. You saw some examples of this in chapter 8, where we made fine adjustments to the rendering in Photoshop to enhance the lighting. It is much faster and more effective to use Curves, Color Balance, Levels and other tools in Photoshop, After Effects, or whatever post-production software you use, than to try and make it work exactly right within 3ds Max. You can also facilitate the post-production process by rendering masks in 3ds Max when needed.

Figure 9-1. The finished rendering

9-2 Rendering Certain material properties lend themselves to post production adjustment. Two examples are reflection and refraction. You can use Render Elements to render out separate layers for reflection and refraction, and then adjust these layers independently to get the look you want. Motion blur, depth-of-field, and lens effects can be added in 3ds Max, however you can also add these same effects with a video editing program like After Effects in a fraction of the time. The result will be the same, but the time required to produce these effects will be much less. For effective realism, it is important to add atmospheric and lens effects, color tonality, saturation, and contrast, all of which occur naturally in a real-life photo or video. Achieving such effects is very hard and sometimes even impossible without post production. Another example is a glow effect. Glows are both an atmospheric effect and a lens effect at the same time. A glow might be emitted by a self-illuminated object (lamp, sun) or a bright surface that bounces light, for example a large white wall or smooth stone steps lit by bright sunlight. Such an effect is very hard to achieve properly in a rendering without a lot of careful work or additional plugins, but in post production this is a very easy task. Glows can also be caused by reflections. The sun or another bright light source can reflect off the surface of leaves, water, glass, or other objects. In a rendering, distribution of the highlight over a reflective surface can be controlled by material properties, and the specular element can be rendered out separately. Then any atmospheric glows caused by the highlight can be closely controlled in post production by tweaking the strength of the specular layer only. To create the effect of caustics, its better to generate the effect in a separate scene using only objects that participate in the caustics effect. Then the caustics can be added to the image as a separate layer during the post-production stage. In some part of the scene, youll have textures that are too sharp or not sharp enough, or the color of the light wont match the time of day, or some geometry wont look perfect. You can compensate for all these things with photographic and film effects in post production. For example, an object in the foreground can have relatively low detail when the object is blurred by depth of field or motion blur effects. If you try to produce the final product completely in 3ds Max, achieving realism can be difficult. There are times when youll absolutely need to add or perfect your motion blur, depth of field, and volume light effects directly in 3ds Max, but these cases are the exception rather than the rule. An intelligent post production process is especially important in animation projects. In order for V-Ray to make the highest quality animations with moving objects, the Brute Force method needs to be used, but this method is very time-consuming. Since any animated scene contains a number of still objects too, you can save time by rendering these static objects separately with the Irradiance map and Light cache engines and then render just the animated objects with Brute force. Then you can combine everything in a final rendering pass. With all these options, an image rendered in 3ds Max is just a starting point for the final image. Its very rare that a rendering straight from 3ds Max wont benefit from post production. The Post Production section of this chapter uses the ReelSmart Motion Blur plug-in for Adobe After Effects from RE:Vision Effects. A trial version of the ReelSmart plug-in can be downloaded at http:// www.revisionfx.com.

Rendering 9-3

Rendering
In this section, we will go over rendering settings and render elements.

Exercise 1: Render settings


1. Open the file Ch09-01.max from the supporting files.

NOTE: Due to the size and complexity of this scene, we have globally disabled the Hair and Fur feature found in the Environment and Effects dialog box, as well as the Displacement feature found in the Global Switches rollout of the Render Setup dialog box. These two features will dramatically impact render times and RAM consumed. If at any time you want to enable these features, we suggest doing so carefully. After globally turning these features on, you may find it helpful to turn them off on individual objects as necessary. This scene was adapted for rendering on a computer with 8GB of RAM. Besides disabling these two important features, we have also reduced the Hair Count parameter significantly so that when the Hair and Fur feature is used, it can be handled by less powerful machines. On some objects, we have also disabled the VRayDisplacementMod modifier in the Modifier Stack and added a Displace modifier to replace it, using the same bitmap in the Bitmap slot. You can switch back to the original modifier at any time if you like. In order to handle this scene efficiently, we will divide the objects into five areas. Main objects (house, creek, trees, grass, garden, etc.) Foreground objects Waterfall Background Masks The scene contains three layers: Middle, Waterfall, and Grass Front. The Grass Front layer is currently hidden. The Waterfall layer contains the VRayProxy_waterfall and VRayProxy_spray objects, which are invisible to the camera. The Middle layer contains all the main objects to be rendered. Lets start with the render setup. Note: if you do not want to cover the setup and explanation of the V-Ray render settings used in this chapter, you can skip Exercise 1 and continue with Exercise 2, which deals with the setup of Render Elements. 2. Open the Render Setup dialog box, and on the Common tab, set the Width to 2000. You can use an even lower resolution if you feel that your workstation is not powerful enough to handle this resolution.

The value for the Image Aspect needs to be set in such a way that all important objects appear within the frame. Through experimentation we found that an Image Aspect of 1.805 works best. 3. Set the Image Aspect to 1.805 and lock it.

9-4 Rendering 4. Go to the V-Ray tab. In the V-Ray:: Image sampler (Antialiasing) rollout, set Type to Adaptive DMC, as shown in the following illustration.

This type of image sampler is the most commonly used for production renders (not test renders), and is recommended for scenes with high levels of detail (structurally and texturally), and for renderings with depth-of-field, motion blur, and glossy reflections. Image sampling is controlled with settings in the Adaptive DMC image sampler rollout under the V-Ray tab, and in the DMC sampler rollout under the Settings tab. 5. Disable the Antialiasing filter by turning off the On checkbox in the Antialiasing filter group.

The antialiasing filter smoothes, or blurs, the edges between pixels and gets rid of jagged edges, but it can also cause noise and other artifacts in a rendered animation. Using this filter greatly increases rendering time, and most of the time you wont need it. An example of when you might need it is for a product shot for a magazine advertisement, or for renderings with a resolution under 2000 pixels. Antialiasing can add photorealism, but in this case we dont need it, and we want to save render time. To compensate for the absence of the antialiasing filter, you can use any number of tools during post production. For example, in Photoshop you can use various Sharpen filters to achieve a result identical to using the antialiasing filter for rendering. You will see how this works in the Post Production section of this chapter. 6. In the V-Ray:: Adaptive DMC image sampler rollout, set the parameters as shown in the following illustration.

The Adaptive DMC image sampler calculates the difference in color between adjacent pixels using a variable number of samples. Based on this information, it creates the image. The Min subdivs and Max subdivs values determine the minimum and maximum number of samples per pixel. Values greater than 1 are rarely used for Min subdivs unless the image has thin lines or very small objects. The Max subdivs value, in effect, controls the level of detail seen in objects and textures. Good levels of detail can be achieved by increasing the Max subdivs value, as we did here. Lower values for Max subdivs will decrease the render time, but can add noise and artifacts to thin lines and object edges. Remember that in a rendering of an animation, sharpness of object edges is often not required. 7. Go to the V-Ray:: Color mapping rollout. Set Type to Reinhard, and set the Burn value to 0.55.

Rendering 9-5
In chapter 8, we explained why we chose this type of color mapping and how we chose the Burn value. 8. Turn on the Sub-pixel mapping and Clamp output options.

The Clamp output option cuts off the higher end of the color spectrum in the image, allowing you to get correct antialiasing along the highlighted edges of bright objects. If you keep Clamp output turned off, you might get very sharp edges that create an illusion of bad antialiasing even when antialiasing settings are high. Using Sub-pixel mapping and Clamp output together will help avoid these problems.

9. Go to the Settings tab of the Render Setup window. Go to the V-Ray:: DMC Sampler rollout and set the parameters as shown in the following illustration.

The settings in the V-Ray:: DMC Sampler rollout control all blurry effects, such as glossy/blurry reflections and refractions, GI, motion blur, area shadows, effects, etc. The Adaptive amount parameter, ranging from 0 to 1, controls the quality of the blurring effects. The closer the value is to 0, the higher the quality of the blurring effects, but the longer the scene will take to render. Conversely, a value of 1 takes less time to render, but will likely introduce noise to the rendering and the overall quality of the image will be lower. The Noise threshold parameter, ranging from 0 to 1, sets automatic detection of when the blurring effects are good enough. Lower values tolerate less noise and make a better rendering, but take longer to render. This assumes that enough samples are taken for any given setting in question. You will always want to balance the Adaptive amount and the Noise threshold values to keep render times within reason while still getting a good result. From our experience, we know specific combinations of Adaptive amount and Noise threshold settings that work well for our projects. In the following illustration you can see the most common combinations that we use for production.

The Min samples value sets the minimal number of pixel samples to use with the blurring algorithm. Higher values correspond to a better result with slower render times. The Global subdivs multiplier value can be used to quickly increase or decrease the effects of all other values in this rollout. We rarely change these two values in practice.

9-6 Rendering 10. Go to the V-Ray tab, and in the V-Ray:: Environment rollout, enable the On checkbox for GI Environment (skylight) override. 11. Change the color of the GI Environment (skylight) override swatch to (RGB 127,137,214). Set Multiplier to 2.0. Refer to the following illustration.

These parameters provide one of the many ways of implementing skylight in V-Ray and define the color and intensity of the skylight.

12. Enable the On option for Reflection/refraction environment override, set color to (RGB 104,166,235), and set Multiplier to 3.0. Refer to the following illustration.

The Reflection/refraction environment override parameters define the color and intensity of environment light reflected or refracted by the objects in the scene. You can use a bitmap to set the color, but if you do so, you will need to use an Output map with it to set the intensity as the Multiplier parameter doesnt work with bitmaps. This technique was covered in Chapter 8. Next, we will set up Indirect illumination. Indirect illumination adds to the realism of the overall scene by simulating real-life light behavior. Global illumination in any rendering software is nothing more than an approximation of what happens in the real world when light bounces from one surface to another. However, with good settings, the approximation can be highly accurate. 13. Go to the Indirect illumination tab of the Render Setup dialog box and enable the On option. 14. Select Irradiance map as the Primary bounces GI engine. 15. Select Light cache as the Secondary bounces GI engine and set the Multiplier to 0.95. See the following illustration.

Primary bounces approximates GI bouncing off a point visible by the camera, or off visible reflective or refractive surfaces. Secondary bounces approximates GI bouncing off surfaces not directly visible by the camera. The GI engines selected here are the ones usually used for architectural visualization. The Irradiance map engine calculates the lighting for various points in the scene and then interpolates the result for the rest. The process is efficient and reasonably accurate, but some detail can be lost or blurred due to interpolation. In addition, the Irradiance map engine is prone to giving incorrect results for animation.

Rendering 9-7
The Light cache algorithm traces rays from the camera and calculates the approximate GI in the scene. It is easy to set up and fast to render. The Multiplier parameter determines how much each type of bounce contributes to the final images illumination. Lets set up the Irradiance map. 16. In the V-Ray:: Irradiance map rollout, set Current preset to Custom. 17. In the Basic parameters group, set parameters as shown in the following illustration.

The Irradiance map engine takes samples over several passes, starting with a lower resolution pass and ending with a higher resolution pass. The starting and ending resolutions are determined by the Min rate and Max rate respectively. With each pass, the resolution is doubled until it reaches the Max rate. For example, if Min rate = -3 and Max rate = -1, the Irradiance map will be calculated in three passes corresponding to -3, -2, and -1. For each pass, the Irradiance Map engine uses a scaled-down resolution of the final image to represent one irradiance map pixel. For example, if the Irradiance map rate is -3 for the current pass, V-Ray scales the final image down so that 64 pixels of it will be represented by 1 irradiance map pixel, and then calculates the illumination for that pixel. For a rate of -2, V-Ray scales the image down so 16 image pixels are represented by 1 pixel of the irradiance map. For -1, V-ray scales the image down so that 4 pixels of the image are represented by 1 irradiance map pixel. At a value of 0, V-ray does not scale the original image down; it calculates the irradiance map with a 1:1 scale ratio. In addition, V-Ray compares the calculated light values for each pass, and might calculate additional pixels from each group if there seems to be too much difference between the values. You should lower the Min rate when you render a higher resolution image. For example, if Min rate = -3 and Max rate = -1 work fine for a rendering at a 800x600 resolution, then for the same rendering at 1200x1024, you can use Min rate = -4, Max rate = -1. This is because increasing the resolution of the output image will cause the same area of the 3D scene to be represented by more pixels. The HSph. subdivs (Hemispheric subdivisions) parameter controls the number of rays cast by each virtual hemisphere that sits on top of every irradiance map sample taken. Lower values speed up render time but can produce splotchiness. Higher values produce a much smoother result. In general, 35 is enough even for interiors, and it is more than enough for exteriors. The Interp. samples parameter controls the number of GI samples that will be used to interpolate indirect illumination at any given point. Higher values will blur details, but the result will look smooth; lower values yield higher detail but can cause splotchiness if the HSph. subdivs parameter is set low. There is no need to change the Color threshold, Normal threshold and Distance threshold parameters. The parameters in the Advanced options group are optional and do not need to be changed. The Light cache is another engine used to approximate global illumination in a scene. It is very similar to photon mapping, but without many of its limitations. The light cache is built by tracing many rays from the camera and bouncing them around. Each bounce stores the illumination from the rest of the path into a 3D structure. We will discuss this more later.

9-8 Rendering Usually, for production renders the Light cache settings can be left at the default of 1000, especially when its used for secondary bounces. For our exterior rendering, the Subdivs parameter can even be lowered to 500. Subdivs represents the square of the number of rays sampled. Therefore, doubling this value will cause the Light cache to take four times as long to render. 18. In the Light cache rollout, change Subdivs to 500. 19. Enable the Show Calc phase option so that we can see the Light Cache as its being calculated.

20. Enable the Use light cache for glossy rays option. If this option is on, the light cache will be used to speed up the calculation of glossy reflections and refractions. Irradiance map and Light cache solutions can be saved and reused later. Sometimes you will need to rerender all or part of the image due to small changes in texture or geometry, for example when you change a textures brightness or color. However, when the changes or small enough, you can save time by reusing the previous calculations for primary and secondary bounce. Large surfaces with displacement can drastically slow down GI calculation. To speed up the rendering of a scene with large amounts of displacement, a good technique to use is to disable displacement during the GI calculation, and then re-enable it during the rendering of the final image. To do this, within the Global Switches rollout, disable the Displacement option and enable the Dont render final image option, as shown in the following illustration. Once the GI is calculated and saved, you can turn these options back on. Note, however, that with large displacements, the lighting of the displaced surfaces can look poor, so this technique should be used with caution and only on surfaces with small displacements. We have not incorporated this technique to the exercise, but you can do so to save further time if you like.

Regardless of whether you turn off displacement during GI calculation, we recommend that you develop the habit of saving all GI calculation results so you can reuse them anytime you want to. 21. Go to the Indirect Illumination tab and then go to the V-Ray:: Irradiance map rollout. In the On render end section, turn on Auto save and use the Browse button to choose a path where you want to save the Irradiance map file. Use the filename Middle.vrmap.

This will save the GI solution for the primary bounce calculations at the end of each rendering.

Rendering 9-9
22. Go to the V-Ray:: Light cache rollout, and in the On render end group, turn on the Auto save checkbox. For the filename, use Middle.vrlmap.

Note that for the Irradiance map, the file extension is .vrmap, and for the Light cache file it is .vrlmap. These extensions will be important later. Be sure to keep the Dont delete checkbox turned on so that V-Ray will keep the GI solution file in memory until the next render. If you turn off this option, then V-Ray will delete the GI solution from memory every time the render ends, and you wont be able to save it to a file. Instead of having V-Ray save the GI solution automatically, you can also save it manually after the calculations are complete. During the rendering process, the secondary bounces are calculated first, followed by the primary bounces. Then, the primary and secondary bounces are combined as a full GI solution, and then the final image is rendered. After the primary and secondary bounce calculations are finished, you can save the GI solution even if V-Ray is still rendering the image. If you cancel the rendering process, V-Ray holds the GI solution calculation in memory until you restart the rendering, load a new 3ds Max file, or click the Reset button in the V-Ray:: Irradiance map rollout. To save the GI solution calculation, click Save in the Mode group of the V-Ray:: Irradiance map rollout.

The availability and size of the GI in memory is indicated by the number of samples and the size of the GI solution shown at the lower right of the Mode group. With experience, you will learn to evaluate whether the solution is going to be enough for your rendering. You can save the GI solution in two ways. You can either save each of the Light cache (secondary bounce) and Irradiance map (primary bounce) files, or you can save only the Irradiance map file and use that alone. Lets look at how this could work. V-Ray calculates the secondary bounces first, and then it calculates the primary bounces. When V-Ray calculates the primary bounces, it incorporates the Light cache solution into the primary bounce solution with the extension .vrmap. For this reason, after the calculations are complete, you can turn off the secondary bounce file and just use the primary bounce file. However, by leaving the Light cache file on, you can take advantage of a great feature found in the Light cache called Use Light cache for glossy rays. This feature allows V-Ray to take information directly from the Light cache file, thereby speeding up the rendering of blurry reflections and refractions, sometimes dramatically. We will discuss how to load GI solution files later when we render an animation. Now lets look at some system resource management features. Because the scene contains a large number of objects and polygons, rendering this scene can take a significantly long time. For this reason, some settings may need to be adjusted in the System rollout of the Settings tab, depending on your hardware.

9-10 Rendering 23. Go to the Settings tab and open the V-Ray:: System rollout.

Without going into a deep analysis of raytracing theory, lets take a look at the most important and commonly used parameters in the Raycaster params group. Default geometry: V-Ray supports four raycasting algorithms, all of them based on the BSP tree method, but with different applications. There are different algorithms for still geometry, geometry blurred by motion, static geometry, and dynamic geometry. The Default geometry setting defines the algorithm used for standard 3ds Max objects. The three options are Static, Dynamic and Auto. The only difference between them is the way V-Ray utilizes computer memory. With the Static option, at the beginning of the rendering process, V-Ray preloads all geometry into an internal structure to speed up calculation, and keeps the geometry in memory until the frame has been rendered. This is not always good if the scene has a large number of objects and polygons. In this case, the render might take a very long time or might not start at all, so in very large scenes or with too little available RAM, it may be better to use the Dynamic option. With the Dynamic option, V-Ray loads and unloads geometry from memory during the rendering process as needed. Objects are loaded into memory as they come into view or are needed for other calculations, then they are unloaded when they are no longer needed or visible. This approach conserves memory when rendering a scene with a large number of high-poly objects. There are three types of objects that are always treated as dynamic geometry regardless of the settings used in this rollout. They are objects that use the VRayDisplacementmod modifier, VRayFur and VRayProxy. The Auto option causes some objects to be treated as Static and some as Dynamic geometry. As the objects are loaded into memory as Static geometry, if V-Ray runs out of RAM it will automatically convert objects into Dynamic geometry, starting with the highest polygon objects first. 24. Set Default geometry to Dynamic.

Lets continue looking at the parameters. Dynamic memory limit: This is the limit for memory allocated for dynamic geometry. During the render process, when dynamic geometry is continually loaded and unloaded from memory, the default value of this parameter might be too low, in which case the rendering process might go very slow or freeze altogether. If you have a multi-processor computer, this memory is divided among all processor cores in the system. For example, if you have a four-core processor and the Dynamic memory limit is set to 400, then each core can only use 100MB of computer memory to load and unload dynamic geometry. We recommend that you set this value to 60% of the total memory available in the system. For example, if you have 8GB of RAM, set he Dynamic memory limit to 4800 MB. That is the value we will use here.

Rendering 9-11
25. Increase the value of the Dynamic memory limit parameter to 4800. Refer to the following illustration. 26. Save your scene.

The basic render settings are now set up. Now lets look at some settings that will help us prepare for post production. To make post production as easy as possible, we will render out a number of masks. The easiest way to do this is to use the Render Elements tab and select from a series of preset render elements. The list of V-Ray render elements has everything you need to assemble the final image without having to use the actual rendering from the scene. We will render masks for three groups of objects: background, middle (mid ground), and foreground. When rendering elements, the rendering process can take a little longer than rendering the final image without render elements, depending on the number and type of elements that you select. The number of render elements required is usually not large. Some of the most widely used are VRayLighting, VRayReflection, VRayRefraction, and VRayZDepth; however, we extended the list of elements used in this chapter to demonstrate more options in post production.

Exercise 2: Setting up Render Elements


1. Continue from the previous exercise with your saved file or open the file Ch09-02.max. 2. Go to the Common tab of the Render Setup dialog box, and in the Render Output section, click the Files button.

3. In the Render Output File window that appears, set the path where you want your file to be stored. Name the file Middle, and set the file type to PNG. The Setup button is now available.

9-12 Rendering 4. Click Setup, and set the parameters for the PNG file as shown in the following illustration.

In the Colors section, you can choose the color depth of the image. RGB 48 bit means the image will have 16 bits for each channel (Red, Green, Blue). We will use this setting to give us the maximum amount of color information, so that adjustments to these images can be performed with greater precision. 5. Click OK to confirm the parameters, and then click Save. Now lets add Render Elements. 6. Go to the Render Elements tab and click the Add button. The Render Elements window will appear.

7. On the list of available Render Elements, highlight elements that you want to add to the rendering. Hold down Ctrl to select multiple elements. The elements you need to highlight for this exer exercise are as follows: VRayGlobalIllumination Diffuse surface global illumination. Simply speaking, this is the result of the global illumination calculation. With this element, you will be able to adjust the GI lighting on all or part of the image.

Rendering 9-13
VRayLighting Diffuse direct surface lighting. This element will only show geometry that is lit by direct light, excluding reflection/refraction. GI will not be present in this render element. VRayReflection Surface reflection. In this element, you will only see the reflections. VRayRefraction Surface refraction. With this element, you will be able to control the transparency of refractive objects. VRaySpecular Renders the surface specular highlights. With this element, you will be able to increase or decrease highlights from light sources. VRayWireColor Displays the wire color of the object in the 3ds Max scene as a flat color. Since each object in the scene will have a different color, you will be able to use this element to create a mask for any object when needed. VRayZDepth The z-depth of the surface, displaying information about how far objects are from the camera in the form of a grayscale image. For example, this element can be configured so that the closer an object is to a camera, the brighter it is in the image. This render element can be used to make a mask for effects that vary depending on distance from the camera, such as depth of field and fog. Refer to the following illustration for the list of the Render Elements you need to select. V-Ray will automatically assign the paths, filenames, and formats for the render elements, based on the filename and path you specify under the Common Parameters. To save hard drive space, you can change the file formats for some elements. For example, you can change the file format for VRayLighting, VRayWireColor and other elements that dont require alpha channels to JPG format. For most elements, the 24 bit JPG format is enough to support the color correction process that well do later in post production. Changing the file format to JPG is especially important when you render animations, and want to avoid filling up your hard drive with numerous large files unnecessarily. As long as you set the quality of the JPG high enough (at least 95), the reduction of quality will almost always be undetectable.

8. In the Render Elements list, select VrayZDepth. In the VRayZDeph rollout, set zdepth min = 0.0 and zdepth max = 8000.0.

The zdepth min and zdepth max parameters set the distance pointing into the scene that V-Ray will use to generate the Z-depth map, and will set the gradient from black (back of scene) to white (front of scene) using this range. Zdepth min = 0.0 indicates that the range starts at 0 distance from the camera and zdepth max = 8000.0 indicates that the range ends at a distance 8000 units from the camera. It is important to set the zdepth max value correctly so the map will use the widest possible depth range, and will give you a decent range of grayscale values to work with. The following illustration shows an example of such an image.

9-14 Rendering

9. In the Selected Element Parameters section of the VrayZDepth element, click the icon with three dots to open the Render Element Output File dialog box. Click the Setup button to open the PNG Configuration dialog box, and turn off the Alpha channel option. Click OK and then Save.

10. Make sure the Elements Active in the Render Elements rollout is turned on. Otherwise, the Render Elements won't render. Note that the Display Elements checkbox does not affect the rendering of the render elements. The Render Setup settings are finished now. Next, we will perform a test render.

11. Within the Effects tab of the Environment and Effects dialog box, enable the Hair and Fur feature (enable the Active option). If you do not have a powerful workstation, we highly suggest turning off the Hair and Fur modifier for most (if not all) of the objects that use this feature. After you render the first time, you can then turn this feature back on for select objects and re-render until you determine the limits of your workstation. 12. If you rendered the Light cache and Irradiance map files separately as mentioned earlier, make sure you uncheck the Dont render final image checkbox under V-Ray:: Global switches. 13. Save your scene and render the camera view.

With all Hair and Fur modifiers enabled and with all the Hair Count settings set to their original amounts (as discussed in all previous chapters) your rendering should look like the large image in the following illustration. If you render with the Hair Count settings established for this scene, you will see just a fraction of the hair.

Rendering 9-15
If your scene crashes or takes an excessively long time to render, we suggest using some scene optimization techniques discussed throughout this book. To reduce render time, you can change your image sampler and DMC sampler settings. The settings specified earlier in this chapter are production settings. Instead of using these, you could use lower quality settings that would normally only be used for early test renders. These settings are listed in Appendix A at the back of the book, and are the 3DATS suggested test render settings. To further reduce render time, you can reduce the output size of your rendering or render your scene in regions. To greatly reduce RAM consumption, use lower resolution maps as discussed in the introduction section at the front of this book.

In the next step, we will render the area directly in front of the camera. All of the objects in the foreground are in a layer named Foreground, which is currently hidden. Objects in the Grass front layer are low-resolution objects; however, this is fine because they will be blurred with a depth-of-field effect. Because the grass in the front will be treated separately from the grass in the middle, the render elements for these two areas will be rendered separately. Also, the large hair count would make it difficult to render these two areas at the same time. 14. Continue with your file or open the file Ch09-03.max. 15. Open the Layer Manager dialog box. Hide the Middle and Waterfall layers, and unhide the Grass front layer.

9-16 Rendering

16. Disable all lights except Direct Sun. The easiest way to do this is to use Light Lister for V-Ray, a MAXScript available for free at www.scriptspot.com. This tool allows you to control not only Standard lights but VRayLights lights as well. Another way, when your lights are hidden (when you turn the layers off), you can disable the Hidden lights option in the Lighting section of the V-Ray:: Global switches rollout. 17. Open the Render Setup dialog box and in the Common tab go to the Render Output section. Change the name of the Output File to Foreground.png, and set the file type to PNG using the RGB 48 bit and Alpha channel options. The names of all the Render Elements assigned to this rendering will change accordingly. 18. Save the scene and render the camera view. The result should look similar to the following illustration.

Next, lets render the waterfall. We will do this separately from other objects. The waterfall is in fast motion and needs to have a motion blur effect. The scene is very complex and it will take too long to render motion blur with V-Ray on this scene, so we will add motion blur during the post production stage using Adobe After Effects. Adding and adjusting motion blur in post production is generally much faster than rendering it in 3ds Max. In order to get one frame of the waterfall with motion blur, we will need to render a few frames of the animation. The post production software needs these frames so it can compare the motion between them and create the blur accordingly. 19. Open the file Ch09-04.max.

This scene has all the necessary objects and rendering settings for the waterfall and environment. The VRay_Proxy_waterfall and VRayProxy_spray objects are the waterfall objects that were prepared in Chapter 5. For this still rendering, we converted them into VRayProxy objects. Because we need to render only the waterfall, all the other objects in the scene should not be visible to the camera. They will be visible only for reflection and refraction purposes, and for casting shadows. 20. Select all objects in the scene except the lights, VRayProxy_waterfall and VRayProxy_spray. 21. Right-click in the active viewport and from the quad menu choose Object Properties. In the Rendering Control group, disable the Visible to Camera option and click OK. NOTE: You may first have to enable the Renderable option before being allowed to globally change all the selected objects.

Rendering 9-17

This will cause all selected objects to contribute to the environment by being reflected or refracted by the water, but they will not render in the image. In the scene that you set up earlier, the waterfall is present but not visible to the camera, and all its other render properties were not disabled. As a result it will be reflected on the surface of the water, and it will also affect GI and cast shadows. In the current scene we need to make the waterfall visible to the camera, but parts of the waterfall that are not seen in the rendering need to be excluded, for example the parts of the waterfall below the surface of the water. The same goes for objects that intersect with the waterfall geometry, particularly the water wheel and the gutter over which water flows to the water wheel. These objects must be visible to the camera, however the Alpha contribution parameter needs to be -1. As a result, the waterfall will have a negative Alpha in places where it intersects with other objects so we can composite the images afterward. 22. Select the objects that intersect with the waterfall: Tree01, Fountain01, Wheel, Water Level. 23. Open the Object Properties dialog box again, enable the Visible to Camera option and click OK. 24. With the objects still selected, right-click in the active viewport and choose V-Ray properties from the quad menu. In the Matte properties section, set Alpha contribution to -1.0. Click Close.

The selected objects now have a negative alpha value. These objects must be visible to the camera so their alpha settings will interact with the waterfall. We recommend that you remove Bump maps, Reflection maps, and other material properties that will slow down the rendering, because in this case we want only the geometry and textures for these objects. This approach will save render time. 25. Using the Material Editor, load the materials for the selected objects into empty sample slots and disable their Bump, Glossiness, Reflection, and Refraction maps. Do not disable any Diffuse maps.

9-18 Rendering Now lets prepare to render. 26. Open the Render Setup dialog box. Set the Render Output to Waterfall.png and set the file type to PNG with the RGB 48 bit and Alpha channel options. 27. Go to the Render Elements tab of the Render Setup dialog box. To the Render Elements list, add the VRayReflection and VRayRefraction elements, and make sure their output paths correspond to the main render output path.

These elements will be needed for additional post production. We also need to render 5 additional frames to use for calculating motion blur later on. 28. Go to the Common tab of the Render Setup dialog box and in the Time Output section, set the parameters as shown in the following illustration.

This will cause six frames to be rendered for the main image and render elements. To make the render faster, instead of rendering the entire image, you can render just the region that has the waterfall by using the Region option under Area to Render in the Rendered Frame Window. 29. Save the scene and render the six frames. The following illustration shows what one frame will look like. (It may not look like this in the viewport, but when you open the PNG files, this is how it will appear.)

Now, lets render the background image. 30. Open Ch09-05.max.

Rendering 9-19
This scene is also optimized and has VRayProxy objects. The Hair Count value for the Hair and Fur modifier on some objects was lowered significantly, although you can increase it if you want. You can set the render settings for this scene by yourself using the settings we used previously. Remember that the background will be slightly blurred so there is no need for high quality GI. Therefore, the GI parameters can be lowered if you want to save time. If you want to save additional time, you can even calculate GI only for primary bounces using Light cache. For the same reason, there is no need to increase the Adaptive DMC image sampler or the DMC sampler settings. 31. Open the Render Setup dialog box and change the render settings as discussed earlier. 32. For Render Output, set the filename to Background, and set the file type to PNG using the 48 bit and Alpha channel options. 33. On the Render Elements tab, add VRayLighting and VRayZDepth.

For VRayZDepth, we need to find the maximum and minimum distance from the camera for the zdepth min and zdepth max parameters. You can determine these distances using a Rectangle object created in the Top view. We need to set the zdepth max as the distance from the camera to the most distant object in the scene, and zdepth min as the distance from the camera to the closest object in the scene. Refer to the following illustration for zdepth min and zdepth max distances.

34. On the Render elements list, select the VRayZDepth render element. In the VRayZDepth parameters rollout, set the zdepth min and zdepth max values as just discussed.

35. Make sure the output path for VRayZDepth corresponds to the output path of the main image. 36. Save the scene and render the camera view. The result should be similar to the following illustration. When you render, you should see a black background; however, since we are saving the rendering as a .png file with an alpha channel, it will have no background at all. The background you see in the following image is actually the background created by flattening the image file for print.

9-20 Rendering

In the next step, we need to render masks. A mask is a black-and-white image used to hide or show parts of an image or to isolate a process so that it only affects part of an image during the post production stage. In post production programs, the white areas of a mask define areas where corrections will be applied, and the black areas define areas that will not be affected. A mask can be effectively used in both still images and animations. You can correct color, brightness, add reflections and much more, by using the masks generated by different Render Elements. Masks are great helpers in post production. They can be created from the VRayWireColor render element or you can render the masks separately using other tools. To render a mask, you need to assign a black color to all objects in the scene and disable all of the lights. You then select the object that requires the mask and apply a VRayLight material to that object. In this way, the object will render as white and all other objects in the scene will render as black. 37. Open the file Ch09-03.max and immediately save it with the name Ch09-Mask.max. We need masks for the ivy leaves and grass. Lets start with the ivy leaves. 38. Select all the objects and assign a pure black material to them. The material can be a VRayMtl or Standard, either one is fine. 39. Select the ivy leaves (ivy leaf00 and ivy leaf01) and assign the VRayLight material to them. Make sure the color is set to white and the intensity is 1.0 (the value next to the Color swatch). Enable the Emit light on back side option. Refer to the following illustration. When Emit light on back side is checked, objects can generate light on back faces as well as front surfaces.

40. Open the Render Setup dialog box and on the V-Ray tab, go to the V-Ray:: Global switches rollout. Turn off almost all of the parameters, as shown in the following illustration. This disables direct light, shadows, textures, transparency, and glossy effects in the material.

Rendering 9-21

41. On the V-Ray:: Environment rollout, turn off the GI Environment (skylight) override and Reflection/ refraction override, as shown in the following illustration.

42. On the V-Ray:: Color mapping rollout, set the exposure Type to Linear multiply. Make sure that both Dark multiplier and Bright multiplier are set to 1.0. Refer to the following illustration.

43. Go to the Indirect illumination tab and disable indirect illumination by turning off the On checkbox. 44. Go to the Render Elements tab and turn off Elements Active.

45. Open the Environment and Effects dialog box and change the Background color to pure black.

9-22 Rendering 46. Change the render output filename to Mask_ivy.jpg. 47. Save the scene and render. After you have rendered this mask, assign the pure black material that is assigned to all the other objects to ivy leaf00 and ivy leaf01.

As a result, you will get an image where all the ivy leaves are white and all other parts of the image are black. Now lets render masks for the grass using the same scene. As you remember, the grass in this scene is made with the Hair and Fur modifier. Although the shape and size of the grass blades vary, all the grass currently has the same texture and color. To add variety to the color, we will use a mask. We can add variety to the grass color by masking some grass instances as white, some gray, and some black. When we use such a mask to apply color correction to the grass, the grass instances masked with white will receive the most color correction, those masked with gray will receive partial color correction, and those masked with black wont receive any color correction at all. To create this type of mask we will use the MaterialByElement modifier. Because the MaterialByElement modifier cannot be applied to hair, we first need to convert the hair into geometry. Well look at how a mask can be created for one grass object, and then, using the same technique, you can create masks for all other grass objects in the scene. First, lets create the material. 48. Open the Material Editor and create a Multi/Sub-Object material named Multi-mask. Set the number of materials to 3 using the Set Number button, as shown in the following illustration.

49. For Material 1, use a VRayLightMtl material with Color set to pure white and the intensity multiplier set to 1. 50. For Material 2, use a VRayLightMtl material with Color set to pure white and the intensity multiplier set to 0.5. Refer to the following illustration.

51. For Material 3, use a VRayLightMtl material with the intensity multiplier set to 0. The material should look like the following illustration.

Rendering 9-23

Now, we will prepare the object that we will mask. As an example, we will use the object Grass_ Center. This object has the Hair and Fur modifier applied to it. Next we will apply this to just this one patch of grass, and upon successful completion, you can apply it to all the remaining grass objects. 52. Select the Grass_Center object, go to the Modifier Stack and select the Hair and Fur modifier. In its Tools rollout, click the Hair Mesh button. All the hair on the object will be converted into a single mesh object, turning the grass into geometry. 53. Delete the original Grass_Center object, as we only needed it to apply the Hair and Fur modifier to. Rename the new grass geometry that we just created Grass_Center. 54. Select the new mesh object and from the Object Properties dialog box, make it Renderable, and make sure it is set as Visible to Camera. 55. Apply the new material to the new mesh object and apply the MaterialByElement modifier to it. This modifier will allow you to automatically and randomly assign material IDs to elements of the selected object. As a result, the object will have several Material IDs that can be used by the Multi/ Sub-Object material. 56. In the MaterialByElement modifier's settings, set the parameters as shown in the following illustration.

The percentages you set under List Frequency define the percentage of elements that will be assigned each Material ID. In our case we want to assign 3 Material IDs, one each for white, gray, and black. Material ID 1 will be distributed over 40% of the elements, Material ID 2 will be distributed over 20%, and Material ID 3 will be distributed over 40% of the elements. You can also use the Random Distribution option to distribute the material IDs evenly and randomly throughout the object. If you choose this option, the randomization can be controlled by the Seed parameter.

9-24 Rendering 57. Using Render Output, change the output filename to Mask_grass.jpg. We dont want to save this as a .png file because we dont need to save an alpha channel.

58. Save the scene and render. If the patch of grass rendered properly (with gray variation throughout), repeat the process with all the remaining grass. If you render all of the grass with original Hair Count settings, it should look like the following illustration.

In this way, we can create a mask for a single object with multiple elements, or a mask for multiple objects such as the trees in the forest. Using this technique, you can add variety to the rendering by changing the color of trees, leaves, grass, and flowers in the scene during post production.

Rendering Animation
When an animated scene needs to be rendered, you need a strong plan based on preliminary test renders. Proper planning will allow you to render animations faster and with better quality. In general, render settings for animations are not very different from the render settings for still images. The quality settings are usually going to be the same, except maybe a few antialiasing settings and other settings that depend on output image size. But usually, antialiasing settings for animation need not be very high.

Exercise 3: Rendering the animation


For this exercise, we will create a 5-second sequence with an animated camera. Because this exercise is directed toward understanding concepts, there is no need to take the time to render the entire animation. 1. Open the file Ch09-06.max.

This scene only includes objects that are visible to the camera or that significantly affect the environment. The camera moves slowly for 5 seconds, and the grass is animated with the Hair and Fur modifier. Rendering an animation means rendering a series of frames. The Frame Rate (frames per second) that you use depends on the final format. For example, if you set the Frame Rate to NTSC, then you will have 30 frames per 1 second of animation. If you set it to PAL, then 1 second of animation will have 25 frames. NTSC is the standard used in North America, while PAL is used in Europe.

Rendering 9-25
2. Open the Render Setup dialog box and in the Common tab, set Output Size to PAL (video). This parameter will automatically set the render output size.

Now lets set the Frame Rate. To reduce the rendering time, well use the PAL frame rate of 25 frames per second rather than the NTSC preset of 30 frames per second. 3. Open the Time Configuration dialog box and in the Frame Rate section, choose PAL. Refer to the following illustration.

Now we will set the animation length and starting frame. Remember that the scene has an animated Hair and Fur modifier. In order for the grass to react correctly to dynamics like wind, it needs to be slightly bent at the start of the animation (as opposed to sticking straight up). The grass will need about 100 frames to get into a bent position, so the Start Time for your animation segment will be at frame 100. The animation is 5 seconds long, and it runs at 25 frames per second, so we will need 125 frames (5x25) for the actual animation sequence. Since the animation starts at frame 100, the End Time will be 225. 4. In the Animation section of the Time Configuration dialog box, set the Start Time to 100 and the End Time to 225. Click OK.

As a result, the Track Bar will have 126 frames (frames 100 to 225). In the scene, animation keys for the camera have already been placed on the Track Bar at frames 100 and 225. We animated the camera so that it starts to move on frame 100 and stops at frame 225, thus allowing the grass 100 frames to assume its starting shape. Previously, we went over the render settings for a still image. You could use the same antialiasing settings for the animation rendering as well, but to avoid errors you should use the settings from the following illustrations.

9-26 Rendering 5. Open the Render Setup dialog box and in the V-Ray and Settings tabs, change only the parameters shown in the following illustrations.

This restores the render settings to what we used previously for the still image. Now lets adjust some settings specifically for an animation rendering. Remember that rendering GI for animated objects is usually different from rendering still objects. For still objects you can use the faster and easier Irradiance map GI engine, but for animated objects you need to use the significantly slower Brute Force engine. Brute Force, which calculates GI by direct computation, is the most correct GI algorithm available, while the Irradiance map engine calculates GI by caching and approximating lighting. Calculation of GI for animated objects with the Irradiance map engine can cause objects to flicker due to sampling at different points on different frames. However, GI for some animated objects can be calculated accurately enough with the Irradiance map engine instead of Brute Force. In our scene, the waterfall has a transparent surface that changes dynamically, and we also plan to add a motion blur effect to this object, so any imperfections in the GI will not be noticeable. The same applies to the water surface. Because it is transparent and reflective, nobody will see small imperfections in the GI. This approach would not apply if there were distinct reflections of animated objects on the water surface. If the reflection is very distinct then the GI for the water needs to be calculated with Brute Force; if the reflection is subtle, then it can be calculated with the Irradiance map engine.

Rendering 9-27
In our case, the creeks water surface is not visible to the camera. Even if it were, the reflections are not strong. We performed a few tests and decided that the GI for this object can be calculated with the Irradiance map method. Based on this information, we can plan the rendering process. GI for objects using the Irradiance map engine will be rendered separately from the GI for objects using Brute Force. In our scene, the animated objects are the grass and the flowers. GI for these objects will be calculated with Brute Force, and for all other objects GI will be calculated with the Irradiance map and Light cache engines. Well start with the Irradiance map and Light cache. Lets analyze how the grass interacts with other objects in the scene. Grass should not participate in the GI calculation with the Irradiance map, but the grass needs to be reflected on the waters surface and cast shadows on it. This means the grass needs to be invisible to camera, and needs to be left out of the Irradiance map solution, but needs to be used for reflection and shadows. 6. Select the following grass and flower objects: Grass Left, Flower Center, and Flower Leaves. 7. In the Object Properties dialog box, turn off Visible to Camera and click OK.

The selected objects will not be visible to the camera. Now lets exclude them from the GI calculation. 8. With the same objects still selected, right-click in the active viewport and from the quad menu, select V-Ray Properties. 9. In the Object properties section, disable the Visible to GI option. Refer to the following illustration.

Now we will start working on the render settings. 10. Open the Render Setup dialog box and in the Indirect Illumination tab, enable the On option.

9-28 Rendering Remember that for Indirect Illumination, V-Ray first calculates secondary bounces, in our case using the Light cache engine. Then, based on the Light cache results, it calculates primary bounces with the Irradiance map. You can use the same approach manually to calculate the GI for animation in three stages: Stage 1 Calculation of indirect illumination with Light cache only. Stage 2 Calculation of direct illumination with Irradiance map only. Stage 3 Final image sequence rendering using the saved GI information. First, we need to assign the Light Cache GI engine for both primary and secondary bounces, calculate the GI solution, and save the Light cache map. Then assign the Irradiance map engine to primary bounces, use the saved Light cache file for secondary bounces, render a few frames, and save the Irradiance map file. Then use the saved Irradiance map file for primary bounces, and use the saved Light cache file for secondary bounces, make sure Use Light cache for glossy rays is enabled, and render the final image. Lets do this. 11. In the V-Ray:: Indirect illumination rollout, set Light cache as the GI Engine for both Primary and Secondary bounces.

12. Go to the V-Ray:: Light cache rollout and set Subdivs to 500.

The Scale parameter, currently set to Screen, determines the units V-Ray will use for the Sample size. Normally, for an animated camera, if your camera moves around your scene and your view constantly changes, it is recommended that you set Scale to World so that the sample size will be independent of the view and the quality will be the same throughout the image, no matter where the camera looks. However, the camera in this scene doesnt move in this fashion. Furthermore, the World option uses more memory, more disk space for Light cache files, and more time to render than the Screen option.

Rendering 9-29
In cases where an animated camera does not make many turns and the view shows mostly the same objects throughout the animation, we recommend that you use the Screen option for the Scale parameter. This is the option we will use in this exercise. If the camera makes a lot of turns and many different objects come into view as the camera moves, then it is better to use World units. One example is a home interior animation, where the camera travels along a long, twisting path from room to room. But if the camera makes only one or two turns as it follows the path, we would still choose Screen units for the Scale parameter to save render time. In this case, we recommend that you double or triple the Subdivs value, especially if you use Light cache for secondary bounces. Not many of our storyboards call for long camera paths with many turns and maneuvers. Short camera sequences tend to work better for conveying ideas, so we usually design short animations where the camera motion and direction change very little. Now, we will set the parameters for the Light cache calculation. 13. In the Mode section, change Single frame to Fly-through.

Single frame mode indicates that the Light cache will be calculated for each individual frame of animation. The Fly-through option calculates the Light cache for the only one frame of the animation, and uses the single calculation for the entire animation sequence. This is the preferred method. It does not matter which frame is currently active as the result will be the same regardless. 14. In the On render end section, enable the Auto save option, Switch to saved cache, and set the path where you want the Light cache file to be saved. Set the filename to Anim.vrlmap. Refer to the following illustration.

15. Make sure that the Don't delete checkbox is checked. The Switch to saved cache option automatically sets it to use the saved Light cache file.

16. Go to the V-Ray tab of the Render Setup dialog box, and in the V-Ray:: Global switches rollout, enable the Don't render final image option. This will cause the renderer to skip the actual rendering calculation pass, and calculate just the indirect illumination.

17. Go to the Common tab of the Render Setup dialog, and in the Time Output section, select the Single option. 18. Make sure Show calc. phase is enabled under the V-Ray:: Light cache rollout and rerender the camera view. Only the Light cache should be rendered.

After the calculation is finished, V-Ray will save the Light cache information into the file that you set in the Auto save parameters path field.

9-30 Rendering Now, we need to calculate the indirect illumination with the Irradiance map engine. 19. For Secondary bounces, leave it set to Light cache, make sure the mode is set to From file and that the saved file is loaded. Under Reconstruction parameters on the Light Cache roll-out, make sure Use Light cache for glossy rays is enabled. Refer to the following illustration.

20. Set Primary bounces to Irradiance map.

21. In the V-Ray:: Irradiance map rollout, use the parameters you used previously for the still image rendering, as shown in the following illustration.

22. Set the Mode to Multiframe incremental. This option causes a full irradiance map to be calculated at the first frame, and then additional samples to be added as needed during subsequent frames. This is the best option for scenes with static objects or objects where movement is insignificant. 23. In the On render end section of the V-Ray:: Irradiance map rollout, for the Auto save parameter, set the path where you want the Irradiance map file to be saved. Assign the name Anim.vrmap and make sure the Switch to saved map option is turned on. Refer to the following illustration.

24. Go to the Common tab of the Render Setup dialog box and in the Time Output section, select Active Time Segment and set Every Nth Frame to 125.

With these settings, the Irradiance map will be calculated every 125th frame, in this case, one of the first and the last frame. For other cases, when the camera moves faster and it shows many differ-

Rendering 9-31
ent objects and surfaces, then you might need to add samples more often by setting this value to something lower, such as 10, 40, 60, etc. In any case, you need to make sure that for every object that is visible to the camera at some point during the animation gets sampled by the irradiance map. 25. Click Render. If you get an error message, click Yes to continue. The Irradiance map will be calculated. Once the irradiance map is complete, all the Indirect illumination is ready, and all we need to do is the final image calculation. 26. If it is not already done so, set the Irradiance map Mode to From file and load the saved irradiance map. 27. Go to the V-Ray tab of Render Setup dialog, and in the V-Ray:: Global switches rollout, disable the Don't render final image option.

28. Go to the Common tab and in the Time Output group, make sure Active Time Segment is selected and set Every Nth Frame to 1. Now, every frame of the animation sequence will be rendered. 29. In the Render Output group, set the file path and filename for the render output. Choose PNG 48 bit with Alpha channel as the file type. 30. Save the scene and click Render. Previously, for the still image rendering, we added Render Elements. The same elements can be added for animation and used during the video post production process. When the rendering of the animation sequence is finished, rendering of the animated objects can be started. In this case, the render settings are much easier. But before we start rendering, we need to make the animated objects visible to the camera. 31. Select the animated objects Grass Left, Flower Center, and Flower Leaves. 32. From the Object Properties dialog box, enable the Visible to Camera option. 33. From the V-Ray properties dialog box, enable the Visible to GI option.

The animated objects are visible to the camera again and will participate in GI generation. Now, we need to make the other objects in the scene invisible. 34. Invert the selection, and make all selected objects invisible to the camera.

There is no need to disable GI for these objects. Now we need to use the Brute force GI engine instead of the Irradiance map and Light cache. 35. From the Indirect illumination tab of the Render Setup dialog box, select Brute force for Primary bounces and select None for Secondary bounces.

V-Ray will calculate indirect illumination for the primary bounces only. Secondary bounces are not needed as they would not be very noticeable.

9-32 Rendering 36. In the V-Ray:: Brute force GI rollout, set Subdivs to 30. This parameter, in conjunction with the Noise thresh. value in the DMC Sampler rollout, directly controls the quality of the GI. 37. Go to the Common tab of the Render Setup dialog box. Choose a new name for the render sequence and click Render.

If the camera is still but the objects in the scene are animated, it makes sense to use a single still rendering as the first layer in post production and overlay animated images over it. However, you cant simply layer the images without some masking. For example, the grass growing on the ground needs to visually cover up the ground itself and other objects on it, but on the other hand the grass needs to be partially hidden by the bridge, other grass, the ground, and other objects. If we simply place the grass layer over all other layers then the grass will cover everything, which would not be correct. Refer to the following illustration to see what it would look like if you simply placed the grass on top of all other layers.

To make the layers work correctly, a mask needs to be applied to the grass. If you apply the VRayLightMtl to the grass, and apply a simple black material to all other objects in the scene, the rendered mask can be applied to the grass. The grass will be seen only where the mask is white, and the grass appearance in the final image will be correct. Refer to the following illustration to see the image correctly composited with the mask applied to the grass layer.

Previously we explained how to prepare a mask for a still image. Using the same technique, we need to prepare masks for the animated objects. 38. Render each mask as a sequence, taking care to name the files correctly for each sequence. Later, we will discuss mask usage in more detail during in the Post Production section of this chapter. To overlay sequences and create the video composition for our project, we used Adobe After Effects. It is outside the scope of this book to provide every step we used in After Effects, but the concepts are amply described here, and the processes for still images are similar to those for video production. If you understand the most important image editing techniques, then your only obstacle to video post production is your understanding of the video editing software itself. The final animation produced for this book can be found in the books support files.

Rendering 9-33

Post Production
Post production is the last stage of working with the image. Its purpose is to make the image look as close to the initial concept as possible. This process includes working with the color range of the image, correcting the separated parts of the image, adding effects, accentuating important details, and fixing errors. We did the post production with Adobe Photoshop CS4 using the V-Ray render elements that we described previously in this chapter. We want to remind you that the scene that you used for the final rendering of the still images was optimized and simplified because the initial scene that we used in our production process was very heavy and used a lot of computer resources. To avoid any crashed or unexpected computer problems we simplified the scene. Specifically, we replaced the VRayDisplacement modifier with the Displacement modifier, we lowered the number of hairs for all Hair and Fur modifiers, and we lowered the resolution of some textures.

Exercise 4: Post production


For better visual demonstration in this exercise, we have supplied you with illustrations created from a highly detailed scene with a large number of hairs set with the Hair and Fur modifier and with the VRayDisplacement modifier in use. This means that the renderings shown here might be more detailed than the ones you create when following the exercise. For an understanding of postproduction approaches, the level of detail of the scene you use to follow along does not matter, but feel free to use our support files provided. Lets begin. First, lets correct the middle and foreground images. 1. In Adobe Photoshop, open the previously rendered image Middle.png. 2. Rename the single layer of this file Middle. Refer to the following illustration.

This image has many dark areas. We could correct this with various color correction tools such as Curves and Levels. But in this case, it will be better to use the VRayGlobalIllumination render element, which is an image of the GI only without direct light, reflections, or refractions. Using this render element, you can more effectively correct the lightness of the Middle layer. 3. Use File menu Place to place Middle_VRayGlobalIllumination.png in the image.

Before you place the image, you need to make sure that Photoshop is maximized and the entire image is visible. Otherwise, the image can be put in the wrong place and will require placement correction. 4. Press Ctrl+0 to bring the placed image to full size, then press Enter on the keyboard to set the image. 5. Right-click the new layer and choose Rasterize Layer. Rename this layer to GI middle and change its Blend Mode from Normal to Screen.

9-34 Rendering

Changing the Blend Mode to Screen will increase the overall lighting. The GI Middle layer makes dark areas of the image brighter and the textures more noticeable.

Some zones and surfaces are not very well lit by sunlight, so we will add the image from the VRayLighting render element. This render element shows the effect of direct sunlight on surfaces. All other surfaces remain black. 6. Place Middle_VRayLighting.png in the image and rasterize the layer. Change its Blend Mode from Normal to Screen and the Opacity to 50%. Rename the layer to Light middle.

As a result, all objects lit by the sun will be brighter. The creek is too dark. To lighten it up, we will use the VRayRefraction render element.

Rendering 9-35
This render element has information about the refractive objects, all other parts of the image are black. 7. Place Middle_VRayRefraction.png into the image, and rasterize the layer. Change Blend Mode from Normal to Screen, rename the layer to Refraction middle.

As a result, all of the objects with some refraction become lighter. The color of the creek needs to be adjusted too. For this you will create a group of layers and use Curves and Color Balance. 8. Place the Refraction middle layer into a group by selecting the layer and pressing Ctrl+G (or use Layer Group Layers). Rename the group to Refraction. Refer to the following illustration.

This group was created for convenience. Later, when the number of layers increase, this organization will be important. 9. Select the Refraction middle layer and create a new Curves layer (Layer New Adjustment Layer Curves). Refer to the following illustration. As an alternative, the tools available at the bottom of the Layers window can be used.

The Curves layer will be created above the Refraction middle layer. We need to tell this layer to control only the curves for the Refraction middle layer. For this purpose, we will create a clipping mask. 10. Rename Curves to Curves Refraction, then use Layers Create Clipping Mask to create a new clipping mask.

9-36 Rendering The layer Curves Refraction will change in appearance. Refer to the following illustration.

All corrections to the Curves Refraction layer will now be applied only to the Refraction middle layer below it. To quickly enable or disable a clipping mask, you can also Alt+Click on the line between two layers in the Layers window. Refer to the following illustration to see the location of the line to Alt+Click.

We will use this function frequently in the steps that follow. Now, we will correct the Refraction middle layer. 11. Select the Curves Refraction layer. In the Adjustments window, correct the curve as shown in the following illustration.

This will allow you to increase the brightness of light zones and make the refractive objects look more realistic. To change the color, we will use a Color Balance layer. 12. Use the tools at the bottom of the Layers window to add a Color Balance layer to the Refraction group. Create a clipping mask for this layer and name it Color Balance Refraction. Refer to the following illustration.

Rendering 9-37
13. Select the Color Balance Refraction layer. In the Adjustments window, correct it as shown in the following illustration.

The transparency of the water will take on a brown tint. In the following illustration, you can see how the water surface looks different after corrections were added to it using the VRayRefraction render element.

Reflections need to be increased in some places. For this, we will use the VRayReflection render element. 14. Place Middle_VrayReflection.png into the image, and rasterize the layer. Change the Blend Mode to Screen and rename the layer Reflection middle. 15. Place the layer into a new group and name the group Reflection.

These changes will increase the reflectivity level on all reflective surfaces. The increase will be too much for some areas, so lets use a mask to limit the effect. 16. Select the Reflection middle layer and add a mask to it using Add vector mask, located on the lower tab of the Layers window. Refer to the following illustration.

17. Using a brush with the color set to pure black, paint the mask in areas where the reflection should be reduced such as on the objects on the roof, the rocks, and a few places on the grass.

Remember that the image combined with the mask is only visible in areas where the mask has a white color. In places where the mask has a black color, the image is completely transparent and invisible. The transparency level also depends on the brightness of the white color. For example, if the mask color is gray, then the image is 50% transparent.

9-38 Rendering Using a mask to hide parts of the layer gives you the ability to undo any corrections easily. If you had erased part of the image with the Eraser tool, for example, it is much more difficult to get the erased parts of the image back. Keep in mind that you need to paint over the mask, not over the image. To select the mask, click the mask icon next to the image icon in the Layers window. Control will go to the mask and everything you paint with the brush or other tools will be applied to the mask only. If you need to switch back to the image, click the image icon on the Layers window. To disable/enable a layers mask, Shift+Click on the mask. To make it so that only the mask is visible, use Alt+Click. We have already removed excessive reflections from objects on the roof, from the rocks, and from a few places on the grass. If there are other reflections on the grass that are too strong, you can reduce them by painting over them with a gray mask. You can use the same technique to increase the reflections on the creek surface, on the tree leaves, and on the grass. Lets increase the level of reflectivity further with Curves. 18. Select the Reflection middle layer and add a Curves layer. Name the layer Curves Reflection, and create a clipping mask for it.

19. Select the Curves Reflection layer, and in the Adjustments window change the curve as shown in the following illustration.

In the following illustration, you can see the image before and after correction with the VRayReflection Render Element.

Rendering 9-39

As a result, objects in the middle plane have correct saturation and color balance; however, some individual details and objects still need to be adjusted. For example, the roof could have more contrast, the grass needs more variety, and the color of the ivy and tree leaves need to be corrected. Lets start with the roof. Because we did not create a mask specifically for the roof, lets use the VRayWireColor render element. 20. Place Middle_VRayWireColor.png into the image, and rasterize the layer. Rename the layer WireColor. Refer to the following illustration.

21. Because this layer is for reference only and is not intended to affect the image, place it at the bottom of the layers list.

In this render element, the roof of the house has a brown color, the same as the color of the roofs wireframe in the 3ds Max scene. We can use any of these colored areas if we need a mask for a specific object. In this case, we want to use the brown area to create a mask for the roof. In order to be able to work with WireColor layer, it needs to be visible and active. This means we need to hide all the other layers. To do this, Alt+Click the layer visibility (eye) icon next to the layer that you want to isolate. Pressing Alt+Click again will bring the layers back to their original states. You could place this layer at the top of the order and toggle it on and off using the eye icon, but this is a handy trick to know.

9-40 Rendering 22. Alt+Click the eye icon for the WireColor layer. Refer to the following illustration.

23. Select the WireColor layer. Using Select Color Range, use the eye dropper tool to select the roof color. Also select the roof color of the small shed all the way to the right of the image. Set Fuzziness to 48 in the Color Range dialog and click OK.

This will select all parts of the image containing the brown roof color. 24. Unhide all layers, and hide the WireColor layer. Deselect any parts of the image that are not part of the roof.

25. With the selection still active, create a Curves layer, name it Roof Curves, and place it at the top of the Layers list. Now the Roof Curves layer has a mask that will affect only the roof in the image. 26. In the Adjustments window, change the curve as shown in the following illustration.

Rendering 9-41
The roof now has more contrast.

Now, well correct the tree crown. The leaves are too bright, so their color needs to be toned down a little. 27. Using the Magic Wand Tool, select the areas of the image that contain the tree leaves. With the selection still active, create a new Hue/Saturation adjustment layer. Rename the layer Saturation Tree Foliage. Move this layer up to the top of the layers list as well.

28. In the Adjustments window, set parameters as shown in the following illustration.

This reduced the saturation of the leaves a little. Now, lets correct the ivy leaves with a mask rendered from 3ds Max. 29. Place Mask_ivy.jpg into the image, and rasterize the layer. Place this layer at the top of the layers list. Now, we will create the selection using the black and white image. 30. Open the Channels window. Ctrl+Click on any channel.

Now we have a selection for the ivy leaves, showing in white. 31. While the selection is active, create a Color Balance adjustment layer and name it Color Balance Ivy.

9-42 Rendering Now we can correct the color of the ivy leaves. 32. Delete the black and white layer with the ivy leaves mask that we used to create the selection, as we will not need it anymore. 33. Select the Color Balance Ivy layer. In the Adjustment window, set parameters as shown in the following illustration.

Note that you will need to make sure that Tone is set to Shadows. Now you can use the mask from the Color Balance Ivy layer to create a Curves layer and make it brighter. 34. Ctrl+Click the mask icon of the Color Balance Ivy layer. The selection of ivy leaves appears. 35. Create the Curves layer and name it Curves Ivy. In the Adjustments window, add corrections as shown in the following illustration.

In the following illustration, you can see how the ivy looks before and after the corrections with the Color Balance Ivy and Curves Ivy layers have been applied. The leaves now have more color and brightness variations.

Rendering 9-43

With the next correction we will add variety to the colors in the grass, and will also tone down some of its highlights to make the grass look rougher. For this, we will also use a mask rendered from 3ds Max. 36. Place Mask_grass.jpg into the image, and rasterize the layer. 37. In the same way you did for Ivy leaves, create a selection based on the black and white mask. 38. With the selection still active, create a Hue/Saturation layer and name it Saturation grass. 39. In the Adjustments window for the Saturation grass layer, set the parameters as shown in the following illustration.

In the following illustration, you can see the grass before and after the Saturation grass layer is applied. The grass affected by the mask is bluer and is also less shiny, which makes the grass look more like rough, wild grass.

Wed also like to improve the image by punching up the specular highlights on the pumpkins. For this we will use the VRaySpecular render element.

9-44 Rendering 40. Place Middle_VRaySpecular.png into the image, and rasterize the layer. Change the layer's Blend Mode to Screen, and place this layer at the top of the layers list. Rename the layer Specular middle. 41. Because this correction needs to be applied to pumpkins only, apply a mask to this layer and paint the areas without pumpkins with a black brush. You will use a Curves adjustment layer to make the specular highlights more noticeable. 42. Select the Specular middle layer. Create a new Curves layer and name it Curves Specular. 43. Apply a Clipping Mask to this layer. In the Adjustments window for this layer, set the parameters as shown in the following illustration.

44. Place the layers Specular middle and Curves Specular into a new group called Specular. Refer to the following illustration.

In the following illustration, you can see the pumpkins before and after the specular highlights were adjusted.

45. Save the PSD file. The only part of the middle ground left to adjust is the waterfall. We want to show some motion blur in the still image. Recall that the waterfall was rendered over 6 frames. Using these frames, a motion blur effect will be added with Adobe After Effects and the ReelSmart Motion Blur plug-in

Rendering 9-45
from RE:Vision Effects. A trial version of the ReelSmart plug-in can be downloaded at http://www. revisionfx.com. We will not cover all the After Effects and ReelSmart tools in detail here, but will give you basic steps to get the motion blur effect. 46. Open Adobe After Effects, and import the 6 frames of the rendered waterfall sequence. 47. Create a composition, and add an RSMB effect. Leave the effect's settings at their default values.

48. Open the Project Settings window. In the Color Settings group, set Depth to 16 bits per channel. This will allow the image to stay at 16 bits. 49. Drag the composition to the Render Queue. For Output Modules, change Video For Windows to PNG Sequence. 50. For Channels, choose RGB+Alpha. For Depth, set Trillions of Colors+. 51. For Output To, set the path and name the output file waterfall+motion blur _[#####]. 52. Click Render. As a result, you will get 6 new frames of the waterfall with a motion blur effect applied, with 16-bit depth and an alpha channel.

Creating the motion blur in this way takes very little time, usually not more than 10 minutes. Now lets add one frame of the blurred waterfall image in Photoshop. 53. Go back to Adobe Photoshop and place one of the waterfall+motion blur.png files in the image. Choose the one you like the best. Rename the layer Waterfall. Place the layer at the top of the layers list. 54. Using Curves, make the waterfall slightly brighter.

9-46 Rendering

The adjustments to the middle ground are finished. To keep the layers organized and make it easy for you to work with the images more if you need to, we recommend that you place all of the layers into appropriate groups. 55. Place all of the layers of the middle ground into a group (all layers except WireColor), and name the group Middle. As a result, the layers list should look as shown in the following illustration. This will allow you to quickly hide and display the middle plane when necessary.

Now, we will place the background image so we can adjust it as necessary.

Rendering 9-47
56. Place Background.png into the image, and rasterize the layer. Rename the layer Background, and place it at the bottom of the layers list just above the WireColor layer. In this way, the Background layer will be covered by all the other layers. 57. Place this layer into a group and rename it Back. Refer to the following illustration.

We will place all of the layers for the background in this group. To make it easier to determine which adjustments to make, you will need to fill the bottom layer with a sky-blue gradient. 58. Create a new layer in the Back group and place it below the Background layer. Fill this layer with a sky-blue gradient color, with the gradient going from a stronger blue at the top to a whiter blue at the bottom. Rename the layer Sky. We used RGB 174,198,255 for our darker color and RGB 210,220,255 for the lighter blue. Now you can tell that the Background layer is too sharp, saturated, and too green. You can adjust this with Levels, Color Balance, and add a Blur effect. 59. Select the Background layer and create a Levels adjustment layer. Rename the layer Levels Background, and create a clipping mask for it. In the Adjustments window, set the parameters as shown in the following illustration.

The image will become brighter. Now, lets adjust the color. 60. Select the Levels Background layer and create a Color Balance adjustment layer for it. Rename the layer Color Balance Background and create a clipping mask for it. In the Adjustments window, set the parameters from the following illustration.

9-48 Rendering

Now, the color of the vegetation in the Background layer is more realistic. Refer to the following illustration to see the Background layer before and after the color correction was applied.

The background could also use more sun. Well use a filter to add a slight atmospheric glow. 61. Place Background_VRayLight.png into the image, and rasterize the layer. Rename the new layer Light Background, and change the Blend Mode to Screen.

62. To prevent bright areas in the middle of the fields from being brightened even more by the filter we are about to apply, use a black brush to paint over these areas on the Light Background layer. 63. To add a little bit of atmospheric glow, duplicate the Light Background layer. To the new layer, apply a Gaussian Blur filter with Radius set to 2.1 pixels. Make sure that Blend Mode of this layer is set to Screen. Refer to the following illustration to see the background before and after the Blur filter is applied.

Rendering 9-49

A Radius of 2.1 pixels was chosen because our image is 2000 pixels wide, and this is just about the right ratio of blur for this image. For larger images, the Radius should be larger, and for smaller images it would be smaller. Now lets use Z-Depth to create a light fog effect at the farthest areas of the background. For this, we will use the Background_VRayZDepth.png image. 64. Place Background_VRayZDepth.png into the image, and rasterize the layer. Rename the new layer ZDepth Mask. Refer to the following illustration to see the ZDepth Mask layer.

65. Hide all of the layers except ZDepth Mask (Alt+Click over the eye icon next to the layer). Open the Channels window. 66. Select any channel in the Channels window, and duplicate it by right-clicking it and choosing Duplicate Channel. Because the image does not have any color information, all the channels are the same, and you can duplicate any channel from the Channels list. Refer to the following illustration.

9-50 Rendering 67. Rename the new channel ZDepth Background. Make the RGB channel visible.

68. In the Layers window make all the layers visible again, and delete the ZDepth Mask layer as we won't need it any more. 69. In the Back group, create a new layer above all the other layers in the group. Using the Paint Bucket tool, fill it with the solid color RGB 90,140,220. Rename the layer Color Fill Background. 70. Create a Clipping Mask for this layer, and set its Opacity to 40%. 71. Go to the Channels window, and Ctrl+Click the ZDepth Background channel. This will make a selection from the contents of the channel. 72. In the Layers window, select the Color Fill Background layer and click Add mask at the bottom of Layers window.

As a result, a mask will be created for the Color Fill Background layer. Refer to the following illustration.

73. Click the mask for the Color Fill Background layer, invert it, and assign a Levels adjustment layer. Adjust the levels settings to create a light foggy effect that is more intense at the back of the scene than the foreground. Refer to the following illustration to see the before and after images.

Rendering 9-51
You can also add a layer of mountains at the very back of the scene. If you like, you can use Back Mountains.png and add it just above the Sky layer in the Back group. Refer to the following illustration to see the structure of the layers in Photoshop file, including the Back Mountains layer if you have added it.

Now, we need to add some blur to the background to create a depth of field effect. You can do this by applying a blur directly to the Back group. 74. In the Layers list, select the Back group and apply the Convert to Smart Object command to it.

A Smart Object is an object containing all collapsed layers, but you can still open the object and access all the layers as you could before. If you double-click the Smart Object, it will open as a separate PSD file with all layers available. When you save the Smart Object, any changes are applied to the Smart Object. 75. Select the Back group and apply a Gaussian Blur filter to it with Radius set to 0.3 pixels. As a result, the Back group should look similar to the following illustration.

The background is finished, and we are almost ready to work on the foreground. But before we do this, we need to check how well the background fits with the middle ground. If you look closely at the transition area in the image, you can see a halo of bright pixels around the Middle layer. This is most noticeable around the roof, as seen in the following illustration.

9-52 Rendering

We will fix this problem with the Defringe tool. 76. In the Middle group select the Middle layer, and apply the Defringe tool (Layer Matting Defringe) with Width = 1 pixel.

The outline of grey pixels will disappear. Now we are ready to add grass to the foreground. 77. Place Foreground.png into the image, and rasterize the layer. Rename the layer Front Grass, and place it above all the other layers. 78. Use Defringe to remove the halo from this layer. 79. To keep everything easy to navigate and manipulate, place the Front Grass layer into a new group called Foreground, and place this group at the top of the list. Refer to the following illustration to see the structure of the layers.

The grass is too saturated. We will fix this using the tools weve used in other steps. 80. In the Layers list, select the Front Grass layer and add a Hue/Saturation adjustment layer to it. Rename the layer Saturation Grass, and create a clipping mask for it. In the Adjustments window, adjust the settings as shown in the following illustration.

Rendering 9-53

81. Add a new Color Balance adjustment layer, and name it Color Balance Grass. Create a Clipping Mask for it. In the Adjustments window, change settings as shown in the following illustration.

82. To make the grass brighter, add a Curves adjustment layer and name it Curves Grass. Create a clipping mask for it. In the Adjustments window, adjust the curve as shown in the following illustration.

The color correction of the Front Grass layer is finished. Now lets add more sun.

9-54 Rendering 83. Place Foreground_VRayLighting.png into the image, and rasterize the layer. Rename the layer Light front grass. 84. With the Color Balance tool, make the layer Light Front Grass more red, and with the Curves tool make it brighter. Refer to the following illustration for recommended adjustments.

85. Change the Blend Mode of the Light front grass layer to Linear Dodge (Add). Refer to the following illustration to see the front grass before and after corrections were applied.

To properly blur the image with a depth of field effect, we need to use the Lens Blur filter. This filter can be applied only to images with 8 bits per channel. Because our image has 16 bits per channel, this layer needs to be converted to 8 bits per channel in a separate image first.

Rendering 9-55
86. In the Layers list, select Foreground group and duplicate it into a new image (Layer Duplicate Group Document: New). 87. In the new image, use the Merge Down tool (Ctrl+E) to merge the group into a single layer. Convert the image with Image Mode 8 Bits/Channel.

88. Apply the Lens Blur filter with parameters from the following illustration.

89. Holding Shift, copy the layer back to the original image. Rename the layer Foreground blur and hide the Foreground group. Now you have a layer with an active Lens Blur effect and also hidden source layers. If for some reason you do not like the foreground grass, you can always correct it by editing the original Foreground group. Refer to the following illustration to see the grass blurred in the foreground.

90. Save the image to a PSD file. Now, well add some effects. First, lets look at how we can create an effect similar to volume light in 3ds Max. The effect must show sun rays penetrating through tree leaves and hitting the surface of the roof and ground. 91. Create a new layer and place it at the top of the layers list. Rename it Volume Light and fill it with black color.

92. To this layer add a Fibers effect (Filter Render Fibers). Use the parameters shown in the following illustration.

9-56 Rendering

93. Rotate the layer by approximately 45 degrees. Using a mask, youll paint areas to place the effect. 94. Add a Mask to the Volume Light layer and fill it with black color. 95. Using a white brush, paint areas below the tree leaves where the effect should be present. You may have to scale the image up to cover the canvas now that it has been rotated. Refer to the left side of the following illustration. To change the color of the sun rays, you will use Color Balance. 96. Correct the color of the Volume Light layer using the Color Balance tool, adding approximately 50% red and 50% yellow. 97. Change the Opacity of the layer to 15%, and the Blending Mode to Screen.

The resulting volume light effect will be very subtle, as shown in the right image of the following illustration.

With images of relatively low resolution, you will sometimes need to sharpen parts of the image, but you should use this tool only in places that really lack sharpness. For example if the foreground and background are blurred, then obviously the sharpen effect should be applied only to the middle

Rendering 9-57
ground, and even on the middle ground the effect can be limited by a ZDepth mask. In our case, we want to add sharpness to the Middle layer. 98. Select the Middle layer and apply the Unsharp Mask filter to it (Filter Sharpen Unsharp Mask). Set Amount to 100, Radius to 0.5, and Threshold to 0. 99. Apply the same effect to the GI middle and Light middle layers. 100. Save the PSD file. The image is almost finished. We want to add one last detail, a small lens effect. The effect itself can be created in 3ds Max and then saved as a PSD file for compositing. 101. Reset 3ds Max. 102. Open the Render Setup dialog. In the Assign Renderer rollout, switch the renderer to Default Scanline instead of V-Ray. 103. Place an Omni light in the scene. Set the Perspective view so the light is somewhere in the upper right area of the viewport. 104. Open the Environment and Effects dialog box. In the Effects tab, click Add, choose Lens Effects, and enable the Interactive option. In the Lens Effects Globals rollout, click the Pick Light button and pick the Omni light in the scene. Refer to the following illustration.

105. In the Lens Effects Parameters rollout, add the Glow and Ring effects.

106. Render a test. The Glow effect looks good, but the Ring effect needs to be reduced. 107. In the Lens Effects Parameters rollout, select Ring from the list of effects. Go to the Ring Elements rollout, and set Size to 8.0 and Intensity to 10.0.

9-58 Rendering 108. Render the image, and save the result as Lens_effect.jpg. 109. In Photoshop, place Lens_effect.jpg into the PSD document. Rename the layer Lens effect. Scale it down to 18% of its original size, and change its Blend Mode to Screen.

110. Change the position of the Lens effect layer so the glow appears over the surface of the waterfall. Increase this effect by duplicating the layer or changing its transparency.

111. Save the image as Final_Project.psd. You can also open Final_Project_Catapult.psd and compare your results. 112. The project is now finished.

Summary
The goal of this chapter was to introduce some practical rendering and post production methods that can be used in just about any type of scene. Here, we demonstrated the techniques used to produce the books cover image. In reality, there are virtually limitless techniques that could be used to achieve the same results. Whats important is understanding what you want the final product to look like, and knowing a sufficient number of tools and techniques to achieve it. In the end, it all comes down to dedication and a love for the work.

Appendix A

Critical V-Ray Settings

V-R ay is a thiRd - paRty plugin that runs within 3ds Max, replacing its default scanline render engine and providing users the ability to achieve greater realism with more speed and less difficulty. Developed by the Chaos Group in Sofia, Bulgaria, V-Ray has become the most widely used render engine for architectural studios around the world and is a top choice of many movies studios as well. Backed by an innovative group of developers and a dedicated user base, V-Ray stands poised to be a leader in render engine software for many years to come. So what makes V-Ray so special? There are four characteristics that accurately define the suitability of any 3D program; speed, ease of use, quality, and cost. Along with a great marketing strategy, the success of V-Ray in its first few years was due to a great mixture of each of these qualities. Essentially, all advanced render engines are capable of the same level of quality, but what continues to make V-Ray a favorite among many users is its speed and ease of use. And although not free like mental ray, its price of $999 (as of the printing of this book) is worth every penny for many production companies who cherish every hour saved in render time and every hour saved in employee training. The goal of this document is to provide a quick overview of the most critical V-Ray features of the final 1.5 release and a quick reference for great test and production render settings for both stills and animations. It is important to note that settings that should not usually be changed from their default values will usually not be discussed here. The features in V-Ray that we consider most critical, and therefore, the features highlighted here include the following: Image Sampling GI Engines Irradiance Maps Light Cache DMC

A-2 Critical V-Ray Settings Color Mapping Environment Lighting

Image sampling
Image sampling is arguably the most important and least understood feature in V-Ray. If you dont conduct good image sampling, having extremely high quality settings in other areas of the program, such as GI and materials, will do you absolutely no good. Image sampling controls how V-Ray implements antialiasing in your scenes, which is a process used to reduce imperfections in the rendering process caused by color changes that are too drastic, and that occur over too small an area of screen space to be adequately depicted by the pixels that define that space. After GI is calculated, V-Ray determines the final color to assign to a pixel by sampling each pixel. This simply means that a test is conducted to determine what object is detected at an infinitely small point lying at the center of each pixel, along with the material and lighting applied to that point. If V-Ray only takes one sample per pixel, then whatever color it detects at the center of a pixel is what the entire pixel will be colored. But because objects, materials and lighting can change over the span of a pixel, the center of a pixel shouldnt dictate how the entire pixel is colored. When it does, the result is a chiseled, aliased look throughout an image. By conducting subpixel sampling, you can force V-Ray to divide each pixel into smaller subpixels and conduct sampling at the center of each subpixel, with the end goal of determining the best possible color to assign to each pixel. The more subpixel samples that are taken, the better an image sampler can determine what lies within each pixel and what final color to assign. An important note to remember about image sampling is that when fine granular-like noise appears in an image, the cause is usually image sampling. The exception to this would be the noise caused by the Brute Force render engine, which also produces fine granular-like noise. When large splotchy noise appears in an image, the cause will almost always be the irradiance map or light cache. The one exception to this is usually HDRIs.

Image Samplers
There are three ways in which you can implement image sampling through V-Ray in your scenes. Deciding which method to use usually requires experimenting with small portions of your scene or with high face-count objects hidden.

Fixed rate
This method takes a fixed number of samples per pixel. When Subdivs is set to the default value of 1, one sample is taken at the center of each. The benefit of this sampler type is that you know without a doubt that a certain number of samples will be taken for each pixel. The downside, however, is that the sampler is not adaptive and cant speed up a rendering even when higher image sampling isnt needed. This sampler should only be used for production renders for scenes where a majority of the rendered image is made up of lots of blurry effects or very detailed textures. However, this method is usually a poor choice for animations because of the excessive render times it creates. For production renders, a value of 5 or 6 should be used. In scenes with tremendous detail or blurry effects, values of 4 or less will result in detail being lost and values greater than 6 will usually result in an indiscernible improvement in detail.

Critical V-Ray Settings A-3

Adaptive DMC
As its name implies, this sampler is adaptive, which means that it can implement greater sampling when greater sampling is needed and lesser sampling when lesser sampling is acceptable. This image sampler subdivides pixels according to the Min subdivs specified, and if its determined that the color variation in adjacent pixels is not too excessive, then no additional subdivisions will be made. However, if the sampler determines that the variation in color between adjacent pixels is too great, then it will continue to subdivide pixels during subsequent passes until such time that it determines the pixels are close enough or until the maximum number of subdivisions allowed by the Max subdivs value has been reached. And by default, the setting that determines how close pixel colors have to be is the Noise thresh value within the DMC Sampler rollout. Unfortunately, the Noise thresh value controls the acceptable noise level in all blurry affects in V-Ray, such as GI, depth-of-field, motion blur, glossy reflection and refraction, and so on. This is not a good thing because if you improve the quality of image sampling using this value, you will be requiring a higher level of quality in all blurry effects, even when that higher quality is unnecessary. Therefore, you should always disable the Use DMC sampler thresh. option and specify the acceptable level of color variation using the Color thresh value within the Adaptive DMC image sampler rollout. When you do, you can control image sampling quality independently of all other blurry effects. The importance of the Color thresh value can not be overstated. This value controls how adaptive the image sampler is. If you set this value to 0.0, you are telling V-Ray that you want perfectly noiseless image sampling. This of course isnt possible, so the best that V-Ray can do would be to apply the Max subdivs value to every pixel in your image. If this is done, however, the image sampler is no longer adaptive and there is no point in using it. In fact, if you set the Color thresh to 0.0 and use a Min and Max value of 1 and 4, you will get the exact same result as you would with the Fixed image sampler and a Subdivs value of 4. This is the best sampler to use for most production renders, but it should not be used for test renders over the much faster Adaptive Subdivsion sampler. We suggest that values of 2 and 5 be used for production renders, or 3 and 6 if necessary. Do not use Min values less than 2 because V-Ray will almost always apply inadequate sampling somewhere in your image (because of the Color thresh value specified) and do not use Max values greater than 6 because you will usually see indiscernible improvement at the price of much longer render times.

Adaptive subdivision sampler


This sampler provides another adaptive solution for image sampling, but what makes this tool so great is that you can allow V-Ray to take less than 1 sample per pixel. This simply means that pixels can be grouped together and 1 sample taken for the entire group. That being said, it is important to note that the adaptive subdivision sampler is quite different from the adaptive DMC sampler when values of 0 or less are used. When a Min rate of zero is specified, each pixel corner is sampled rather than the center of each pixel. When values less than 0 are used, the adaptive subdivision sampler still takes the samples at the corners of pixels, although it is somewhat vague to define what exactly is the number of samples per pixel. Nevertheless, it can roughly be stated that a value of -1 skips every other corner in the horizontal and vertical directions, and the result is that you get blocks of 2x2=4 pixels. A value of -2 gets you blocks of 4x4=16 pixels, and so on. The actual block size is always a power of 2. When not using blurry effects or detailed textures and objects, this sampler is a possible alternative. For scenes with large areas of smooth surfaces, such as a large wall with a smooth appearance, the Adaptive subdivision sampler is unbeatable. But if you can not get away with using a negative Min rate, then it is somewhat pointless to even be using this sampler for production.

A-4 Critical V-Ray Settings Another disadvantage of this image sampler is that it uses more RAM than the other samplers, and since RAM is most critical during production renders, this is yet another reason why the adaptive subdivision sampler is usually only acceptable for test renders. For test renders, we recommend always using this sampler.

Antialiasing Filters
The very last process applied to a rendering, with the exception of post-render effects, is antialiasing. After image sampling is conducted to determine the best possible color to assign a pixel based on subpixel sampling, antialiasing is applied to blur each pixel with neighboring pixels so that an aliased look can be further avoided. Like any blurry effect in V-Ray, antialiasing filters can increase render times, and generally, render times increase as blurriness increases. The following are good choices for antialiasing filters: None You can disable antialiasing altogether and still achieve great results for test and production renders for both stills and animations. The benefit of not using a filter is typically faster render times. Using no filter provides a look similar to Mitchell-Netravali. Catmull Rom this filter provides sharpness that makes it great for still renderings with a large amount of detail. This filter is not appropriate for animations because it generates side effects often referred to as flickering and swimming. Video this filter is good for animations because it softens or blurs each image to mitigate the effect of flickering. However, this filter can take about 10% to 20% longer than any of these others listed here. Mitchell-Netravali this filter provides a good mixture of sharpness vs. softness and is often used in production stills.

Suggested Render Settings


Test Renders
Adaptive Subdivision with Min/Max = -1/2 and Clr thresh = 0.1 (i.e., default values)

Production Renders
Adpative DMC with Min/Max = 2/5 up to 3/6, Use Noise Thresh = disabled, Clr thresh = 0.005 down to 0.003

GI Engines
All GI calculated by V-Ray is classified as a Primary Bounce or a Secondary Bounce. When a GI engine is assigned to calculate all primary bounces, its mission is to calculate the affect of light bouncing of all surfaces directly in view or indirectly in view by way of reflections or refractions. This simply means that if you can see a surface, the primary bounce engine is responsible for calculating the GI for that surface. When a GI engine is assigned to calculate all secondary bounces, its mission is to calculate the affect of light bouncing of all surfaces that can not be seen, directly or indirectly. Any surface whose GI is not calculated by the primary bounce engine assigned, is calculated by the assigned secondary bounce engine. The reason for the two classifications is so that different GI engines can be used to calculate the affects of different types of light bouncing off surfaces in a scene. Since a primary bounces surface is

Critical V-Ray Settings A-5


directly visible, it should make sense that the GI for a primary bounce surface needs to be more accurate than the GI calculated for a secondary bounce surface. Just because you cant see a surface that is outside your field-of-view, doesnt mean that the surface doesnt play an important role in the total GI solution for your scene. But it does mean that you can use faster, less accurate calculations for the GI on that surface. By calculating an accurate primary bounce and an approximated secondary bounce, you can achieve accurate GI in an efficient manner.

Irradiance Maps
The Irradiance map is the most widely used engine for the primary bounce because it is capable of very accurate GI in a relatively short amount of time. Because its so accurate, its not even an option for the secondary bounce.

Resolution
As its name implies, the irradiance map is a map, and just like a bitmap, an irradiance map has a resolution. The resolution of the irradiance map is completely determined by the Min and Max values found at the top of the Irradiance map rollout. The reason the irradiance map can achieve such accurate results in such a relatively short amount of time, is because it is adaptive. As an adaptive solution, V-Ray can apply a higher resolution to parts of an image that need more detail and more accurate GI, and a lower resolution to parts that dont require such accuracy. When the irradiance map algorithm begins its work, samples are taken on all the primary bounce surfaces at a density defined by the Min Rate value. When the min rate is set to 0, the irradiance map resolution matches the rendered image resolution and a sample is calculated for each pixel. If the min rate is set to -1, the irradiance map resolution is cut in half and 1/4 th the number of samples are calculated. When set to -2, the resolution is cut in half again, and the number of samples is reduced again. After the irradiance map creates samples during its first pass, as defined by the Min Rate, it then looks to the threshold values, which are ghosted out when presets are used, to determine if the samples taken during the 1 st pass will be accurate enough to define the GI on all the primary bounce surfaces. If the colors calculated by adjacent samples are too different, or the normals of the surfaces at the samples are too different, or if the distance between samples is too great, then V-Ray will force another pass of samples to be taken at a higher resolution. If the samples are determined to be accurate enough in a particular area, then no additional samples will be calculated in that area in future passes. This process repeats until the maximum resolution, as defined by the Max Rate is reached. So if a min rate of -1 and a max rate of 0 is used, then 2 passes will be made. The first pass will create a map with a resolution one-half that of the rendered image, and then a second pass will be made to take extra samples as needed at a resolution that matches the rendered image. If a max rate of 1 is used, then the final pass will create samples at a resolution twice that of the rendered image. The irradiance map comes with a nice list of presets that can be relied on for test and production renderings. For test renderings, we recommend using a Very Low preset and for production renderings we recommend using a Medium preset. If the Medium preset does not allow for enough detail to be shown in the final rendered image, then you can use a High preset. However, you should understand that when you switch from a Medium to High preset, the Max Rate changes from -1 to 0, which means that the final pass will be created at twice the resolution and take four times as long as the final pass calculated for the Medium preset. Another very important thing to remember about irradiance map resolution is that as you increase the resolution of the map, you will usually make it easier to see noise in the map. If you use a very low irradiance map resolution, such as that which would come with a Very Low preset, then the map will be blurred. Since the map is blurred, so to is the noise. If you use a very high resolution, such as that which would come with a Very High preset,

A-6 Critical V-Ray Settings then the map will be very detailed and the noise will be much easier to see. The noise will become smaller, but by becoming smaller it will also become more stark and easier to see. When many users encounter noise in their irradiance map, their first instinct is to use a higher resolution; however, this will only make the noise easier to see. Instead of increasing resolution beyond the -1 rate defined by the Medium preset, we recommend improving the two other critical settings in the irradiance map rollout; Hsph. sudivs and/or Interp. samples. As a final note about irradiance map resolution, you could avoid using presets altogether. However, you should only do this when you understand explicitly what each value controlled by the presets represents. The presets offer great configurations and it should be understood that improving these settings will only make the irradiance map less adaptive, and therefore, less efficient. By reducing the threshold values involved, you are telling V-Ray you want a more accurate irradiance map, and therefore, it will have no choice but to create samples closer to the specified max rate. If you set each threshold to 0, you would be telling V-Ray that you want a perfectly accurate irradiance map. Although that is not possible, it will do the only thing it can do, which is to sample all surfaces at the max rate. Your irradiance map would then be a brute force solution.

Hsph subdivs
This value stands for hemispheric subdivisions. When a sample is calculated, a virtual hemisphere is placed above the sample and rays are shot out in all directions to determine what colors are shown in the various directions. One ray might detect the blue sky, another the green grass, another the gray asphalt. All of those rays are averaged together to create a final sample color. A single ray is shot through each segment of the subdivided hemisphere and the more rays that are shot, the more accurate the final color will be. So increasing this value increases the number of rays and the accuracy of the final color. This setting has an enormous effect on the time it takes to calculate an irradiance map. You can easily double your irradiance map calculation time by doubling this value, even when the improvement in the final image is indiscernible. Because of this, we highly recommend using the lowest acceptable value that doesnt negatively impact the final image quality. We have found that the default value of 50 is only rarely needed and that the same level of quality can be achieved with a value of 20. When noise develops, rather than automatically increasing this setting, we recommend increasing the third critical setting; Interp. samples.

Interp. Samples
This value stands for interpolation samples. Since a finite amount of samples are taken throughout an image, V-Ray uses interpolation to estimate the GI in the spaces between the samples. If interpolation were not conducted, the irradiance map would take on a very cellular or faceted appearance. To determine the primary bounce GI at a point in between samples, V-Ray uses the Interp. samples value to specify how many surrounding samples to blend together, which in turn determines the final GI color to assign to the point. Increasing this value will cause more blurring in the irradiance map, will reduce the visible noise, and will reduce the visible detail. The default value of 20 works well in many cases, but you will often have to raise this value to something much higher to remove noise in the irradiance map. If you are trying to remove noise, we recommend increasing this value up to 100 before you start testing Hsph. subdivs. values above 20. The impact on rendering time of increasing interpolation samples is very small compared to the impact of increasing hemispheric subdivisions. If you increase this value too much, you may lose detail and you will have no choice but to increase the number of samples, i.e. the irradiance map resolution, or increase the quality of the samples, i.e. hemispheric subdivisions. As you can see, the three settings discussed for irradiance maps are interconnected and are used to basically do two things; control noise and detail. For each scene, there is an optimal

Critical V-Ray Settings A-7


configuration of these three settings that will yield great image quality in the shortest amount of time possible.

Suggested Render Settings


Test Renders
Preset = Low, Hsph. subdivs. = 20, Interp. samp. = 20

Production Renders
Preset = Low, Hsph. subdivs. = 20 up to 50, Interp. samp. = 20 up to 100

Light Cache
The Light cache is another complex algorithm used to approximate indirect illumination. Unlike some of the other GI solution types, the light cache has only been around a few years and it was first developed by the makers of V-Ray. Its a fantastic lighting solution and the most widely preferred secondary bounce engine among V-Ray users. There are two main reasons for its continued success. One is that it provides a great mixture of speed and quality and another is that its very simple to use, relative to other solution types. One of the things that makes it so easy to use is that it does not have a multitude of variables that control adaptive behavior like the irradiance map, and this alone makes it a much simpler solution to use. Nevertheless, it is still a complex creation that still contains enough variables to confuse and overwhelm many users. The practicality of the light cache can be best attributed to its speed, which in turn, can be attributed to its ability to compute a very large number of light bounces very quickly. As a side effect to this benefit, it is not as accurate a solution as the irradiance map or, as well see in a moment, the DMC solution. And because its not as accurate as these 2 methods, its not a good choice for use as the primary bounce unless you perform progressive path tracing. Progressive path tracing is a great technique in which the light cache is utilized for both the primary and secondary bounces to produce a complete rendering from the moment the rendering process begins. The rendering is simply refined slowly over time and stopped when an acceptable level of noise is reached. Because the light cache is so good at calculating a large number of light bounces, its very effective for interiors, where light tends to be trapped more and bounce around more surfaces than it does in exterior scenes. Additionally, the light cache effectively spreads out the light very well, making it even more effective for interiors; smooth lighting is extremely important for nice interior images. This is not meant to take anything away from the use of light cache for exteriors, because we still use it more than any other type for both interiors and exteriors. There are just a few settings within the light cache rollout that would be considered critical to most scenes. By far, the most critical setting is Subdivs, which dictates the number of rays that are shot from the camera onto the primary bounce surfaces. Those rays shot onto the primary bounce surfaces approximate the affect of GI from secondary bounces, and the number of rays used is the square of the Subdivs value. For example, when the default value of 1000 is used, the number of rays sampled is actually 1 million. When a value of 2000 is used, 4 million rays are sampled. So every time you double the Subdivs value, you use four times as many rays and the light cache takes four times as long to calculate. For test renders of still images, try using a Subdivs value of 100 for large scenes and 250 for small scenes. For production renders, simply multiply this range by ten. Try a value of 1000 for large scenes and 2500 for small scenes. Although these values work well for still images created in Single Frame mode, animations must be created in Fly-through mode, and in this mode, all of the rays used are spread throughout all of the frames of the animation. If your camera doesnt move very far or very

A-8 Critical V-Ray Settings fast, and if your animation path isnt too long, then you can use similar values to those just mentioned. However, if every few seconds you see a completely new set of surfaces and your animation path runs continuously for a long period of time, then these values will be far from sufficient. As a general rule, its not a good idea to have long camera sequences, such as 20 seconds or more. If you keep your sequences to under 20 seconds in length and if your camera does not move so far or so fast that you see completely new surfaces every few seconds, then a good rule to apply to Flythrough mode would be to double the Subdivs value used for a still rendering. When light cache samples are taken for a single frame, they are spread throughout the entire image. The areas in between samples are shaded based on the information calculated by the closest sample. If interpolation were disabled, you would see the entire image broken into array of sample cells, where all points within a cell would be shaded the same color as the sample taken at the center of the cell. By increasing the number of rays used, you can break the scene into smaller cells and the smaller the cells, the more accurate your GI will be. You can specify the size of the sample cells through the Sample size setting. When the Scale setting is to Screen, the sample size is specified as a fraction of the screen size. For example, when set to the default value of 0.02, the Sample size value wants to make each sample 2% of the screens size. This does not mean that the sample size will necessarily be 2%, because if there arent enough samples to divide up the image into, then the actual sample size could be much larger. This is a critical thing to understand because the Sample size setting dictates the size of a sample if, and only if, there are enough samples to allow for the size specified with this setting. In other words, if the Subdivs value is too low and there just arent enough samples being taken, it doesnt matter how small you make the sample size because the image can only be broken down into so many sample cells. Too few sample cells means that you wont be able to achieve the desired sample size, and therefore, detail may be lost. Once enough samples are taken to allow the for the sample size that you dictate with the Sample size setting, then any additional samples will simply be used to improve the color of the samples. More samples will yield better sample color accuracy. When the Scale is set to screen, the sample sizes in the foreground of an image will always be more accurate than the samples in the background. For example, when a sample is set to 2% of the screen size, then 2% of the screen size in the foreground might mean 1 foot while 2% of the screen size in the background might mean 10 feet. This simply means that objects in the foreground will have a more accurate light cache applied, which is a good thing. However, when you render an animation and your camera moves into and around a scene in a way that causes the view to constantly change and new surfaces to constantly be seen, then you will need to use the World option. If you use the Screen option in these situations, then objects which are initially in the background will eventually be in the foreground and need just as much accuracy as all other objects. When you set the Scale to World, the Sample size is no longer set as a percentage of the screen size, but rather as a real-world distance. Unlike the Screen default size value of 0.02, which is an excellent choice for almost all situations, the default World value will almost always need to be adjusted. A good place to start in determining what size to use is to pick some area in the center of your screen and determine what the real-world distance would be on a surface that would be measured as 2% of the screen size. If 2% of your screen size would equate to a distance of 10 feet, then use a sample size of 10 feet. If 2% equates to 100 feet, then use 100 feet. You simply need to find a commonly viewed area that provides a good representation of a surface that is not always seen in the foreground and not always seen in the background. For animations, the Subdivs value needs to be increased beyond that which you would use for a still image, because all of the samples will have to be spread out through the entire animation. The optimal value is determined by several variables, such as animation length, the speed at which the cameras perspective changes, the detail in your objects and materials, and much more. As a start,

Critical V-Ray Settings A-9


you can try to simply double the value you would use for a still image and this will usually provide good results. When the irradiance map / light cache combination is used, the secondary bounces are calculated before the primary bounces. The reason for this is that the light cache is not as accurate as the irradiance map, so instead of calculating GI in a very detailed manner with the irradiance map and then calculating GI in a very rough manner with the light cache, V-Ray instead starts with a light cache to roughly approximate the GI and then uses that information to more accurately and more quickly calculate the much more detailed irradiance map. It just wouldnt make sense to do it any other way. When creating an animation of a static scene, i.e. a scene where only the camera moves, the following is the proper procedure. This procedure will not work on scenes with changing lights, changing materials, or changing objects. 1. Set Primary and Secondary bounces to Light Cache 2. In the Global Switches rollout, enable the Dont Render Final Image option 3. Enable the Show Calc phase 4. Change the mode to Fly-through 5. Set the Subdivs value 6. Auto-save the light cache 7. Render the light cache 8. Change the mode to From File 9. Click Browse and load the saved light cache 10. In the Indirect illumination rollout, switch the Primary bounce type to Irradiance map 11. Enable the Show Calc phase 12. Change the mode to Increm. Add to Current Map 13. Auto-save the irradiance map 14. In the Common tab, switch to the Active Time Segment option 15. Set Nth frame value 16. Render the irradiance map 17. Change the mode to From File 18. Click Browse and load the saved irradiance map 19. Check whether or not to use the Use Light Cache for Glossy Rays option and None for secondary bounces 20. Turn off the Dont Render Final Image option 21. In the Common tab, change the Nth frame option back to 1 22. Save the final rendered output to file 23. Render the final output One final option worth mentioning in the Light cache rollout is the option to Use Light Cache for Glossy Rays. This option allows you to drastically reduce the time needed to calculate blurry reflections and refractions by borrowing information stored in the light cache. When this option is used, you must leave the light cache enabled as the secondary bounce.

A-10 Critical V-Ray Settings

Suggested Render Settings


Test Renders
Subdivs = 100 for large scenes and 250 for small scenes

Production Renders
Subdivs = 1000 for stills of large scenes, 2500 for stills of small scenes, and approximately twice these values for animations, Scale = Screen for stills and animations with minimal change in viewpoint, Scale = World for animations where camera moves in and around scene and view constantly changes.

Brute Force
The final GI engine discussed in this appendix is the Brute Force engine. The brute force engine is neither our favorite primary nor secondary bounce solution, but we do use it on occasion and it is a great choice in certain situations. The term brute force is used in mathematics to describe a method of solving an equation by trying all possible solutions. As an example, applied to the field of cryptography, or code breaking, it simply means to break a code by testing every possible permutation. In V-Ray, the name is used because this render engine is potentially capable of computing the GI everywhere in a scene. This method is not adaptive, like the irradiance map and light cache, because samples are taken independently of all other samples and all other frames (for animations). Therefore, no sampling information is borrowed and no samples are blended together. Although the brute force method is theoretically capable of calculating a perfect solution, this is never really feasible or practical. Like other render solutions, this method is simply another way of approximating GI to an acceptable degree of accuracy. Brute force is a great option for calculating GI in a scene for certain situations, but to better understand what those situations might be, you need to know what the advantages and disadvantages are of using the brute force method. There are four primary advantages for using the brute force method over other GI solutions. The greatest advantage of the brute force method is the ability to produce very accurate GI. The only competition brute force has in this regards is the irradiance map, which because of its adaptive nature leads many to choose the irradiance map as their first choice for the primary bounce. Remember that the primary bounce requires a high level of accuracy. Because the brute force method is referred to as an exact method, it should be no surprise that there are very few controls used to dictate the quality of the image, and this is the second advantage. A third advantage is that because brute force doesnt store sample information for later use, it requires far less memory to use than the adaptive methods. The fourth and final big advantage of using brute force is that when rendering scenes with moving objects (besides the camera), it is the solution that provides the most accurate GI and it is a legitimate alternative to rendering a scene in multiple passes and compositing the separate passes later. There is really only one main disadvantage of the brute force method for calculating GI and that would be the time it takes to create quality images. This one disadvantage, however, makes this solution method unacceptable for many users in many situations. In order to achieve high quality GI, either for primary or secondary bounces, a value much greater than the default 8 Subdivs must be used. In most scenes, you will probably find that values above 30 are needed to achieve a noiseless image. Since noise is easiest to see on large, smoothly shaded surfaces, you must usually use a very high Subdivs setting on these types of scenes. However, these are just the type of scenes where the irradiance map and light cache combination shine. Therefore, the brute force method is best suited for scenes with high levels of detail either in materials or in object structure. Incidentally, because this

Critical V-Ray Settings A-11


method is so much slower than the irradiance map and light cache combination, it should never be used for test renders. There is an additional setting within the Brute force GI rollout; Secondary bounces. This setting controls the number of times light, processed by the secondary bounce solution, is allowed to bounce from one surface to another. When the brute force method is not used as the secondary bounce solution, this setting can not control the number of secondary bounces. Since the light cache is so much faster than the brute force method, and since a high level of accuracy is not needed for secondary bounces, using the brute force method for secondary bounces should only be used in very specific situations. For those specific situations, increasing this value beyond the default value of 3 can help provide accurate GI in areas where light has a hard time reaching, and in this way can add depth and contrast to dark areas.

Suggested Render Settings


Test Renders
The brute force solution should not be used for test renders

Production Renders
Subdivs = 30 to 80

DMC Sampler
The DMC Sampler plays a critical role in specifying the quality of all blurry effects in V-Ray. A blurry effect in V-Ray is any effect that provides a blurry look, such as motion blur, depth of field, area lights, blurry reflections, and GI, just to name a few. DMC stands for deterministic Monte Carlo. Monte Carlo is used in mathematics to describe a method of solving complex mathematical problems through the use of algorithms. The designation was first made in the 1930s and is actually a reference to the casinos in the city of Monte Carlo, Monaco and was chosen by a group of mathematicians who were relating the random and repetitive nature of the casinos to the similar nature of the algorithms they created. DMC is a variation of this approach. Unlike Monte Carlo sampling, which would result in random sampling and slightly different renderings every time, DMC uses pre-defined sampling sequences so that re-rendering will always produce the exact same image. V-Ray uses DMC sampling for all blurry effects, and because of this, two of the settings within the DMC Sampler rollout are critical to every scene. In V-Ray, there is a term called importance sampling that describes the technique of controlling the number of samples taken for a blurry value based on the importance of the value. Importance sampling is controlled by the Adaptive amount setting found in the DMC Sampler rollout. By setting this parameter to its lowest possible value of 0.0, you are telling V-Ray that you dont want to conduct importance sampling and therefore, dont want V-Ray to base the number of samples taken for a blurry value on how important that value is. By setting this parameter to its highest possible value of 1.0, you are telling V-Ray that you do want to abbreviate the DMC algorithm for each blurry effect based on their importance. Why would you want to do this? Well just like any other area of V-Ray, we want to save time. The Noise threshold value only plays a role when importance sampling is conducted and importance sampling only plays a role when a blurry value has enough subdivisions, thereby generating enough samples. But remember that the values in the DMC Sampler rollout affect all blurry values. For this reason, we highly recommend making sure first that each blurry value is set properly. Then

A-12 Critical V-Ray Settings and only then should you experiment with lowering the noise threshold. The smaller your adaptive amount, the less effect your noise value will have. For most situations, we recommend increasing the adaptive amount to its highest value for the best speed vs. quality. The one exception to this would be scenes using HDRIs, in which case reducing the noise threshold to 0.8 or 0.9 will often go a long way to reducing noise. There are 2 other settings worth mentioning in the DMC Sampler rollout, the Global Subdivs multiplier and the Min Subdivs value. By doubling the Global Subdivs value, you are telling V-Ray to double every Subdivs value in the program, with the exception of the Subdivs values for light cache, caustics, photon map, and image sampling. Some use this to quickly increase the quality in their scene, but we dont recommend doing so. It would be like putting a cast on both arms and both legs when only one leg is broken. It will definitely improve the quality of a problematic setting but it is likely to improve settings that dont need improvement, and thus, it can lead to dramatic increases in rendering time. The same applies to the Min samples value. It can be hard to specify a min samples value when you dont even know the true number of samples you are working with and even if you did, you might be applying a much higher quality setting to an area of your scene that doesnt need it.

Suggested Render Settings


Test Renders
Adaptive amount = 1.0, Noise threshold = 0.01

Production Renders
Adaptive amount = 1.0, Noise threshold = 0.005

Color Mapping
Color mapping is a term used to describe the way V-Ray changes the final color of your screens pixels to adapt to the limitations of the typical computer display. It works much like the exposure controls on a real camera or even within 3ds Max. It can also be compared to the way the human eye changes to allow more or less light to enter the retina. Color mapping is a requirement for any rendered image, and fortunately, its also one of the easiest to understand. As mentioned, color mapping is a lot like exposure control, and while you could use exposure control in the Environment and Effects dialog box, its not a good idea to do so because color mapping in V-Ray provides much more power and versatility than the exposure controls native to 3ds Max (mental ray not withstanding) and using both color mapping and exposure control would be like using exposure control twice. The results are difficult to predict and usually just not very good. All color mapping controls are found in the color mapping rollout and in the drop down list are 7 different options to choose. By default, linear color mapping is employed and all this option does is multiply the final intensity of all pixels within the 0-255 range an equal amount. For any color, an intensity of 0 results in a pure black pixel and an intensity of 255 results in pure white. So all of the pixels from 0 to 128 will be brightened the same degree and all pixels from 129 to 255 will be darkened the same degree. But some pixels actually want to be displayed above the 255 level. If, for example, you look at the sun with the naked eye, you naturally want to squint or shut your eyes to keep them from being damaged. Yet, if you take a picture of a mid-day sun and look at it with the naked eye, all you see is the color white. When you look at the sun with the naked eye, you see pure white, which corresponds to a color of 255, but the sun shines with luminosity or radiation, which is what actually burns your eyes. The color of the sun is captured in a photograph as pure white and

Critical V-Ray Settings A-13


nothing more because the illumination is clipped at this 255 value. The same thing happens automatically with color mapping. Illumination in an image that wants to be a higher value than 255, such as a direct view of a VRay sun, is clipped at this value. Although there are seven different options for color mapping, I recommend using one of 3 different options; Exponential, HSV exponential, or Reinhard. Lets look at each briefly. The exponential option will saturate pixels, i.e. add color, based on their intensity. What this means is that pixels that are really intense, or bright white, will be given more color, thereby replacing the white with color, and pixels that are less intense will be given less color. The end result of this is that brighter areas in the scene will not appear so bright and darker areas will not appear so dark. The HSV exponential option is a minor variation of exponential. HSV stands for hue, saturation and value, and this type of color mapping preserves the hue and saturation of a pixel and only allows the value to be altered. The result of this color mapping is similar to exponential except HSV exponential will provide a more vibrant display of colors and keep materials from being washed out so easily. The final color mapping mentioned is Reinhard. This is a great option to use because it provides a mixture of linear and exponential color mapping. Linear color mapping usually allows too many surfaces to be overexposed while exponential often provides too much change in hue and saturation. The mixture of these two color mapping types is controlled by the Burn value. When Burn is set to 1.0, the result is purely linear color mapping and when Burn is set to 0.0, the result is an exponential-like color mapping. A good place to start color mapping in any scene is with Reinhard and a Burn value of 0.5. This provides a 50/50 blend of Linear and Exponential and the result is usually a great place to start testing the lighting in a scene. Just like so many other areas of V-Ray, you really need to test different color mapping types and different settings within the various types. So in the case of Reinhard, if you render a scene and determine that theres just too many areas of overly bright highlights, all you need to do is reduce your Burn value and bring it closer to Exponential color mapping. With the first four color mapping types available in the drop-down menu, you are give the capability of increasing or decreasing the illumination of dark areas of your image separately from bright areas. Raising the Bright multiplier increases illumination in already bright areas of your scene and decreasing the bright multiplier decreases illumination. The dark multiplier works the same way. Therefore, raising the dark multiplier increases illumination in already dark areas of your scene and decreasing the dark multiplier decreases illumination. Within the Color mapping rollout are two options that can drastically affect the quality of images; Clamp output and Sub-pixel mapping. When Clamp output is enabled, the color mapping is applied after the pixel colors have been clamped (or capped) at the maximum value of 255. This simply means that even though some pixels want to be displayed above the maximum color value of 255, such as reflections of high intensity light sources, color mapping is applied to them after their color value has been reduced. If this option is not used, then the averaging of dark pixels next to bright pixels can result in an aliased look or in small white dots. Sub-pixel mapping allows color mapping to be applied to sub-pixel samples taken rather than to an entire pixel. Enabling this option is often necessary to remove the same aliased edges and white dots just mentioned with Clamp output. We highly recommend enabling these options by default. Doing so can drastically improve image quality with negligible increase in render times. The final option that should be addressed in this section of V-Ray is the Affect Background option. Leaving this option enabled will cause the background color or map to be affected by any changes made to color mapping. Although we recommend using a background rig in your scenes, if you decide to take advantage of the VRaySky map as your background, then you should disable this option so that your sky map doesnt change just because you need to change the exposure of objects in your scene.

A-14 Critical V-Ray Settings

Suggested Render Settings


Test Renders
Reinhard with a Burn value of 0.5, Sub-pixel mapping = enabled, Clamp output = enabled, Affect background = disabled

Production Renders
Exponential, Sub-pixel mapping = enabled, Clamp output = enabled, Affect background = disabled

Environment Lighting
A discussion on environment lighting in V-Ray can lead to lengthy coverage over a wide range of similar topics, such as HDRI lighting. This particular topic and several other topics could fill volumes, but the intent here is to simply introduce the concept so it can be built upon more easily with future study. Environment lighting is simply illumination of a scene with skylight. However, skylight can be created in a number of different ways. It can be created with images, with a VRay dome light, a VRaySky map, an IES Sky, or it can be controlled right through the environment rollout. This section will focus on illumination through the Environment rollout. When GI is enabled within V-Ray, the background color assigned within the Environment and Effects dialog box will automatically be used to illuminate a scene. The only way for skylight not to affect a scene with GI would be to make the background color black. With a pure black color, there will be no skylight, and with a pure white color there will be full skylight, or at least as much as the multiplier value will allow. The color not only controls the strength of the skylight it also controls the color. So if you want to simulate the kind of skylight you would see during a sunset, all you need to do is select the appropriate color. The Environment rollout within V-Ray contains an environment color override, which when enabled, will override any color assigned within the Environment and Effects dialog box. If no other lights exist in a scene, then the color swatch in either area can act as the sole source of illumination. The strength of environment light is controlled not only by a color swatch, but also by the multiplier value. However, if a map is used in the environment channel, then the respective color swatch and multiplier is disregarded. One important thing to note about the Environment rollout is that if you use image-based environment lighting, you should always apply the image to the VRay dome light rather the Environment channel. Applying an HDRI to the VRay dome will always result in superior image-based lighting.

Suggested Render Settings


Not applicable as environment lighting contains no quality-based settings.

Appendix B

A Gallery of images by

Index

T he following is an alphabeTical lisT of the most important 3ds Max features and third-party software used throughout this book. The page numbers represent either the first use of a feature in a given chapter or the first use within a series of pages. This list does not include many of the smaller features found within other features as the list would be many times longer and inefficient to use. Not every instance of a features use is documented, rather just those instances where its use is integral to the completion of an exercise or the understanding of the writing.

A
Adobe After Effects, 9-45 Adobe Photoshop, 1-35, 2-18, 3-23, 4-38, 4-43, 4-47, 9-33 Align tool, 1-18 Array, 6-17 Auto Key, 7-2, 7-32 Autodesk Mudbox, 2-11

B
Backface Cull, 3-7 Bend, 1-5, 6-28 Bevel, 1-23 Bevel Profile, 1-3, 1-6, 1-22 Biped, 7-20 BlobMesh, 3-13 Bones, 7-29 Boolean, 4-14

C
Cameras, 7-39 Cap Holes, 3-14 Cellular Map, 5-7 Cloth, 4-22 Color Correction Map, 6-35 Color Mapping, 8-5, 8-7 Composite Map, 2- 21, 4-53, 6-38 Cross Section, 1-24

Index

D
Direct light, 2-23

E
Edit Patch, 1-25, 6-12 Edit Poly, 1-13, 3-10, 4-13, 6-19 Edit Spline, 4-27 Environment and Effects, 3-26, 9-57 Export, 1-31, 2-11, 4-18, 4-31 Extrude, 1-29, 4-14 Extrude Along Spline, 2-7

F
Face Extrude, 6-12 Falloff Map, 5-19 Fog (Refraction) Color, Multiplier, Bias, 5-14 FFD, 1-38 FumeFX, 7-34

G
glu3D, 5-21, 5-27 Gradient Ramp Map, 5-53, 6-24, 6- 30, 6-38 Graphite Modeling Tools/ Modeling Ribbon, 1-43, 1-45, 2-2, 2-7, 2-10, 3-10, 4-4, 4-7, 4-13, 4-20 Grid and Snap Settings, 1-14, 3-5

H
Hair and Fur, 3-37, 6-20, 7-12, 7-18, 9-23

I
Import, 4-18, 4-36 IvyGenerator, 1-31

L
Lathe, 1-3, 1-23, 4-13 Lens Effects, 9-57 Loft, 1-8, 1-15

M
Maps, Animated, 7-8 Mask Map, 5-6, 5-11 MaterialByElement, 1-45, 9-23

Index Mesh Select, 4-24, 5-35 Mix Map, 5-12, 5-15, 6-24, 6-29 Morpher, 3-19

N
Noise, 1-14, 1-29, 6-19 Noise Map, 5-11 Normalize Spl., 4-23 NURMS Subdivision, 2-5, 2-10

O
Omni light, 8-18, 8-20, 9-57 Output Map, 5-11

P
Pack UVs, 6-6 Particle Flow, 6-31 Pelt, 2-8, 3-16, 6-5 PixPlant, 4-42 Preserve UVs, 6-14 ProBoolean, 1-29 ProOptimizer, 3-14 Push, 3-14, 6-20

R
Relax, 2-4, 3-13, 4-13 Render Elements, 8-9, 8-15, 8-17, 9-12 Render Map, 6-29 Render Surface Map, 3-33 Render to Texture, 5-8 Render UVW Template, 4-38, 6-7 Reset XForm, 1-40 Ripple, 5-3, 5-34 Ripple (space warp), 5-5

S
Scatter, 1-39, 6-35 Select and Link, 7-29 ShapeMerge, 1-20, 1-22, 4-14, 4-7 Shell, 1-20, 4-9, 4-14 Skew, 1-21

Index Skin, 7-26 Skin Wrap, 7-30 Smooth, 4-16, 4-27 Spherify, 3-10 Spline IK Control, 1-15 Squeeze, 6-18 Stretch, 4-11 Subdivide, 1-29 Sub-surface Scattering, 4-50 Symmetry, 1-28, 4-3, 4-21, 4-28

T
Taper, 1-7, 1-18, 6-18 Target Direct Light, 8-17 Time Configuration, 7-1, 7-14, 7-41, 9-25 Track View-Curve Editor, 7-2, 7-15 TurboSmooth, 1-9, 2-3, 3-10, 3-19, 4-4, 4-11, 4-18, 4-21, 5-2, 6-5, 6-18 Turn to Poly, 4-16

U
Unwrap UVW, 1-17, 1-26, 2-8, 3-15, 3-20, 4-36, 4-38, 6-5, 6-15 Use Axis Constraints, 3-5 UV Layout, 4-31, 6-30 UVW Map, 1-23, 1-28, 6-15, 6-24, 6-27, 6-30, 6-36, 6-37 UVW Xform, 1-16

V
Viewport Background, 2-6, 3-26, 6-3 Viewport Canvas, 3-26, 6-36 Vol. Select, 5-33, 6-19, 6-35 Volume Light, 8-23 VRay Dirt, 1-11, 5-8, 5-15 VRay Fur, 6-38 VRay HDRI, 8-11 VRay Light, 8-14, 8-20 VRay Mesh Export, 6-28 VRay Proxy, 5-8 VRayCompleteMap, 5-8 VRayDisplacementMod, 2-24, 3-36, 4-53, 6-10, 6-15, 6-37 VrayLightMtl, 5-8, 5-15 VRayNormalMap, 4-50

Index VRayPhysicalCamera, 8-2, 8-5 VRaySky, 8-2 VRaySun, 8-2 Vue, 6-41

W
Wave, 5-3, 5-33, 7-2 Wind (space warp), 7-15, 7-38

X
xView, 2-8

Modifiers
The following is a list of the most important modifiers used.

B
Bend, 1-5, 6-28 Bevel, 1-23 Bevel Profile, 1-3, 1-6, 1-22

C
Cap Holes, 3-14 Cloth, 4-22 Cross Section, 1-24

E
Edit Patch, 1-25, 6-12 Edit Poly, 1-13, 3-10, 4-13, 6-19 Edit Spline, 4-27 Extrude, 1-29, 4-14

F
Face Extrude, 6-12 FFD, 1-38

H
Hair and Fur, 3-37, 6-20, 7-12, 7-18, 9-23

L
Lathe, 1-3, 1-23, 4-13

Index

M
MaterialByElement, 1-45, 9-23 Mesh Select, 4-24, 5-35 Morpher, 3-19

N
Noise, 1-14, 1-29, 6-19 Normalize Spl., 4-23

P
ProOptimizer, 3-14 Push, 3-14, 6-20

R
Relax, 2-4, 3-13, 4-13 Ripple, 5-3, 5-34

S
Shell, 1-20, 4-9, 4-14 Skew, 1-21 Skin, 7-26 Skin Wrap, 7-30 Smooth, 4-16, 4-27 Spherify, 3-10 Squeeze, 6-18 Stretch, 4-11 Subdivide, 1-29 Symmetry, 1-28, 4-3, 4-21, 4-28

T
Taper, 1-7, 1-18, 6-18 TurboSmooth, 1-9, 2-3, 3-10, 3-19, 4-4, 4-11, 4-18, 4-21, 5-2, 6-5, 6-18 Turn to Poly, 4-16

U
Unwrap UVW, 1-17, 1-26, 2-8, 3-15, 3-20, 4-36, 4-38, 6-5, 6-15 UVW Map, 1-23, 1-28, 6-15, 6-24, 6-27, 6-30, 6-36, 6-37 UVW Xform, 1-16

Index

V
Vol. Select, 5-33, 6-19, 6-35 VRayDisplacementMod, 2-24, 3-36, 4-53, 6-10, 6-15, 6-37

W
Wave, 5-3, 5-33, 7-2

Maps
The following is a list of the most important maps used in this book. It does not list the use of maps that were used far too many times to list, such as Bitmap and Noise.

A
Animated, 7-8

C
Color Correction Map, 6-35 Composite Map, 2- 21, 4-53, 6-38

F
Falloff Map, 5-19

G
Gradient Ramp Map, 5-53, 6-24, 6- 30, 6-38

M
Mask Map, 5-6, 5-11 Mix Map, 5-12, 5-15, 6-24, 6-29

O
Output Map, 5-11

V
VRay Dirt, 1-11, 5 -8, 5-15 VRay HDRI, 8-11 VRayCompleteMap, 5-8 VrayLightMtl, 5-8, 5-15 VRayNormalMap, 4-50

Special Displays

The following pages are free displays that we have made available to some of our special friends in and out of the 3D industry. 3DATS would like to thank these organizations for the great work they do and the help they have been to us in recent years.

You might also like