Book Image

Blender Cycles: Lighting and Rendering Cookbook - Second Edition

Book Image

Blender Cycles: Lighting and Rendering Cookbook - Second Edition

Overview of this book

Blender provides a broad spectrum of modeling, texturing, lighting, animation and video post-processing functionality in one package. It provides cross-platform interoperability, extensibility and a tightly integrated workflow. Blender is one of the most popular Open Source 3D graphics applications in the world. Modern GPUs (Graphics Processing Unit) have some limitations for rendering complex scenes. This is mainly because of limited memory, and interactivity issues when the same graphics card is also used for displaying and rendering frames. This is where Cycles rendering engine comes into play. Cycles is bundled as an add-on with Blender. Some of the features of Cycles is its quality, speed and having integrated industry standard libraries. This book will show you how to carry out your first steps in Cycles - a brand new rendering engine for Blender. In a gradual and logical way, you will learn how to create complex shaders and lighting setups to face any kind of situation that you may find in Computer Graphics. This book provides information on how to setup your first application in Cycles. You will start by adding lights, materials, and textures to your scene. When it's time for the final render, you will see how to setup Cycles in the best way. You will learn about a wide variety of materials, lighting, techniques, tips, and tricks to get the best out of Cycles. Further on in the book, you will get to know about animation and still shots, and learn how to create advanced materials for realistic rendering, as well cartoon style shaders. This cookbook contains a wide range of different scenes, proposed in a structured and progressive order. During this journey, you will get involved in the concepts behind every step you take in order to really master what you learn.
Table of Contents (18 chapters)
Blender Cycles: Lighting and Rendering Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Introduction
Index

Setting up Cycles for the first run


In this recipe we will see how to set up Cycles for the first run.

Getting ready

Let's open Blender and set Cycles as the rendering engine. If you are using the CPU to render, you are pretty much ready to go. If you want to use your video card, we need to change a couple of settings.

How to do it…

  1. Let's go to File | User Preferences.... As an alternative you can use the hotkey Ctrl + Alt + U.

  2. Let's start by going to the System tab and in the lower-left corner you will see the Compute Device setting area.

  3. As default it is set to None, but to use your Compute Unified Device Architecture (CUDA) device, you need to click on the CUDA button. From the drop-down menu, select your device (or devices if you have more than one card installed in your computer).

  4. At this point you may want to save the settings. To do this, click on the Save User Settings button in the lower-left corner so that Blender remembers these settings at the next startup.

    Tip

    If you are working with Blender 2.66 or newer, the user settings and the startup scene are kept separate. If on the other hand you are using an older version, clicking the Save User Settings button will also save the scene that you have in the viewport at the moment, and it will become the startup scene of Blender. To save the startup scene in version 2.66 or newer, go to File | Save Startup File.

  5. Now let's close the Blender User Preferences window and go to the Render menu bar item. From there go to the render menu and change the Device from CPU to GPU Compute.

  6. Let's open up the keys_Empty.blend file. If we did everything correctly from the previous section, the video card settings should have remained as we set them a while ago.

    Tip

    Downloading the example code

    You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

  7. As you can see the interface is a bit different from the default one. This is because to set up Cycles materials, we will need a node editor always open. Moreover, Cycles has a new great feature that will help us while setting up our scenes—the interactive viewport.

  8. When the interactive viewport is on, we will see our render running in real time in the viewport; in the meantime, we can set up our lights and material.

  9. This is why I like to have a small viewport always set on camera view to check out the scene in real time. As the rendering is quite a heavy process, if we don't have a really powerful hardware (such as a dual-video card machine), it is good to keep this window comparatively small, in order not to over charge the system.

  10. We will use the main viewport to select and move objects around in the scene, as this operation is not so easy from the real-time viewport.

  11. Of course the interface setup really depends on personal tastes, so feel free to change it as you like. For the sake of simplicity in this book, when explaining some passage I will refer to the interface setup you will find in the various chapter's scenes.

  12. Well, I think that now we are really ready to set up our first Cycles scene!