Create an HDRi Light Probe

From CGNotebook

Jump to: navigation, search


The purpose of this process is to create an accurate sample of all of the light around a point in a live action scene. This light can then be used to re-light a cg scene, for the purposes of inserting CG characters or objects back into the live action plate. This can be a very powerful process - it puts the same light on your CG elements that's falling in your live scene, enabling seamless composites.


Contents

Required Hardware

There isn't a lot of hardware involved in the creation of a Light Probe Sample. You'll need the following:


We're taking a sequence of photos, and all of them need to be aligned as precisely as possible. Photoshop will help with this process, but it'd be wise to mount the camera on a tripod to keep it still, and use a cable release for the same purpose.


You'll also find it easier to work with the Chrome Ball if it's tripod-mountable, and you have another tripod available.


Hardware Setup

The camera pointing straight at the ball in the middle of the environment.

The camera and ball must be set up in the manner specified at left. There are some important things to note:

  • The camera is directly perpendicular to the ball. The ball should be framed so that it sits in the very middle of the viewfinder, and takes up as much of the frame as possible.
  • The camera should be as far away from the ball as possible. Set your camera to its maximum zoom, and then move the camera away until the ball very nearly fills up the whole frame - be careful not to cut any edges of the ball off.
  • The camera and ball are level - if the camera is angled up or down, your final images will come out on a strange angle, and will require realignment.
  • The ball is in the middle of the "environment". Ultimately we want to be putting CG into the live scene, and the purpose of using the ball is to sample the light around a particular point in the live environment. So we want the ball to be a placeholder for the CG, this way the CG will receive the same light that the ball did. I.e., if you'll be putting a small CG object onto a tabletop, you put the chrome ball at the same place on the tabletop to take your sample.


Taking your Photos

Another sequence can be taken from a right angle to the first.
  • Put your camera on aperture priority and set your aperture about as high as you can to expand your depth of field - we want the whole ball to be in focus
  • Hold your shutter halfway down so your camera evaluates the light, and take note of the shutter speed
  • Switch to full manual mode, and enter the shutter speed your camera read out as a balanced exposure
  • Using your cable release, take a photo and check your screen to make sure it's not too dark or too bright
  • The trick now is to bracket a sequence of shots to take in the full range of light in the scene, so we see detail in both the shadows and the highlights, throughout the sequence
  • Step down around two stops, and using the cable release, take another shot. Check the shadow areas now have detail in them (the highlights will be even brighter)
  • Step back up another stop, and take another shot. The exposure should be halfway between the first two
  • Now step up another two stops, to be one stop over your balanced exposure, and take another shot
  • Step up another one stop above this, to put more details into the highlights, crushing the shadows right down. Take one last shot
  • You may have noticed two stops down wasn't enough to get detail into your shadows, and two up might not have been enough for your highlights. If so, bracket even further out, until the whole range is captured. Usually 5 exposures over a 5-stop range is enough
  • If you wish, you can take another sequence at 90 degrees from the first, as in the thumbnail at right. This second sequence can be used to paint yourself out of the image, as well as fix a small black hole that would otherwise appear behind the ball (process detailed below)


Processing your Photos

This process is relatively straight forward.

HDR preview window in Photoshop.
Cropping the Chrome Ball to fit.

In Photoshop:

  1. Open Photoshop
  2. Go to File -> Automate -> Merge to HDR
  3. Click Browse, find your photos and shift-click all photos from the sequence. Click the Open button.
  4. Check the Attempt to Automatically Align Source Images checkbox, to counteract any camera shift.
  5. Photoshop will set about automatically aligning and stacking up the images, and will then present you with a preview window.
  6. Adjust the slider under the histogram, top right, until your previewed HDR image achieves a good exposure balance, then click OK.
  7. Using the Crop Tool, crop the image into a square, fitting precisely against the edges of the ball.
  8. Save the resulting image as a Radiance *.HDR.


Then, in HDR Shop:

  1. Click File->Open and navigate to your newly saved *.hdr image.
  2. Go to Image->Panorama->Panoramic Transformations.
  3. The Source Image format should be set to Mirrored Ball - what we have to begin with. Set your Destination Image format to be whatever will work best for you in your application. Latitude/Longitude will work best for Maya.
  4. Save this new image in whichever format is most appropriate for your needs- likely *.hdr again if you wish to retain the radiance information for re-lighting CG scenes!!


Further Editing

You'll notice the edges of the image have a "pinching" artifact. This is the region directly behind the ball which could not be photographed, because the ball will not reflect what is directly behind it. It's also likely that yourself or the photographer are in the middle of the image!


To fix both of these problems, follow these steps:

  1. At the shoot, take a second hdr sequence from a 90 degree angle to the first, as per the diagram above.
  2. Process both sequences separately in Photoshop and then HDR Shop.
  3. Bring both resulting images back into Photoshop and stack them up in a single comp.
  4. Use the Offset Filter and a Layer Mask to first align the two images, then paint out the unwanted sections.


Using your Photos

A Latitude/Logitude formatted image can be used effectively in Maya for Image-Based Lighting. In Mental Ray's render attributes, Click the Indirect Lighting tab and click the Image-Based Lighting button at the top.




Click Here for a PDF with 100 HDRi tips and tricks.

Personal tools
Google AdSense
please help us grow!