35,99 €
Blender is one of the most versatile tools in the 3D software industry, and with a growing audience and constantly expanding set of features, it has become more powerful, useful, and in demand than ever before. This updated fourth edition of Photorealistic Materials and Textures in Blender Cycles is an all-inclusive guide to procedural texturing, rendering, and designing materials in Blender, covering all aspects of the 3D texturing workflow.
The book begins by introducing you to Blender’s material nodes and material property functions, and then helps you create photorealistic textures by understanding texture maps and mapping them to 3D models. As you advance, you’ll learn to design high-quality environments and lighting using HDRIs and Blender’s lighting options. By exploring, breaking down, and studying the underlying mechanics that allow you to develop these elements, you’ll create any material, texture, or environment and use it to improve your artwork and present them in a professional way. Finally, you’ll discover how to correctly set up scenes and render settings, and get to grips with the key elements of achieving realism.
By the end of this book, you’ll have gained a solid understanding of materials, textures, shading, lighting, rendering, and all the critical aspects of achieving the highest quality with your 3D artwork.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Veröffentlichungsjahr: 2023
Photorealistic Materials and Textures in Blender Cycles
Create impressive production-ready projects using one of the most powerful rendering engines
Arijan Belec
BIRMINGHAM—MUMBAI
Copyright © 2023 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 or its dealers and distributors, will be held liable for any damages caused or alleged to have been 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.
Group Product Manager: Rohit Rajkumar
Publishing Product Manager: Kaustubh Manglurkar
Book Project Manager: Aishwarya Mohan
Executive Editor: David Sugarman
Technical Editor: Simran Ali
Copy Editor: Safis Editing
Proofreader: Safis Editing
Indexer: Hemangini Bari
Production Designer: Prafulla Nikalje
Marketing Coordinators: Namita Velgekar and Nivedita Singh
First edition published: January 2011
Second edition: June 2013
Third edition: February 2015
Fourth edition: November 2023
Production reference: 1061023
Published by Packt Publishing Ltd.
Grosvenor House
11 St Paul’s Square
Birmingham
B3 1RB
ISBN 978-1-80512-963-9
www.packtpub.com
To the almighty, all-seeing, all-knowing, for giving me the gift of passion and sight.
– Arijan Belec
Arijan Belec is a professional automotive interior designer and 3D modeling teacher with over a decade of experience in various areas of Blender 3D. He has published multiple books and courses, and over 100 online tutorials on his fast-growing YouTube channel dedicated to teaching 3D design. Arijan specializes in modeling, texturing, rendering, and post-processing highly detailed and realistic artwork for digital marketing and product visualization purposes. Having worked with high-end clients on custom, top-quality luxury designs, he is laser-focused on achieving the highest quality models, materials, and renders without sacrificing one skill to strengthen another.
Aditya Pathak gained a BTech in CSIT from Symbiosis, graduating in 2021. Now, with 5 years of experience at organizations such as Binance, Dell, Byjus, Evofox, and Anivive, his engagements have spanned various sectors, from gaming and hardware to pharma and entertainment, helping him gain a broad perspective on technology.
Aditya’s skills include 3D modeling, animation, motion graphics, and commercials. He has focused on ensuring that technical know-how aligns with the specific needs and narratives of his clients.
Neil Lasrado, also known online as Rendergene, has a mechanical engineering foundation. Driven by mathematics, physics, and design, Neil sculpts 3D digital landscapes via Blender, catching eyes such as Xoogler, FalconX, Motionvillee, Fruitbowl, and JBL.
Pursuing an MA at MMU, Neil is inspired by Unreal Engine’s capabilities. A dancer, gamer, and tech enthusiast, Neil is a multidimensional creative.
Wilson Guillaume is a husband and father of four. Originally from the state of Florida in the United States, he has been a 3D/digital artist for the last 20 years and is co-founder of G7 Comics. His career began as a 3D artist and one of his great achievements was his contribution to the major motion picture Mr. Magorium’s Wonder Emporium. Wilson is one of the creators of Dark Child, a supernatural graphic novel thriller based on Haitian folklore. He is currently working on a couple of major animated projects while enjoying time as a family man.
Photorealistic Materials and Textures in Blender Cycles is a guide to creating impressive, high-quality materials, textures, and renders for 3D models and scenes in Blender. This book begins by introducing the fundamental principles behind Blender’s material mechanics, before diving further into more advanced methods of texturing. To achieve the most impressive results, this book also focuses on methods and techniques for highly realistic lighting and rendering.
This book will benefit beginner, intermediate, and advanced 3D artists from various areas of 3D design who are looking to deepen their understanding of the concepts and methods used by professionals to create top-quality materials, textures, and renders.
Photorealistic Materials and Textures in Blender Cycles will be useful for game developers, architectural visualizers, product designers, interior designers, advertisement producers, digital content creators, and any other professions that require the production of high-quality, aesthetically pleasing, realistic 3D objects.
Chapter 1, Creating Materials in Blender, introduces the fundamental principles of materials and material properties in Blender.
Chapter 2, Introducing Material Nodes, introduces material nodes, a Blender mechanism used for controlling and tweaking materials and material properties.
Chapter 3, Mapping Images with Nodes, covers how to display saved images and textures on 3D models using a special set of material nodes.
Chapter 4, Achieving Realism with Texture Maps, explains the functions of special images called texture maps, used for adding details and features to materials to make them more realistic.
Chapter 5, Generating Texture Maps with Cycles, discusses the creation of custom texture maps, allowing us to take any image texture and add higher levels of realism and detail to it.
Chapter 6, Creating Bumpy Surfaces with Displacement Maps, covers harnessing special texture maps to control the geometry of a 3D model and create unique surface details and imperfections.
Chapter 7, UV-Unwrapping 3D Models for Texturing, details unwrapping 3D models to allow for more precise texture mapping and creating custom textures.
Chapter 8, Baking Ambient Occlusion Maps, explores using the lighting from a scene to create special images to shade 3D models and make them appear more realistic.
Chapter 9, Introducing Texture Painting, covers how to create custom texture details with Blender’s special texture painting tools.
Chapter 10, Creating Photorealistic Textures on a 3D Model, applies the learned texturing tools and techniques by completing a 3D model with realistic materials and textures.
Chapter 11, Lighting a Scene in Cycles, introduces the various forms of lighting in Blender and covers how to use them to create beautiful lighting environments for our scenes.
Chapter 12, Creating Photorealistic Environments with HDRIs, explores 360-degree images of real-life environments to create custom world backgrounds and photorealistic lighting and reflections for our 3D projects.
Chapter 13, Preparing the Camera for Rendering, explores camera settings and properties and covers how to use them to create perfect angles for our renders.
Chapter 14, Rendering with Cycles, covers controlling and optimizing render properties to create the highest quality render results.
To get the most out of this book, it is best to have some basic previous knowledge of the Blender interface, as well as basic modeling skills. It is assumed that the reader has a beginner-level grasp of fundamental skills, such as orientating in the 3D world, navigating through property menus, and using basic modeling tools, including grabbing, rotation, and scaling.
Software covered in the book
Operating system requirements
Blender 3D 3.4
Windows, macOS, or Linux
GIMP
If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
If you do not have a grasp of the basic functions of Blender required to follow this book, you can easily learn about these by watching any free, online, beginner Blender tutorials.
You can download the exercise files for this book at https://packt.link/mA1OU
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Ensure that you have access to the Chapter 2 Camo Texture.png file from the resource download.”
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Click on the plus button in the Material Properties tab to add a new material slot.”
Tips or important notes
Appear like this.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Once you’ve read Photorealistic Materials and Textures in Blender Cycles, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.
Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.
Thanks for purchasing this book!
Do you like to read on the go but are unable to carry your print books everywhere? Is your eBook purchase not compatible with the device of your choice?
Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.
Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.
The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily
Follow these simple steps to get the benefits:
Scan the QR code or visit the link belowhttps://packt.link/free-ebook/9781805129639
Submit your proof of purchaseThat’s it! We’ll send your free PDF and other benefits to your email directlyPart 1 focuses on introducing the central principles of creating materials in Blender by teaching the basics of how to create simple materials, how material nodes work to control material properties, and how to apply textures to 3D objects.
This part has the following chapters:
Chapter 1, Creating Materials in BlenderChapter 2, Introducing Material NodesChapter 3, Mapping Images with NodesGenerating high-quality materials and textures is a big and important step in any area of 3D design. With the right skills, tools, and techniques, you can turn your untextured 3D models into beautiful photorealistic scenes and artwork. That is exactly what we are aiming for in this book. Therefore, we will study the underlying mechanics of materials and textures in Blender, and learn how to produce the highest quality results, to teach you how to finish and present your work in the most attractive way possible.
In this chapter, we will learn to create simple materials in Blender. We will first prepare our workspace, optimize it for a material creation workflow, and introduce the interface, before creating our first materials. We will learn to control key material properties including base color, roughness, and specularity, among others.
We will cover the following topics in this chapter:
Preparing the Shading workspaceCreating materialsAdding multiple materials to an objectTweaking material propertiesIn this book, we will be using Blender 3.4.1. However, the same principles and methods will most likely be applicable in earlier versions of Blender.
The latest version of Blender can be downloaded at the following link:
https://www.blender.org/download/
Blender’s official website states the following minimum hardware requirements:
64-bit quadcore CPU with SSE2 support8 GB RAMFull HD displayMouse, trackpad, or pen and tabletGraphics card with 4 GB RAM and OpenGL 4.3 supportLess than 10-year-old system and OSThese specifications are defined by the official Blender website as the minimal requirements, but higher specifications will obviously lead to better performance.
The prepared resources can be found in the Chapter01 folder within the book’s downloadable resources folder, available here: https://packt.link/mA1OU.
Blender has multiple workspaces. A workspace is simply a way of arranging the windows and tools in Blender to make them more convenient for a particular job. For example, the Modeling workspace makes available the most important modeling tools and windows. The Shading workspace will do the same but for shading and material creation. We will work in the Shading workspace because it provides us with all the tools we need for now.
By default, Blender displays four separate windows in the workspace, as indicated in Figure 1.1.
Figure 1.1 – Default Blender workspace
To work with materials, we will need some different windows. To save time, we can avoid having to open these windows manually by clicking on the Shading button on the bar at the top of the screen, as shown in Figure 1.2.
The Shading workspace has some new useful windows for texturing and creating materials. We now have a Shader Editor window, which we will later use for creating and working with material nodes. On the left side of the screen, we have an Image Editor window and a File Browser window. These windows can help us load and preview images and navigate through our computer to find images and files.
We also have an HDRI in the background, and an HDRI previewer. This changes the environment in our scene to give us a better idea of what the object would look like with realistic lighting coming from a particular environment. We will learn more about HDRIs later.
Figure 1.2 – Shading workspace
With just one click, we have prepared our workspace for material creation and texturing. Next, we will start creating some simple materials.
We will now learn to create new materials and control some of their basic properties. We will also learn to apply multiple materials to a single object, which will be useful for texturing models more complex than the default cube.
In the next few steps, we will create a new material and change some of the properties of that material:
Navigate to the Material Properties tab on the right side of the screen and click the New button to create a new material.Figure 1.3 – Default Material in the Material Properties men.
In the Surface menu below the default material, find the Base Color box. Clicking on this box will open the color wheel, where you can choose any color for the material.Let’s create a military green color to practice some of the color controls. We will click on the green/yellow area in the outermost part of the color wheel, as shown in Figure 1.4 (bottom).
Figure 1.4 – Base Color box (top), opening the color wheel (bottom)
Use the Value slider next to the color wheel to reduce the brightness of the color. This brightness is referred to as Value.You can manually type in a value in the slider below the color wheel, marked in Figure 1.5.
Figure 1.5 – Adjusting the Value setting of the base color
Use the Saturation slider to reduce the saturation of the base color.This will make the color appear paler, as if the color got washed out. In this case, we need to use the slider to get the color that we want. As you move the slider, the marker moves closer to the center of the color wheel. The closer the marker is to the center of the color wheel, the lower the saturation.
Figure 1.6 – Adjusting the Saturation setting of the base color
We went over some settings in our default material and changed the color of our cube. Next, let’s go over how to create a second material so that we can have different materials on different parts of an object.
We will now learn how to add multiple materials to a single object. In the next few steps, we will split our cube in half and create a separate material for each half:
In Edit Mode, add a loop cut with Ctrl + R to cut the cube into two parts.Figure 1.7 – Adding a loop cut to a cube
Click on the plus button in the Material Properties tab to add a new material slot.This will not create a new material; it will only create a new slot. We can use this slot to either create a new material or load an existing material from another object. This time, we need a new material.
Figure 1.8 – Adding a new material slot
Click on the New button to create a new material. The new material will be named Material.002by default.Figure 1.9 – Creating a new material
Switch to Face Select mode by pressing 3, and select one half of the cube in Edit Mode. Then select the new material (Material.002) and click the Assign button.Figure 1.10 – Assigning the new material to one half of the cube
The selected half of the cube now has the new material assigned to it, and our cube has two materials on it.
Figure 1.11 – A cube with two materials
While we are at it, let’s add some color to the new material. We will soon start learning about some other material properties, so let’s make the other material a similar color but not the same. This will allow us to compare the shading on the two materials.
Figure 1.12 shows the color properties of the new material.
Figure 1.12 – New material color properties
We have now learned to create new materials and assign them to an object so that we can have multiple materials on one object. Next, we will introduce some other important material properties that we need to develop a good understanding of if we want to create realistic, high-quality materials.
In this section, we will learn about new material properties such as Roughness, Specular, Metallic, and more. This information will help us improve our understanding of how materials work in Blender, which we can then put to good use to create high-quality materials and textures.
The Specular property is used to determine how much light is reflected by a surface. If you rotate the cube in the 3D viewport, you will notice that the object has a shiny surface, as is visible in Figure 1.13. This is because the object is specular.
Figure 1.13 – Specular surface
We can control the specular level using the Specular slider in the Material Properties tab, as shown in Figure 1.14.
Figure 1.14 – The Specular slider
When we reduce the specular level on one of the materials to 0.000, light will no longer be reflected by the surface and it will become much darker, as shown in Figure 1.15.
Figure 1.15 – Specular set to zero
Let’s bring the specular level of both materials back to the default 0.500 so that we can demonstrate another, perhaps more important material property called Roughness.
The Roughness property is used to control how clear or rough a reflective surface appears. If we set the Roughness level to 0.000, the reflection of the material becomes clear, as shown in Figure 1.16.
Figure 1.16 – Roughness set to zero
This is because the Roughness level determines how much scattering there is in the light reflected by a surface. Figure 1.17 presents a diagram depicting how light rays are reflected by a surface with high roughness compared to a surface with low roughness.
On a surface with high roughness, light rays are scattered randomly due to (simulated) micro-imperfections on the surface, making the reflected image appear blurry. On a smooth, low-roughness surface, all the light rays are reflected at exactly the same angle, keeping the reflected image sharp and clear.
Figure 1.17 – Roughness level impact on light ray behavior
A low roughness value applies to materials such as car paint, polished wood, gold, glass, water, and other materials with smooth surfaces.
A high roughness level still reflects the same amount of light, but the light is scattered so the reflection is not clear at all, instead showing just an even increase in brightness across the entire surface, as in Figure 1.18. A high roughness level applies to rough materials such as concrete, rubber, plywood, galvanized metal, skin, and most fabrics.
Figure 1.18 – A material with a roughness value of 1.000
We discussed the three most basic material properties. We will now look at some properties used for more specific situations, starting with the Metallic property.
The Metallic property is used to make materials look more like they’re made from metal. Let’s introduce how the Metallic property works with the help of some background information.
We can sort all materials into one of two groups: metals and dielectrics. Iron, gold, silver, aluminum, copper, and all other metals naturally fit into the group of metals. Every other material, including stone, dirt, wood, plastic, rubber, and virtually everything else, is dielectric. These two groups are defined in physics by their electroconductive properties, but they are relevant to us because they reflect light in a distinctly different way.
Figure 1.19 shows two spheres with almost the same material. They have the same base color, specular, and roughness properties. The difference in their reflectiveness is caused by the different metallic values. We can put this difference into words by saying the reflection in the left material is as if we are looking through red-tinted glasses, while the right reflection looks like an image with a red overlay. Regardless, the difference is obvious and important to keep under consideration.
Figure 1.19 – Metallic versus non-metallic shaders
To make a material metallic, simply turn the Metallic value all the way up in the Material Properties tab.
Figure 1.20 – Metallic slider
We will use this property later to create some more realistic materials. Next, let’s talk about the Clearcoat property.
The Clearcoat property can be used for simulating a layer of polish on a material. As an example, let’s look at a material such as carbon fiber. In Figure 1.21, we can see the bumpy fibers that we need for the material (which we will learn to create with normal maps), but something is still missing.
Figure 1.21 – Carbon fiber material before Clearcoat
To complete the material, we will increase the Clearcoat level in the material properties, as shown in Figure 1.22. For the best result, also set Clearcoat Roughnessto 0.000.
Figure 1.22 – Adding the Clearcoat property
As we can see, there appears to be a transparent layer of coating on the surface of the material, hence the name clearcoat.
Figure 1.23 – Carbon fiber after adding the Clearcoat property
This property can be used to finish other materials, such as polished wood. Next, we will introduce one last material property before we move on to studying material nodes.
Emission is a property that defines how much light a material produces and casts into the environment. The emissive nature of an object is controlled separately by the emission color and strength values. These factors are self-explanatory, and their default values are black and 1.000, respectively.
Figure 1.24 – Emission color and strength
If we set the emission color to a bright green, the object will turn slightly green, but the difference is hardly visible, as shown in Figure 1.25.
Figure 1.25 – Emission in Material Preview
To make this difference more visible, we need to render the light in our scene. This means that we will no longer use the temporary environmental lighting that we have employed until now. Rather, we will tell Blender to render the light as it is emitted from real light sources in the scene.
In the following steps, we will render the light and make our emission effect more visible:
In the Render Properties menu, set Render Engineto Cycles.Figure 1.26 – Render Properties tab
In the top-right corner of the screen, switch to Rendered View.Figure 1.27 – Rendered View
Now, in Rendered View, the scene looks more realistic and the cube appears to be emitting light.
Figure 1.28 – Scene in Rendered View
We now have an idea of what the Emission property does. Later, we will learn to use the emission property to our advantage when creating beautiful materials and rendering environments.
In this chapter, we went over some of the basic and common material properties. We learned about the base color, specular, roughness, metallic, and emission properties and we gained an understanding of the different factors that need to be considered to create high-quality materials.
In Chapter 2, Understanding Material Nodes, we will introduce material nodes and learn to use their powers to gain greater control over material properties, which will allow us to create much more sophisticated and realistic materials and textures.
In this chapter, we will begin to explore Blender’s powerful material generation system known as Material Nodes. We will learn what they are, why they are so important, and how we can use them to create photorealistic materials. Starting with the basics, we will go over the most important nodes and then progress to creating some more sophisticated node combinations. By the end of the chapter, you will be ready to create some basic materials and textures and will feel comfortable exploring all the other material nodes and combinations.
The following topics will be covered in this chapter:
Understanding the default nodesCreating textures with the Image Texture nodeExploring powerful nodesGenerating a camouflage textureEnsure you have access to the 'Chapter 2 Camo Texture.png' file in the 'Chapter02' folder within the book's downloadable resources available here: https://packt.link/mA1OU.
Let’s begin by studying the default nodes. In the Shader Editor window, we will find two nodes, as shown in Figure 2.1.
Figure 2.1 – Default nodes in the Shader Editor
We will learn what these nodes are, what they can do, and how they work together to create materials.
The big node from Figure 2.1, with lots of sliders and buttons, is called the Principled BSDF node. You probably noticed that this node has almost all the sliders and properties from the Material Properties tab on the right side of the screen, as shown in Figure 2.2.