• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

A Multipass Lighting Composite

A Multipass Lighting Composite

In this exercise, you'll composite a scene with a typical three-light setup—a key, a fill, and a rim light (also known as a back light). By taking advantage of a fairly simple Shake script, you can make significant changes to the scene lighting fairly easily. For this and the following sections, we'll be focusing on the key light. Later, we'll introduce the other two lights: fill and rim.

Compositing the Key Light

Start Shake.

Select File > Open Script.

Go to the Appendix/scripts folder on the DVD and load the LightStart.shk script.

You'll find four FileIn nodes, named Key_Diff, Key_Spec, Key_Refl, and Key_Shad.

Click on the left side of each of these clips to load them into the Viewer.

Each of these layers represents a different render pass of a light in our 3D scene of an Alien Bone Museum. This light is the key light, the light which is intended to bring out the main characteristics of the scene.

We've broken the scene up into four very common passes, though you can have other passes if it suits the scene being rendered. The Key_Diff file contains the diffuse information—basic color or shading. The Key_Spec contains the specular or “shiny bits” of the scene. These are the highlights on reflective and metallic objects, where the light seems to gather. The Key_Refl contains the scene's reflections. Finally the Key_Shad is a shadow pass, containing a grayscale “map” of where the shadows fall on the background.

Select Key_Diff and insert an IAdd from the Layers tab. Connect a noodle from Key_Spec to the second input knot of the IAdd. Double-click on IAdd1.

We've now combined the diffuse and specular passes.

Add another IAdd from the Layer tab and connect Key_Refl to the second input.

Finally, connect an ISub from the Layers tab to IAdd2 and then connect Key_Shad to the second input of ISub1. View the final composite by double-clicking on ISub1.

Subtraction is one method of applying the shadow, multiplying is another. We'll try the multiply method next.

Ctrl-click on IMult from the Layers tab, replacing ISub1.

Something's not right. In order for the multiply to work, the shadow pass matte must be inverted. Once inverted, wherever the matte is white (no shadow), the image will remain at the same brightness; wherever it's gray, the image will be darkened. (In Shake, white is given the numeric value of 1. Any number multiplied by 1 is itself—3 × 1 = 3, 5 × 1 = 5, and so on. So wherever the inverted matte is white (areas with no shadow), the image is unchanged. But if the matte is darker (areas of shadow), the image is multiplied by a number less than 1, which lowers the brightness of those pixels and causes a shadow. Think about it for a moment. It'll make sense.

Select Key_Shad (by clicking on the center of the node) and insert an Invert from the Color tab.

Looking at IMult1 you can now see the shadow, although it's much more subtle than the one created via the subtraction method.

So what's the big deal? We've just put all the layers back together the way they would have been rendered out of Maya if we'd never made render passes. Where's the fun in that? Well, we need to add some controls to the interface before its true power becomes apparent.

Select Key_Spec and add to it a Brightness node from the Color tab. Rename Brightness1 to SpecLevel.

Also add separate Brightness nodes to Key_Refl and Key_Shad, renaming the new nodes ReflLevel and ShadLevel, respectively.

Select IMult1 and insert a Mult node from the Color tab. Rename Mult1 (not IMult1) to MasterLevel.

Save your script.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint