Join Mark Lefitz for an in-depth discussion in this video Setting up image-based lighting, part of Photorealistic Lighting with Maya and Nuke.
Now, we can use our HDRI image to begin lighting the geometry. The workflow I suggest you use is to dial in your image-based lighting first, then add your physical lights to the scene. Tweak the intensity of the IBL until it feels comfortable using final gathering to get the desired look and feel. Let's go ahead and hide the ground plane; select it, Ctrl+H, and let's open up our Render Settings window. Next, let's go to the Indirect Lighting tab.
Next to Image Based Lighting, select Create. Next to the Image Name, let's browse for our quarter-sized color corrected HDRI image. Select it, and Open. It's important to make sure that the Mapping is set to Spherical. Also, if we scroll down, notice that there is a Primary Visibility toggle. This is very important, because when we do our final render, we want to make sure Primary Visibility is set to off. That way, when we render, we don't see the IBL in the background.
But for our purposes right now, let's select it to on, so when we are in our viewport, we can actually position the IBL, and view it. Let's go back to the Render Settings window, and turn on Raytracing, and Final Gathering. So, under Features, Raytracing; on. Back to Indirect Lighting, and let's turn Final Gathering on. Let's just leave these at default settings for now. And now is a great time to do some test renders. Let's minimize our Render Settings window.
Render the current frame using mental ray. So, as you can see, we are starting to get a little bit of lighting in here, but what we are going need to do is we are going to increase the value of the IBL. Let's go back to the Render Settings window, Indirect Lighting tab; let's go to the Image Based Lighting file. Under Color Gain, let's select the color swatch, and increase the value to 4, and go ahead and save this render in our render buffer, and let's do another render.
We can always go back to the Color Gain in the Render Settings window, and dial it in to taste. If we close our Render view for a moment, let's go to our Perspective view; spacebar, and then right-click; Perspective View. Now, let's turn our lighting hardware to 6. That way we can view our IBL in our Perspective view. In the OpenGL view, we see a seam where the ends of the image meet. This is not the most desired effect, but because we used normal lens, and had paint in the gaps, the HDRI is not perfectly spherical.
But we can position it in such a way where we will not see that seam in our final render. Also notice that our sun is coming from the opposite side of the car from where it needs to be, based on our back plate. This is because the HDRI image was taken at a much later time of the day than the early morning of the back plate, nut this can be corrected in Nuke. So, let's go ahead and open up Nuke. We have our color corrected HDRI file.
We view our color correction node. What we can do is we can add a reformat to flop the sun to the opposite direction. So, let's go ahead and hit Tab, type in Reformat to bring the Reformat node below the ColorCorrect. Now, under type, we set it to scale. We make sure the scale is 1. So there's no change in scale from the original image file. Now we simply select the Flop node, which takes the sun, and the entire image, and flops it around, keeping the same scale.
In the Write node, let's go ahead and add the word flopped, with an underscore, and let's go ahead and render that out, which I already have done. So, let's go back to Maya. Back into our Render globals; our Render Settings window. Let's go to our Image Based Lighting, and now we browse for the flopped version, color corrected. Now when we view the HDRI in the OpenGL, we notice that the sun is coming from the opposite side of the car, much more in line from where the sun is coming in the back plate.
Let's go back to our shot camera, and let's do another render. Let's put this one in the buffer, and hit Render. Now, we can look at the different types of images that we get. We notice here that the sun is coming from the left side. In our new render, the sun is coming from the proper direction of where the back plate was shot. Feel free to play around with the rotation and the intensity of the IBL to create different looks. Once you have something you like, we need to determine how large to render our file.
- Understanding image-based lighting
- Analyzing and color correcting the background plate
- Creating a 3D camera to match the plate
- Lighting with low-quality settings and proxies
- Setting light samples
- Setting up render passes
- Rendering mattes ground shadow, and occlusions passes
- Adding gamma correction in Nuke
- Adding the object to the plate and rendering the final composite
- Retouching the composite using Photoshop