www.it-ebooks.info Blender Cycles: Lighting and Rendering Cookbook Over 50 recipes to help you master the Lighting and Rendering model using the Blender Cycles engine Bernardo Iraci BIRMINGHAM - MUMBAI www.it-ebooks.info Blender Cycles: Lighting and Rendering Cookbook Copyright © 2013 Packt Publishing All rights reserved No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews Every effort has been made in the preparation of this book to ensure the accuracy of the information presented However, the information contained in this book is sold without warranty, either express or implied Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals However, Packt Publishing cannot guarantee the accuracy of this information First published: December 2013 Production Reference: 1191213 Published by Packt Publishing Ltd Livery Place 35 Livery Street Birmingham B3 2PB, UK ISBN 978-1-78216-460-9 www.packtpub.com Cover Image by Bernardo Iraci (bernardo@mccinfo.it) www.it-ebooks.info Credits Author Bernardo Iraci Project Coordinator Navu Dhillon Reviewers Patrick Boelens Proofreaders Lucy Rowland Fernando Castilhos Melo Acquisition Editors Akram Hussain Elinor Perry-Smith Indexer Priya Subramani Luke Presland Lead Technical Editor Amey Varangaonkar Graphics Ronak Dhruv Yuvraj Mannari Abhinash Sahu Technical Editors Tanvi Bhatt Kapil Hemani Production Coordinator Shantanu Zagade Akashdeep Kundu Shiny Poojary Faisal Siddiqui Cover Work Shantanu Zagade Copy Editors Roshni Banerjee Brandt D'Mello Deepa Nambiar Karuna Narayanan Shambhavi Pai Alfida Paiva Adithi Shetty www.it-ebooks.info About the Author Bernardo Iraci was born in Livorno, Italy in 1985 He followed a standard education career until he graduated in Economics in 2009 He always had a great passion for computers, especially gaming During the latter part of his studies, he also developed a passion for 3D graphics, and this soon became the main focus of his career It was at this time that he came to understand that his passion was the most important thing to pursue, more important than even attending university Even though Bernardo later participated in various online courses teaching the different aspects of computer graphics, he has been largely self-taught In 2010, he moved to Warsaw, Poland, where he was finally able to start working full-time in computer graphics as a 3D generalist in the field of movies VFX and advertisments He also started work as a freelancer Bernardo constantly works to improve his skills and knowledge about computer graphics and thinks that this is the only way to keep pace with this field When he is not busy with graphics, he likes to travel, watch movies, and play the guitar I would like to thank my family because they gave me the tools and the spirit to pursue my dreams It is thanks to them that I am able to what I today I would also like to thank my girlfriend as she constantly supports, pushes, and inspires me every day of my life www.it-ebooks.info About the Reviewers Patrick Boelens is a 3D content creator, programmer, and game designer with a passion for anything in which these fields meet While studying Communication and Multimedia Design, he started producing video tutorials for the CG Cookie Network, showing people how to make custom scripts and add-ons for the open source software Blender He was also a part of the team behind the studio's first iOS game, Eat Sheep He has since worked on a wide variety of projects, including client- and server-side web development, games, and applications Fernando Castilhos Melo lives in Caxias Sul, Brazil, and works in a software house as a software developer and systems analyst Since 2009, he has been working on 3D modeling in his spare time using the software Blender He has conducted some lectures on Blender and 3D modeling in several Brazilian free software events such as FLISOL and TcheLinux Fernando is majoring in Computer Science at the UCS (University of Caxias Sul) He is developing an integration between Blender and Kinect to generate a 3D animation as his coursework in the university For more information, access his webpage: http://www.fernando.melo.nom.br/ I want to thank my fiancée Mauren, my parents Eloir and Miriam, my friends, and my teachers from the university, for the support during the review of |this book www.it-ebooks.info www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy Get in touch with us at service@packtpub.com for more details At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library Here, you can access, read and search across Packt's entire library of books. Why Subscribe? ff Fully searchable across every book published by Packt ff Copy and paste, print and bookmark content ff On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books Simply use your login credentials for immediate access www.it-ebooks.info Table of Contents Preface 1 Introduction 5 Knowing your ingredients A look at the hardware 10 Chapter 1: Key Holder and Wallet Studio Shot 13 Chapter 2: Creating Different Glass Materials in Cycles 43 Introduction 13 Setting up Cycles for the first run 14 Creating a three-point light setup in Cycles using mesh emitters 16 Learning environment lighting 21 Using the Glossy shader to create a clean metal material 24 Adding realism to the keys with a bump texture 26 Creating a rubber shader for the key holder 28 Adding color to the key holder 30 Creating a leather material for the wallet 33 Using the Cycles camera's depth of field 36 Setting the Cycles render parameters 38 Introduction Creating a simple glass shader Creating a glass full of water Using default Cycles caustics Creating custom fake caustics Creating a custom and more versatile glass shader Creating more complex glass materials Obtaining a dispersion effect Creating an absorption glass shader www.it-ebooks.info 44 44 47 49 50 54 56 59 62 Table of Contents Chapter 3: Creating an Interior Scene 69 Chapter 4: Creating an Exterior Scene 97 Introduction Creating fake portals to decrease the noise in the scene Creating a parquet material Creating materials for the plant in the scene Creating a different kind of leather Creating the materials for the lamp Creating a carpet using hair particles Setting up night lighting Using IES files in Cycles Introduction Setting up the lighting with an external plugin Creating the road material Creating the grass material Texturing the tree trunk and creating realistic leaves Adding flowers to the scene Creating the wood material for the table and the fence Giving final touches to the image using render passes 69 70 74 76 80 83 86 90 94 98 98 102 105 109 114 117 121 Chapter 5: Creating a Cartoonish Scene 129 Chapter 6: Creating a Toy Movie Scene 161 Chapter 7: Car Rendering in Cycles 181 Introduction Setting up the environment and lighting Creating skin, teeth, and other body parts Creating the hair material Creating the dress material Compositing the scene 129 130 137 145 148 156 Introduction 161 Setting up the lighting 162 Creating a realistic plastic material for the characters 165 Creating the environment 170 Achieving a movie look using the compositor 175 Introduction 181 Setting up the lighting 182 Creating the car paint material 183 Creating the material for the tyres and the rims 186 Creating the material for headlights and other details 189 Compositing the scene 195 ii www.it-ebooks.info Table of Contents Chapter 8: Creating a Car Animation 199 Chapter 9: Creating an Iceberg Scene 227 Chapter 10: Creating Food Materials in Cycles 241 Introduction Setting up the lighting Creating a car paint material Creating the materials for the exterior environment Setting up the scene for the animation Compositing the scene Introduction Creating the ice and snow materials Creating the sea material in Cycles Compositing the scene Introduction Creating grapes in Cycles Creating parmigiano cheese Creating bread Learning the Branched Path Tracing render 199 200 202 209 217 220 227 228 234 238 241 242 244 248 252 Index 255 iii www.it-ebooks.info .. .Blender Cycles: Lighting and Rendering Cookbook Over 50 recipes to help you master the Lighting and Rendering model using the Blender Cycles engine Bernardo Iraci... Introduction Welcome to the Blender Cycles: Lighting and Rendering Cookbook Before we start, I would like to talk about the new Blender rendering engine Cycles is a brand new unbiased rendering engine based... GPU -rendering capabilities Cycles is definitely a modern and effective tool that every Blender user wants to know in order to get the best results Blender Cycles: Lighting and Rendering Cookbook