Friday, August 7, 2009

Week 5: Lighting - Creating Realistic Outdoor Lighting


I've always wanted to learn more of the technical aspects of photography (never took a class). But to get some of the concepts of 3d imaging, you have to learn some basics about photography. Today we learned how to create some pretty cool outdoor scenes using HDR images taken with spherical panoramic photos. First a bit about spherical panoramas...

The one thing you can notice about the shiny ball above is it's reflecting 180 degrees of the environment its set in. That can be useful. There is software that can digitally 'unwrap that distorted image and make it flat, like peeling off the wrapping of a globe and laying it down flat.

That unwrapped image (a spherical panorama like above) can be brought into a 3d application and projected onto a big 3d sphere that encloses the scene. With that in place, objects in your scene can accurately reflect or even use the lighting values from the originally shot scene. All this means is if you want a shiny metal 3d Transformer to look like its really in the enviroment with the actors, you need to do this.

These days they have spherical cameras like the one above that take 360 degrees photos which has surpassed the ues of the shiny ball (since its only 180 degrees). It's pretty pricy but lets just say you're not gonna go run down to Walmart and expect to pick one of those up.

The other part of the equation is HDRI, which stands for High Dynamic Range Imaging. Our eyes see the whole range of exposures, much more than a camera. Cameras can only capture 4 exposures (f-stops) at once, while our eyes can see 12. That's why is there is a bright light or sky in your photo the rest looks dark, but to our eyes we can see the whole range. HDR, as you can see below, captures the same image at all exposure levels and stores their information.
With all these exposure levels, you can either compress them to fit into the 4 levels of a normal photo (called tone mapping) or pick a subset of exposures you want in your end image. See how the ball below looks more like how we see with our eyes? its has many more exposures mapped to it so you can see the brightest highlights and the darkest shadows at the same time. Pretty cool....

So what does that mean to a 3d artist? well, it means very realistic simulated lighting and reflections. We can light our outdoor scenes with these HDR images that look and feel very realisitc, not to mention pick whichever exposure we want to use to light with. Anway, on to what i created using this technology.

I download an HDR image of an outdoor sky and mapped to a big sphere in my scene. The image is acutally used to emit light into the scene and its color its based on the colors in the photo. By turning on FinalGather (a part of Mental Ray that allows surfaces to emit light based on their irradience or color value) i got the result below. Mind you there are no lights in the shot below, just the light coming from the HDR photograph, which is mostly blue. This is good since I'm trying to get the color of atmospheric or light from the sky which is...well, blue.

Then I added a directional light to cast warm light and hard shadows like the sun and placed it in around the same position as the sun in the photo. Result below...

The last step is to correct the exposure (just like a photograph) to get the brights and dark the way i want them, as well as saturation and overall color balance. The final image below....

I don't know if I explained all this very well, but it's what i gathered from the lecture today. Feel free to ask me about any of it and I'll do my best to answer. Lots of info about this on the web too. Here is a site with some cool 'panos' to look at. enjoy : )

No comments:

Post a Comment