Lighting for Speedy Renders

Six additional controls for lamps exist. I like to refer to them as my “cheat buttons” because they're incredibly useful for achieving lighting effects that are difficult or impossible in the real world. The functions that these options control are really what makes lighting in 3D computer graphics so powerful. More often than not, if you use these controls effectively, they can speed up your render times without having a negative effect on the overall quality of your image. Figure 9-10 highlights these controls in the lamp Object Data Properties.

Figure 9-10: The cheat buttons in the Lamp panel.

image

Here are descriptions of each cheat button in the Lamp panel:

  • Negative: What this check box enables is, in my opinion, one of the coolest capabilities in CG lighting: inverting the light's output. You can basically shine darkness on your scene, an impossibility in meatspace that opens the door to all sorts of interesting uses. If part of your scene is too bright or you want to have deeper shadows, don't play with adjusting the Energy of your lights or increasing the Samples for your shadows. Just shine some darkness on the area with a negative light!
  • This Layer Only: Enabling this control makes the light illuminate only the objects that are on the same layer as the light. In real-world lighting, technicians do a lot of work to hide or mask out some lights, so they illuminate only certain parts of the scene. For example, you may want to brighten up the environment without making the lighting on your characters any brighter. Because you're in CG, you don't have to mask anything out: You just enable this check box and make sure that your characters aren't on the same layer as the light.
  • Specular: In three-point lighting, you want to reduce the highlights produced by the fill so that they don't compete with the key's highlights. Meatspace lighting technicians often attempt to reduce the highlights by diffusing the fill as much as possible. In Blender, you don't have to go through the trouble. You can just turn off the lamp's specular highlights altogether by disabling this check box. Pretty sweet, huh?
  • Diffuse: Sometimes when you're lighting, you want to have fine control of your highlights, but you don't want to change the basic illumination of the scene. If you turn off shadow casting for the light and disable this check box, you're basically left with a specular highlight that you can move around your subject at will. This feature isn't commonly used, but having it available has certainly made my life easier more than once.

The last two cheat buttons are in the Shadow panel, farther down Object Data Properties for lamps. The following describes each one:

  • This Layer Only: This check box works like the corresponding checkbox in the Lamp panel, but only relates to shadows.
  • Only Shadow: Enabling this option allows your lamp to cast shadows without adding more light to the scene. I sometimes use this option to reduce render times by using buffered Spots for shadows while using other lamps without shadows for main illumination.

image Any object — even lamps — can exist on multiple layers. This ability dramatically increases the power of layer-only lamps and shadows. With the lamp selected, press M to reveal the layer selection pop-up. To place your lamp on more than one layer, Shift+left-click the layer buttons you want it on.

I often tell people that when it comes to computer graphics, if you're not cheating or faking something, you're probably doing it wrong. Even though you can get great results by using ray traced shadows everywhere with the highest number of samples, these results all come at the expense of high memory usage and lengthy render times. So your scene may look perfect, but if you're taking 16 hours to render every frame in an animation, you could be rendering for a month and not even have two seconds of it done.

A large part of being a CG artist is doing everything you can to reduce the amount of work that needs to be done by both you and the computer, while still creating high-quality images. You don't want to be old and gray by the time your first animation is complete. That's why CG artists worry so much about keeping their render times as short as possible and why they use features like these cheat buttons to cut corners where they can.

Working with three-point lighting in Blender

My preferred lighting rig in Blender usually starts with a three-point lighting setup. Here's what I normally start with:

  • Key: A buffered Spot works well as the key light. Keep all settings at their default values except for the spot Size and Clip range. Set the Spot Size to 60 degrees and activate the Autoclip check boxes for the Clip Start and Clip End values.
  • Fill: Typically, I start with a Hemi with an Energy of 0.5 and the Specular check box disabled in the Lamp panel.
  • Back: Also a Hemi, but the Energy is usually between 0.75 and 1.0 to get a nice rim light. The lamp is behind the subject, so specularity doesn't matter as much, but just to make sure that it doesn't compete with the key's spec, I normally disable the specularity on this light as well. Don't get too picky with the location of the back light just yet. Back lighting in CG is a bit tricky; it's one of the rare situations where real-world lights have an easier time yielding the desired effect. For that reason, you end up tweaking the location of the back light a lot, so it's not critical that you get it right the first time in your initial setup.

This setup is good for studio lighting, and it works really well for scenes set indoors or for lighting isolated objects. I included this lighting rig on the book's companion DVD.

image The only problem with using a Hemi as your back light is that Hemis don't cast shadows at all. This lack of shadows can be an issue, for example, if you're lighting a character who's speaking. If you use a Hemi as your back light, you find that the interior of the character's mouth is unnaturally lit because the Hemi doesn't allow the character's head to cast a shadow on the inside of the mouth. In this situation, you may be better off back lighting with a Point light or a wide-angled Spot.

Creating a fake Area light with buffered Spots

Using a buffered Spot as your key works nicely, but an Area light can usually give you softer shadows. However, Area lights can use ray tracing only for shadows, and you have somewhat limited control of the Area lamp's shape because it can be only a flat square or rectangle. To get around these limitations, you can get a bit creative with buffered Spots and use them to make your own Area light. To make your own custom Area light out of Spots, start with the three-point rig in the last section and then go through the following steps:

  1. Create a circle mesh (Shift+AimageMeshimageCircle).
  2. In the Last Operation panel of the Tool Shelf (F6), set the number of vertices to 8 and the radius to 2.0; also enable the Fill check box.
  3. Add the Spot to your selection (Shift+right-click), making it the Active object.

    Adding the circle object makes it selected by default, so all you should have to do is Shift+right-click the buffered Spot you're using as your key.

  4. Copy the location and rotation of the Spot to the circle object.

    To do so, open the 3D View's Properties region (N), right-click any of the Location values, and choose the Copy to Selected option from the menu that appears. Then do the same sequence on one of the Rotation values. The circle appears in the same place as the Spot with the same orientation.

  5. Make the circle your Active object (Shift+right-click).

    Both the Spot and the circle are still selected, but now the circle is active.

  6. Parent the Spot lamp to the circle (Ctrl+PimageMake Parent).

    Now if you just have the circle selected and try to move it around, the Spot follows.

  7. Turn on Dupliverts for the circle (from Object Properties, DuplicationimageVerts).

    Dupliverts are a cool part of Blender. When you have an object parented to a mesh, activating Dupliverts on the mesh object places a copy of the child object at every vertex on the parent.

    You now have an Area light created by buffered Spots arranged on a custom shape.

  8. Select your Spot and adjust its settings to taste.

    I typically use the following settings as my starting point:

    • Energy: 0.200
    • Blend: 1.000
    • Samples: 8
    • Soft: 16.00
    • Clip Start/Clip End: These values may need to be manually adjusted to make sure that the shadow appears properly.

Figure 9-11 shows a circular Area light created with buffered spots.

Dealing with outdoor lighting

What if you have a large scene or your scene is set outdoors? The limited lighting cone of a single Spot or Area lamp makes it difficult to illuminate the whole scene in a believable way. For a large or outdoor scene, I usually bounce between one of two solutions. Both of them involve the Sun lamp.

The easiest solution to implement is to change the buffered Spot in the earlier three-point lighting setup into a Sun with ray traced shadows. You get shadows for all objects in your scene, and with the sky and atmosphere settings, you can get a really believable result. That said, lighting your scene this way brings two disadvantages. First, it uses ray tracing for your shadows, which can increase your render times if you're not careful. And second, because the Sun illuminates the same everywhere, you don't have as much control over individual shadows.

Figure 9-11: Using dupliverted buffered Spots to create a buffered Area light.

image

image In contrast to earlier versions of Blender, the ray tracing capability of the current version of Blender is dramatically faster. The ray tracing performance is so much better now that, in some cases, it may be faster to just go ahead and use ray traced shadows instead of fiddling with all the settings involved with Spot lamps. I know of a few projects (my own included) where, in the time I spent trying to get the perfect Spot light settings, I could have rendered my scene with ray tracing and just been done with it.

An alternative solution to using ray traced shadows from a Sun lamp is to keep the Sun for full scene lighting and atmosphere, but leave the shadow creation to the Spot light. To do so, begin with the previous basic three-point lighting rig and proceed with the following steps:

  1. Add a Sun lamp (Shift+AimageLampimageSun).

    I like to put the Sun at the center of the scene. (Press Shift+C to put the 3D cursor at the center before adding the Sun.)

  2. Add the buffered Spot to your selection (Shift+right-click).

    The newly added Sun is selected by default. Shift+right-clicking the Spot also selects it and makes the Spot lamp the Active object.

  3. Copy the Spot light's rotation.

    From the 3D View's Properties region, right-click one of the Rotation values and choose Copy to Selected. Now light from the Sun is coming from the same direction as the Spot. Location for the Sun is irrelevant.

  4. Make the Spot lamp a shadow-only lamp (from Object Data Properties, ShadowimageOnly Shadow).
  5. Disable shadows on the Sun by selecting the Sun (right-click) and then disabling ray traced shadows by left-clicking the Ray Shadow button in the Shadow and Spot panel.

    Done! If you have other objects in your scene that need shadows, make a linked duplicate (Alt+D) of your shadow-only spot and position the duplicate by grabbing (G) it to the correct location.

I include a version of this lighting rig on this book's companion DVD. Feel free to use it in your own scenes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset