Importance of Environment Lights
Introduction
I first heard about Physically Based Materials (PBM) and physically based rendering (PBR) several years ago. I thought it was great to be able to create models that did not not have plastic surfaces. I tried a couple of simple cases and lit them as usual (directional and point lights). It was bad. Most everything was either dark or plastic, or both.
I quickly learned that good PBM models had to be lit with environment maps (also known as image-based lighting (IBL). This allowed the reflective surfaces to actually look reflective with the background or other environment. It is still possible (and sometimes very desirable) to use directional, point, and spot lights to highlight features, replicate interior lighting, or make museum displays.
Background
IBLs are essentially a sphere of all lights that surround an object. This can be expressed as 6 flat and separate images;
one image containing the 6 cube faces (above);
or an equirectangular image (above). All of these forms cover the entire 4π steradians of a sphere. For a single model, the environment map is usually the same as the background image (aka sky cube or photosphere).
Interactive Tool
I built an online interactive tool to illustrate the result of lighting various PBM models with different kinds of light. The non-camera light sources were constructed from six individual images and assembled into a sky cube and equirectangular image using ImageMagick. The 3D display was created using Google’s <model-viewer> custom tag.
This tag only handles environment map lighting. Directional and point lights were emulated with large uniform panels (first below), small (second below) or dispersed color (above)
on a black panel. It is very important to note that these are not true lights, but emulations of them. You can switch between the lights and separately change the background. Neutral dark & light lighting and backgrounds are provided for baseline comparison. All lights and backgrounds can be separately displayed.
Appearance
The appearance of models that are metallic reflective are really improved with environmental lighting. This is especially true of dark objects (Helmet, Boom box). Even the appearance of objects that are not very metallic (e.g., lantern) are improved over limited non-environmental lighting.
Using the Helmet model, select Left lighting and Uniform Dark background. Details of the right side of the model are clear,
but the other sides (top, bottom, front, back, and left) are dark with the details not available. Switching to Uniform Light lighting shows the details from all over the model.
The lighting is equivalent to placing six directional lights parallel to each of the axis. The result is a bit washed out.
The Colored Directional and Colored Radial lighting are useful to show surface orientation and reflectivity.
These light sources help to illustrate the difficulty of successfully lighting a PBM model using strictly directional or near-directional lighting.
Selecting the Desert Highway for lighting and background shows the real power of environmental lighting. Since the lighting is aligned with the background, the reflections in the helmet from the background are clearly visible.
Additional work
Ideally environmental lights would be done with High Dynamic Range Images (HDRI). This example just uses PNG as the format. The use of PNG prevents good quality point lights. The demo would be improved if the light sources were converted to HDR. This is especially true for the point sources because of the lack of total light coming from those.
The <model-viewer> only supports IBLs. It would be good to use one of the other tools (e.g., three.js or Babylon.js) to include point and directional lights. That would provide a better comparison.
Credits
Models
All models were taken from the glTF 2.0 Sample Models repo (https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0) on GitHub. The Helmet model is CC-BY-NC [Battle Damaged Sci-fi Helmet - PBR by theblueturtle_, published under a Creative Commons Attribution-NonCommercial license -- https://sketchfab.com/models/b81008d513954189a063ff901f7abfe4]. The other models are public domain.
Images
- Forest: "Avenue of the Giants", (c) 2014, Chung Chu. Licensed: CC BY-NC-ND 2.0.
- Desert Highway: "Desert Stop", (c)2007, Rocky LaLiberte. Licensed: CC BY-ND.
- Italian Piazza: "Foianoi della Chiana by Night", (c)2016, Gabriele Cripezzi. Licensed: CC BY-BC-ND 2.0.
- The remaining light images are © 2021 by Daly Realism and licensed as CC-BY International V4.0.