Realistic Lighting with LDRI Images by Toni Bratincevic, Croatia


One of the biggest inventions in the last few years in realistic lighting solutions is the appearance of HDRI images and lighting the scenes with them. If you have the collection of hdri images in on your computer, and these images are just the ones that you need, then you don't have anything to worry about. The problem comes in the situations where you need to create your own hdri image. Why is this a problem? Because if you want to create the hdri image, you will need to take bunch of images of the same scene with different exposures. When you do that, the program, like HDRI Shop, calculates the final color in the image and creates hdri image. And what if you have made a lot of panorama pictures that you want to use as your light maps, or you don't want to bother with process of creating HDRI images? Well, there are some tricks when using ldri images that we will explore in this tutorial, which will help us to get the lighting similar to the lighting with hdri images.

As you probably know in HDRI image, some parts of image can be brighter than 255 level used in hdri images. These brighter areas are the main source of light emission from the hdri image. This cannot be achieved with ldri images, because ldri can't emit the light more than 255 level of brightness...

For this tutorial you will need Maya with mentalray for scene setup and rendering, HDRI Shop with few hdri images to measure the light level and Photoshop to create the bitmaps for color scaling.

In our first step we will examine one HDRI images with HDRIShop. This will help us to measure how much is the light (sun) brighter than the rest of the HDRI image. In the second part we will go through process of creating color scale maps, and in the last part of the tutorial we will see how to setup the shader for our faked hdri lighting.


Measuring Light Scale Value in HDRI Shop

So, let's go and measure lighting level of our HDRI image (see the next image). I will use one hdri image from cgtechniques.com. Start the HDRI Shop. Import in HDRI Shop your hdri image. As you can see, the big part of the image is white. These are the parts where light brightness goes above the 255 levels. To find out how much brighter these areas are you must go to the View > Exposure > Custom. The exposure menu will pop up, with slider bar in it. Move slowly this slider in the left direction to the point where sun starts to lose its white color and becomes gray. In the informations below the slider is the box where the Scale information is shown. This information is important since it shows how much we must multiply the white color in ldri image to get the brightness like in the hdri image. Now with your calculator, divide number 1 with that value (mine is 0.15). The result should be somewhere around 6.6. Remember this value since this is the value with which we will multiply the parts of LDRI image where sun is.


Creating Scale Maps in Photoshop

Now that the light brightness measuring is finished we must create the scale maps in Photoshop. What are scale maps? They are grayscale image maps that are used to scale the original ldri image. At this moment we will learn how to create them, and later we will create the shading network in maya using these maps, and then you will see how does scale map work. To create the scale maps you need to have the ldri image with which you want to light up your scene. If you have some panorama images, that would be ideal image for that job, but now, to make things a little bit simple, we will use one of the images that my friend has taken at the sea... download it by clicking on the image or the link. Since we don't use the image of the sun at day, we would have to use different sun scale value from that one which you calculated above.



As you can see from this picture, the main source of light energy in the scene comes from the sun. In the picture the sun has the color brightness somewhere around 255 which is the maximum value that LDRI image can store, but in real world it is much brighter than this. If this would be the hdri image, then the brightness of the sun would have much higher values. If we examine the picture a little bit more and think about the similar situations in real world, we would get to conclusion that next stronger energy emitter in the image is the sky and the last one would be the mountains and the sea. That means that we must create three different scale maps, one for each one of the elements that we mentioned above.

Now that we've analyzed the picture, we can get busy and create the scale maps. Of course, this has to be done in Photoshop, so start it and load the picture from above.

First thing we will do is that we will create the scale map for the sun. Create new layer and name it Sun scale. Now pick the Elliptical Marquee Tool from the toolbar and mark the part of the image where the sun is. Check if the new layer is selected, and if it isn't selecting it.



Now go to the Edit > Fill. In the Contents > select “White” and click OK. This will create the circle filled with white color. Now we must fill the remaining section with black color. To do this go to the Select > Inverse and then again to the Edit > Fill, but now select the Black color. At the moment the image should look like this:


Page 1 | Page 2 | Page 3 | Page 4
 

 
 
  Copyright © 2005-2007. All Rights Reserved