Processing Parameters

In addition to brush tools, Lightbrush has three processing parameters that can affect results: Processing Scale, Reflectance Bias and Illumination Smoothness. The default parameter values are suitable for most images. However, in some cases varying the parameters will produce improved results.

Processing Scale defines roughly how many nearby pixels will be considered during analysis. The Processing Scale parameter is specified as a percentage of the image size. The default value of 0.03 represents 3% of the image’s maximum dimension. The range of the Processing Scale parameter is 0.0 to 1.0.

Larger penumbra (the area between fully lit and fully shadowed) may require a slight increase in the Processing Scale, such as an increase from 0.03 to 0.10.

Reflectance Bias determines the likelihood that Lightbrush will interpret a change in the original image as a change in the color of the underlying materials, as opposed to a change in illumination. The range of the Reflectance Bias is 0.0 to 1.0.

In some images, increasing or decreasing the reflectance bias will produce higher quality reflectance and illumination maps. For example, if image features caused by changing material colors appear in the illumination map, increasing the reflectance bias may move the features to their proper place in the reflectance map. Likewise, if illumination features are appearing in the reflectance map, decreasing the reflectance bias may move the features to the illumination map.

Illumination Smoothness affects the degree to which Lightbrush tries to create a smoothly changing illumination map. A high Illumination Smoothness parameter will reduce or remove fine details and small variations in the illumination map; a low Illumination Smoothness parameter will leave the fine details and small variations. The range of the Illumination Smoothness parameter is 0.0 to 1.0.

For images with illumination features, such as a shadow edge, on a smooth surface, decreasing the Illumination Smoothness will often improve the quality of the reflectance map. For images with smooth illumination over complex materials or patterns, increasing the Illumination Smoothness will often improve the quality of the result.

Example

Original image (B) shows a soft shadow on a complex texture. The default processing parameters produce the reflectance map (C), which exhibits some visible artifacts along the shadow boundary. Because image (C) is a crop of the original image, the default Processing Scale is scaled up from 0.03 to maintain the same span (i.e., 3% of the original is 7% of the crop).

Increasing the Processing Scale parameter to 0.3 improves the result by increasing the locality of Lightbrush and more accurately estimating the penumbra. The result is shown in image (D). It is important to avoid making the Processing Scale too large, as it tends to result in reflectance features appearing in the illumination map. A good rule of thumb is to keep the processing scale as small as possible while still enabling Lightbrush to accurately handle shadow boundaries.

However, adjusting only the Processing Scale is insufficient to completely remove the artifacts at the shadow boundary. While the penumbra is somewhat wide in this image, the shadow boundary is strong and the intensity of the illumination changes quickly.

Reducing the Illumination Smoothness to 0.1 produces the reflectance map in image (E). Note that the illumination boundary is no longer visible. The corresponding illumination map is shown in (F). Images (E) and (F) are a high quality separation of the reflectance and illumination on a complex texture.

Using a slightly higher Processing Scale (0.1 instead of 0.03) and a slightly lower Illumination Smoothness (0.1 instead of 0.5) can often improve results for cast shadows on smooth surfaces.

The Processing Parameters panel also contains four checkboxes that modify the separation process.

  1. ‘Enforce Strict Color Model’, if checked, requires the illumination colors to lie on a line in RGB space. For images consisting primarily of a single surface at a single orientation, checking this box may produce a more accurate result. However, for general scenes with multiple surface orientations it is generally too strict a requirement on the illumination colors. This feature is unchecked by default.
  2. ‘Avoid Problem Pixels’, if checked, detects pixels that are too dark or too bright and discards them from the separation computation. Avoiding such pixels generally produces the best results, so this feature is checked by default.
  3. ‘Use Enhanced Illumination Analysis’, if checked, tries to detect and appropriately separate smaller illumination features, such as might appear on fur or rough surfaces. In some situations, it can reduce or eliminate the need for additional user input, but it may also incorrectly place some reflectance details in the illumination in certain cases. The enhanced analysis is not necessary for most images, so this feature is unchecked by default.
  4. ‘Use Multiple Bright/Dark Pair Adaptation’, if checked, adapts the separation analysis to local information, if the user has generated more than one Bright/Dark Pair. When the box is unchecked, then the information provided by multiple Bright/Dark Pairs is averaged across the entire scene. For scenes with multiple surfaces at different orientations, using adaptation and Multiple Bright/ Dark Pairs will often provide a better separation into reflectance and illumination, at the cost of slightly longer computation time. This feature is checked by default.