From the last chapter, you should understand some of the very specific EEVEE material techniques that you can employ in your art and design. Practicing the creation of materials will only make your art better. But there's another topic that contributes to the look of your concept as much as, if not more than, materials, and that topic is lighting. Lights influence how we see things and how we understand their interaction with other objects; our materials aren't going to even be visible if we don't add lights to our scene.
In this chapter, we're going to walk through lighting an outdoor scene with EEVEE. Cycles has multiple additions to its rendering engine that make rendering things outside a lot easier, including Global Illumination and the Nishita Sky shader. But lighting a scene in EEVEE is possible too, especially if we use the render panel to add some effects and are smart about how we use the tools that we do have.
In this chapter, we will cover the following:
In the last chapter, we left off at creating two materials, but we didn't delve into creating materials for every single piece of the mini-project. If we were to do that, this book would be thousands of pages long, and you wouldn't want to read it. So, from this point, there are two options: you can download Mini-Project-Chapter 3 from GitHub and start with a file that has materials I've created for you, so you can jump straight into lighting.
The other option is to take the file from the last chapter that you worked on and use it to practice creating materials using the methods we went over so that when you get to this point, you won't need to download the aforementioned file. Do whatever you're most comfortable with. Regardless of your choice, make sure to download the resources for this chapter as well, so you have access to the HDRI I'll be using: https://github.com/PacktPublishing/Shading-Lighting-and-Rendering-with-Blenders-EEVEE/tree/main/Chapter03.
Material Creation Resources
Obviously, there are hundreds of approaches to creating materials, and YouTube is a great resource to get tutorials from. One channel that I would recommend is CG Cookie; their small videos are great bite-sized pieces of really useful information. Do a YouTube search for topics that you may want to know more about to get more information about the truly expansive topic of material creation. For more information on material creation, check out: Top 6 Blender Nodes To Make Any Material in Blender https://www.youtube.com/watch?v=yffWd4kI51Q.
Lighting is the cornerstone of any good render, and in this chapter, we're going to work through the process of adding lights, tuning them to suit our overall environment, and then making sure they work properly inside of EEVEE. I'll cover both the artistic and technical aspects of what we're doing. We'll add a world lighting system and a few simple lights and then consider some of the ways EEVEE can be used for better lighting, especially in the compositing stage.
If you've been following along (or downloaded Mini-Project 1-Chapter 3), you should have something resembling what I have here, a scene with a lot of materials but not a lot of lighting:
Let's start to fix up our lighting by adding a world lighting system and tweaking it so we still get some good shadows inside the scene:
You should now be able to see the world lighting system we just added in the viewport.
Cool! But if you look at the render viewport, you might notice something is wrong with the lighting we just added... There aren't any shadows! In the next section, we'll figure out how to manipulate our HDRI so it gives us a background but allows us to substitute other aspects for the shadow-casting light.
In order to better manipulate our environment texture, let's flip over to the world shader material space:
Now that we have the node graph open, we can start to change what is happening in the scene:
Why are we using an HDRI just as our background without using the light from the HDIR? Well, as we discussed before, EEVEE doesn't have Global Illumination (yet), so the HDRI light won't actually bounce around our scene and produce shadows. As you can imagine, having no shadows makes everything look very strange and completely unnatural, which is not the look we're going for here. So, we limit the HDRI to the background of the scene and now we can work on creating shadows and highlights with the tools given to us in EEVEE, building on the basis of the HDRI. In the next section, we'll add some light objects and configure them to work with what we just created.
HDRI Resources
HDRIs are amazing resources, but for your average 3D artist, it can be hard to make your own. Luckily, there are a couple of sites that provide free HDRIs for a variety of environments. HDRLabs is one that I personally use for most of my projects. Poly Haven also has a great collection:
http://www.hdrlabs.com/sibl/archive.html
Now the HDRI is set up with EEVEE, we have an idea of how to light the scene, based on what our HDRI already has. We have an HDRI that has a lot of ambient blue light and a sun ray that comes from the right to the left on our screen. So, let's create some lights to mimic that setup, but since these lights are objects, EEVEE will be able to calculate their shadows. The first light we'll create is the area light.
Area lights can be added through the standard Add menu, which can be accessed by hitting Shift + A and then navigating to Lights and clicking on the Area option. You should now be able to see the Light options menu in the right toolbar by clicking on the Light options button while the area light is the active object in your scene:
My area light properties look something like this:
At this point in time, the light we have probably won't be all that impressive. The area light is only meant to simulate an ambient light that is diffusely reflected from the sky, so our house should be illuminated a little bit, but not much. Let's add a sun light, which does exactly as advertised... simulates the sun!
Sun lights can be found in the same menu as the area light, so go ahead and add one and navigate to the Light Options tab for our sun light object:
Right now, the light in our scene should be pretty close to what we would have achieved with the HDRI, but with shadows. The materials we created in the last chapter react to the lighting that we have in the scene, so now is the time to look over them again and tweak them if necessary.
EEVEE can sometimes pose problems to a normal workflow, such as shadows not working with an HDRI, but with some quick and clever thinking, it's pretty easy to overcome the setback. In later chapters, we'll learn more about complex lights that need to be baked for EEVEE, but for now, let's leave this simple outdoor lighting setup as is.
In this subsection, we've worked on adding a lighting system that works with EEVEE and you understand a little more of the eccentricities of working with a real-time renderer. In the next section, we'll work on adding a camera and setting up the composition.
The camera is maybe one of the most important parts of creating a 3D scene, because if you don't have a camera, you won't be able to render the scene and save it. But it's often very difficult for Blender users to use the camera intuitively and frame a shot with a composition that makes sense. In this section, we'll create a camera and go over some useful ways of using that camera, for both a general workflow and an EEVEE workflow.
Let's add a simple camera to our scene. We'll use the typical workflow of Shift + A and then select the camera. This adds a camera to wherever our cursor is in the scene. Working with the camera like you would any other object, by selecting it, using the transform, and moving it, is very difficult. You can't see what the camera is seeing and it's hard to narrow in on a shot. So, we'll use two very cool tools here to position our camera the way we want:
We've successfully added a camera and used two distinct methods to edit the camera view, therefore providing us with a better way to compose our render. Next up, we'll explore some camera properties that can help you create a better render.
You might be aware that in Cycles, there's a way to create a render border, so you don't render anything that's outside of the camera view in preview. This functionality doesn't exist in the same way inside of EEVEE; we have to use the camera properties to mimic this function:
Another really interesting setting is a submenu of the Viewport Display menu, the Composition Guides. These guides provide different overlays to assist with composition. I like to use the Thirds option (which can be activated by checking the box) to line up the features of interest on where the lines intersect. This is called the rule of thirds and is a very traditional way of composing an image.
Learning More about Composition
Composition and design are infinite topics that you could spend a lifetime studying and still not know everything about. I would suggest learning some basic photography concepts as you advance in your career in Blender. Online resources are very useful to get an overview of composing and also understand more about lighting and design in general. Check out this site if you want to start learning about the Rule of Thirds and other Composition concepts: https://digital-photography-school.com/rule-of-thirds/.
Now that we've learned about composition and some materials, we'll briefly discuss a new aspect of Blender 3.0 that streamlines the process of creating cartoon-style line art.
A quick, cool effect to add further interest to the house in the sky we're building is the Line Art modifier. This is a brand-new modifier that was added with the past release of 2.93. Previously, there was a postprocessing ability to add lines to the geometry of your objects, but now we can actually see that in the viewport; so, let's give it a try and see whether we can push this house we're working on to be a little more stylized. The Line Art modifier only works if you already have a camera in the scene, so that's why we're adding the Line Art modifier now.
The Line Art modifier only works with a Grease Pencil object, so let's add a Collection Line Art object to the scene.
Side Note
Shift + A is the shortcut for the Add menu, something that I recommend you use instead of the more laborious Add button on the menu bar.
Change Source Collection to House and Target Layer to Lines.
Target Material only takes Grease Pencil materials. I have mine set to just a simple black color, but you can go into the Grease Pencil material toolbar and add any number of line colors to try out. Materials in Grease Pencil work similarly to other materials, but in this menu, you have the option to fill or just render a stroke. Try out some of these options and see whether you can come up with something you like.
My final Line Art modifier renders lines onto my object inside of the 3D viewport. It's also an awesome feature if you just want to render lines for a "blueprint" effect.
Side Note
You may notice a slowdown in your processing ability with the Line Art modifier when you try to go into edit mode. I recommend adding the Line Art modifier when you're done with a piece of the scene and are ready to render, or hide it from the viewport while you work on other things to save yourself some lag and possible crashes. It's still a feature very much in development, so bear that in mind when using it.
The Line Art modifier is a work in progress I hope you can now see the power of such a feature and the ways to use it in your future art.
In this chapter, we looked at lighting cameras and the Line Art modifier, covering some of the peculiarities of working inside of EEVEE. We're already seeing that EEVEE can sometimes provide roadblocks that can be annoying to navigate around, but overall, being able to see our render in real time far outweighs those pain points. The Line Art modifier in particular is something to keep an eye on, as more features for this tool are added in future versions of Blender. This is just the beginning of this powerful feature.
I hope that you are starting to grasp the awesome power of EEVEE and are ready to take the work we've done, add some simple volumetrics, and then render it out as a full scene in the next chapter.