Está en la página 1de 7

Image-based Lighting in LightWave

Page 1 of 4

Image-based Lighting in Lightwave 3D

Arnie Cachelin 2001

Lightwave 3D Background
The Lightwave 3D renderer is one of the most widely used in Film and Broadcast production because of its quality, workflow, and speed. It can now do image-based lighting due to a number of architecture enhancements in the 6.0 and 6.5 versions. One of these critical new architectures is a full precision rendering pipeline from top to bottom. Another critical ingredient is a global illumination model. Global illumination simulations produce more accurate images of lighting in scenes, by considering more light sources than simple illumination models. Light sources include actual lights as well as their diffuse reflection from surfaces, their specular reflection, luminous surfaces, surfaces textured with HDR (high dynamic-range) images, volumetrics, and environments. These simulations produce 'pixel' values which vary from millions to millionths. Such results require floating point storage to hold both the bright values over 100% (255), and the subtle shading in the dark areas, which have values less than 1/255, and would become black in a 24 bit image. Preserving very high values as well as subtle gradations is important not only for output, but also for image-based lighting methods which require HDR images to reproduce natural lighting environments. The Lightwave renderer maintains full floating point (fp) color precision upon loading HDR image formats like Tiff Log-LUV, Radiance RGBe, and the native "Flexible Format". Any image pre- or post- processing is performed with fp precision by plug-ins or basic color correction. This precision is preserved through texturing and compositing operations as well, as it must be through ALL phases of rendering. Finally these full-precision, possibly HDR images are saved in an HDR format, or exposed onto a lower precision 'print' (a 24 bit image). The extra image precision has a cost in terms of memory, and it wouldn't necessarily be worthwhile for standard ray tracing or scanline rendering. It is, however, very useful for global illumination rendering, which models the subtle effects of indirect lighting.

Setting Up a Simple Image-Based Lighting Scene

The example below uses the ImageWorld environment plugin, which uses the light-probe type of spherical image to place the entire Lightwave scene inside of the environment in which the picture was taken. This environment will illuminate the scene, be visible as a backdrop, and show up in reflective surfaces even if they use the background for reflections rather than ray tracing.

1. Load and position some objects for a pleasing composition in front of the camera. I tend to use the standard cow object, which was referred to as the teapot of the 90's. Arnie Cachelin

Image-based Lighting in LightWave

Page 2 of 4

2. Load an HDR light-probe image with the Load button on the Image Editor. These images are available on the web (look for the light-probe image page or the Virtual light-probe page), or on your Lightwave CD.

3. In the Scene Backdrop panel, select the Image World Environment plug-in and double-click it to edit its properties. Set the light-probe image for Image World to use the image just loaded.

4. Edit your light properties to turn off "Affect Diffuse" and "Affect Specular" for any lights in the scene. All lighting will come solely from the HDR environment image. This environment image will also show up in reflective surfaces. 5. In the Global Illumination panel, enable Radiosity and Shading Noise Reduction. The radiosity settings will have to be optimized for time vs. quality tradeoffs on a scene-by-scene

Arnie Cachelin

Image-based Lighting in LightWave basis.

Page 3 of 4

6. Set the Render Display to "Image Viewer FP" in the Render options panel. This will preserve the full precision image in the display buffer, so exposure adjustments can be tested rapidly. 7. Hit F9 for a preview render. When it is complete, select Image Controls from the ImageViewer's File menu and enable the exposure adjustment. Tweak the white and black point values to taste. 8. To begin the process of tweaking the scene's lighting, some handy parameters to adjust are the global illumination brightness, the brightness in ImageWorld, and the global illumination parameters. Image Illumination Tips Lightwave's global illumination rendering is based on the photon mapping algorithm for computing lighting in space, which samples the lighting contributions from different directions at every point on a surface. This time consuming procedure will find hot spots from lights in HDR images used for environments, but if the spots are small, or the samples too few, the results will be grainy or speckled Increasing the sampling to improve the accuracy of image illumination increases render times. Adding real lights to the scene to match/replace images of lights will improve time and quality, since real lights are found without sampling. Because the sampling of an environment image is sparse, details and small hot spots are likely to be missed. This means that high resolution images are not necessary for illumination, and may cause uneven lighting intensities over surfaces. Because the environment plug-in displays fractions of the image spread over the field of view, low resolution images will appear blurry. To approximately match a light-probe image to output resolution, one needs 360/HFOV (~10) times greater resolution in the light-probe image.

Arnie Cachelin

Image-based Lighting in LightWave

Page 4 of 4

The scene's Ambient light intensity encapsulates the strength of higher order diffuse bounces. It should be above 0%. Rendering Light Probe Images Real light probe images are made by photographing a mirrored sphere, and using multiple exposures to recover an HDR image. Virtual light probe images can be rendered from any Lightwave environment simply by rendering a mirrored sphere. Interesting HDR environments can be generated using the SkyTracer, or Texture Environment plug-ins. Some examples of this can be found on the Virtual Light Probe gallery web site. Image Exposure Tips The variations in lighting on global illumination renders can be very subtle, and a process of 'exposing' these HDR images can bring details out of dark renders. To take advantage the full precision rendered, save renders in an HDR format, so alternate exposures can be applied and tested using the HDRExpose filter, or Virtual Darkroom. You can also test exposures with the FP Image Viewer's exposure controls; try reducing the black point for dark images, or raising the white point for hot images. Settings determined interactively this way can be used in the HDRExpose filter for final batch rendering. Some examples of the exposure correction for HDR images can be found in the supporting materials.

Arnie Cachelin

L6Notebook: High Dynamic Range Images Exposed LightWave [6] Notebook:

Page 1 of 3

High Dynamic Range Images Exposed

Arnie Cachelin

HDR Exposure Filter

LightWave [6] can render high dynamic range (HDR) Images, which may have very subtle shading differences as well as very bright areas. Because normal displays and printing technology have a more limited dynamic range than LightWave's Global Illumination engine, some colors in such images will be too bright or too dark to display. They will become either white or black. on screen or in print. The HDRExpose filter can select how to spend the limited output dynamic range (typically 255:1) to best display the HDR data. Like gamma correction, this process can bring up detail in shaded areas. HDRExpose rescales the image colors based on a "black point", which is the highest level which will be black in the output. This is expressed as a percentage of the standard 24 bit black point (1/255). The "white point" is the lowest level that will be white. The default value, 1.0, usually maps to 255 in 24 bit imaging. Raising the white point brings detail out of the bright areas at the expense of the darker, while lowering the black point uses more colors in the darker areas. The standard HDR image below has hot spots with values in excess of 5000. Adjusting the black point from 50% to 1% shows how much detail was hidden in the shadows. The original image, and details on its creation are available.


L6Notebook: High Dynamic Range Images Exposed Base Image: 100% Black Point: 50% Black Point: 20% Black Point: 10%

Page 2 of 3

Base Image: 100% Black Point: 5%

Black Point: 2%

Black Point: 1%

Virtual Darkroom Filter

Making photographic prints from film also requires a restriction of an image's dynamic range. The original image, captured in the chemical emulsion on film goes through two exposure processes that remap the dynamic range. The first to creates a negative, which is then used in the second pass to make a positive print. The Virtual Darkroom image filter simulates these two transformations using light response parameters from actual black and white or color film to match the results of photographic processing. This complex plug-in can be used to control the exposure of HDR images, while adding some film artifacts like grain and halo which may enhance the image's apparent naturalism. The following images were exposed using the default B&W film stock, and varying only the negative exposure time:


L6Notebook: High Dynamic Range Images Exposed

Page 3 of 3

0.5s Neg. Exposure

0.75s Neg. Exposure

1.0s Neg. Exposure

Click the images to view full size!

1.25s Neg. Exposure

1.5s Neg. Exposure

References and Resources: Recovering High Dynamic Range Radiance Maps from Photographs Light Probe Image Gallery HDRView