banner
border
Home
Gallery
Reel
Tutorials
Resume
Contact
Links
border
Tutorials
 
 

Generating An HDRi From A Single Image

In computer graphics the demand for realism is ever growing and in order to simulate realism the scenes materials need to act in a convincing manner to that of its real counter part.
HDRi lighting can offer a solution, especially if you are trying to match a CG character or object in to live footage for a VFX shot.
The best way to acquire HDR images is to take pictures using a tripod at several different exposures when you are at the site of your live footage.
The technique in this tutorial is no real substitute for taking the photographs at the site but this method does produce good, usable HDR images if you couldn’t get the images at the site.

It is best shoot one at normal exposure and two or three above and below the normal so you have a range of data to compile in to a single HDR image. Then you import that in to Maya or another 3D package and render with lighting the same as the site of the footage.
Sometimes it isn’t always possible to have got the pictures you need, there could be time issues, don’t have the necessary equipment. But you can fake the results of different exposures using Adobe’s Photoshop if you have a single image and then assemble an HDRi from those.

Producing The Different Exposures

In this section we are going to fake the different exposures that would have generated by the camera if it were possible at the time.

To start off create a copy of the image you want to use and open the image in Photoshop and go...
Images->adjustments->curves…
or alternatively use the shortcut: Ctrl+M

A small window should appear like the one on the left.
This is where we are going to make the changes to the images to simulate what taking multiple images would have.

 

Curve_01
In the window click on the graph and a square dot will appear where you clicked.
Below that ‘input’ and ‘output’ attributes have appeared. Type in the values as shown in the image to the left:
Input = 128
Output = 0
Curve_02


You will notice that the image exposure has dropped by quite a bit this is correct and now you need to save this image.
Open the original, unedited image and open the curve window again, this time to the same as before but make the output value 64 and then save the image under a different name.
You need to repeat the process five times in total keeping the input value that 128 but changing the output value of each one so by the end you have:

  1. With output = 0
  2. With output = 64
  3. With output = 128
  4. With output = 192
  5. With output = 255

Creating the HDR image

Once you have all the images you need its time to merge them all in to a single HDRi.
To do this in Photoshop CS2 you need to go…
File->Automate->Merge To HDR…
Browse for your images and then click OK.

Now click on the EV button as shown in the picture to the left. You need to manually set your EV values for the different exposures with the darkest image been set at ‘-2’ and then highest set to ‘+2’ with the once between set to the next whole number in order.
EV_01

If the images are in the same order as before then the EV values should look like this:

  1. With EV = -2
  2. With EV = -1
  3. With EV = 0
  4. With EV = 1
  5. With EV = 2

Once you have the values correctly in place click OK and Photoshop will combine the images and build a HDR image for you. Here you can edit the levels if you feel the outcome isn’t quite what you expected but in most cases you can just click OK and then save it using the Radiance (.hdr) format ready for Maya or any other 3D package.

Happy HDRi making.
 

Download tutorial -
Download
     

 

 

Footer