BACK TO TEACHING HOMEPAGE

BACK TO COURSE HOMEPAGE

   
     

MAA 3312: Advanced Texturing and Lighting

In this course the students will learn to apply traditional paint concepts, tools, and techniques for use in computer animation. They will develop critical ideas for surface treatment, texture, and lighting and demonstrate the layering of light in space to create mood, emotion and theme.
Furthermore, they will demonstrate an understanding of global illumination, final gather, Radiosity, and HDRI. Finally, upon completion they will be able to critically understand how light affects a surfaces’ color based on material: Diffusion, Gloss, Specularity, Reflectivity, Translucence, and Ambience.

 
     
JUMP TO A SPECIFIC WEEK:

 

Week 10: Image Based Lighting with High Dynamic Range Images

IBL: "IBL is a technique in which the computer uses a image file to derive lighting information from for the CG scene. This is usually done by wrapping that file around the scene in the 3d software and the computer will look at the geometry's normals and sample a color from the surround image for each intersection of the normal and apply that color to that point on the geometry. It will continue this technique for the whole model. Since this is just illuminating the geometry there is no altering of textures just simply changing the lighting qualities of it. The main reason for using IBI is for integrating CG elements back into a live action scene." -Brock J. Stearn

Creating usable HDRI Images:
High Dynamic Range Imaging Files are 32 bit and contain exposure information in every pixel. This allows us a full range, not just of contrast, but of actual bracketed exposure values. In Photshop we can test this using the exposure and gamma sliders. Note how when we create these image files, we haven't actually given the image more contrast, we have merely "altered the lighting situation".

HDRI merge in Photoshop:
Heres a pretty nice YouTube video on the subject, but pretty much the same as the tutorial below.

  1. The First step is to merge these three photos into one HDRI file using Photoshop's File-->Automate-->Merge to HDR command.
  2. Next, we select the files which need to be merged (the open files), then let it create the file.
  3. Once the file is generated, we can adjust the default white point using an exposure curve:
  4. To create the file, simply save it out. Make sure your file type is set to Radiance. If the photo was taken using a spherical light probe, it would now be ready to use in a scene.
  5. In Photoshop we can preview the exposure settings under Image-->adjustments-->exposure.

HDRI lighting from a 32-bit source image

IMAGE BASED LIGHTING TUTORIAL, CLICK ON IMAGE BELOW:

ANOTHER IMAGE BASED LIGHTING TUTORIAL, CLICK ON IMAGE BELOW:


The five shaders you see here from furthest back to foward are a Blinn with low diffuse and high reflectivity, a blinn with high diffuse and low reflectivity, a mental ray dgs shader with high gloss, a mental ray dgs shader with high gloss, transparency, and surface thickness (also note the caustic effect), and a Sub Surface Scattering skinshader.
This High Dynamic Range is useful, since we are going to use it to light our scene. In the first image of the 5 spheres above, there are no lights and no cast shadows. All of the illumination is produced through final gathering luminence values from the hdr image mapped to an enviornment sphere. LEARN MORE ABOUT HDRI HERE.

The Image Above was lit entirely though using an HDR file (see below).

While this image is an 8-bit jpg, the original image was a 32-bit hdr file at 3000 pixels wide, and will be used to light the scene below. Image courtesy 3dworld magazine.

  1. Step one in establishing an IBL setup with your HDRI image is to go to the Render Settings Window and enable the IBL option:
  2. Here are some of the first settings for the new spehere which incompases this scene. Note that the Mapping type is set to Spherical. If we were creating our own HDRI image using the light probe photographing methods discussed above, we would need to change the mapping type to Angular. You will now see a preview of the HDRI file in the viewport which can be moved and scaled.
  3. Next, we need to establish this image as having the ability to light the scene (emit light), and to cast photons (emit photons). Here are some of my settings:
  4. And after a VERY LONG render time:


Using MR Phyiscal Sun and Sky:
When rendering with Mental Ray, we can also use the Physical Sun and Sky simulator, which procedurally generates enviornment maps and and a directional light (the sun) which tries to simulate time of day in terms of color of light based on light position to the horizon. Here is an example of of the same scene rendered with just a change in light position. Notice how the color temperature changes dramatically, as does the procedural background.

TONE MAPPING with MR Lens Shaders :

When you create a physical sun and sky simulation, a lens shader is automatically created for your Cameras. BUT, you can create one on your own to alter the exposure of your renders without adjusting the lights or GI settings themselves! The lens shaders can be found in the hypershade under the mental ray section. The connecton network to a camera is shown as well. We have used the mia_exposure_simple.

Doing this, we can adjust attributes for our renders. The Lens shader gets plugged into the camera here:

The mia_exposure_simple node has several settings. A brief overview:
pedestal -------------- offset for the entire range (darken or lighten the absolute black)
gain ------------------- multiplication factor.
knee ------------------ value above which the range should be compressed
compression -------- compression ratio to squash the range that is compressed
gamma --------------- gamma (contrast) correction


Guidelines for mia_exposure_simple values:
pedestal: ------------- 0 (in most cases)
gain: ------------------- really depends on the range produced by Mental Ray. You need to find this by trying.
knee: ------------------ 0.5 - 0.75
compression:--------- depends on the maximum values and the gain. A value between 0 - 20 seems reasonable. Consider lowering the knee value when compressions >20 are needed to get good results.
gamma:---------------- 1.8 for more subtle images, 2.2 for more vivid images.

By IPR rendering the scene on Render Settings Quality, we can tweak things such as gain and gamma for greater control. Click on the images below for larger views of the values. ***Note that between renders, NO OTHER LIGHTING OR RENDERING SETTINGS HAVE BEEN ALTERED***

In most outdoor situations, you will need to perform Gamma Correction when using the Physical Sun and Sky to correct for the "Bleaching" of your render. Here are some settings that I have altered to get the render back into the proper contrast range.