Un-lighting

When working with 3D scanned assets it’s desirable to have the true surface color without the effects of lighting. This filter approximates that original color.

Download

UnLight.ffxml for FilterForge 4.

Usage

The filter takes the raw scanned color and the indirect illumination as image inputs.

  • Raw color
  • Indirect illumination
  • Un-lit color

The example above is a scan of a rock, baked onto an encompassing, low poly mesh.The first image is the raw color which includes captured ambient occlusion. The second image is the baked indirect illumination: the contribution of the environment to the final color of the surface. It is very important to get this right in the 3D scene by approximating the original light conditions as closely as possible.
In this case my job was rather easy: a single white hemisphere closely resembled the cloudy sky under which the object was captured. (By the way I used Autodesk’s Memento photogrammetry service.)

 

After feeding the filter those two images I tweaked the Gamma and Saturation boost parameters to my liking. The latter is for increasing saturation in occluded areas.

Tips

If possible capture objects in even, diffuse lighting like on a foggy or cloudy day, because it’s easy to recreate those conditions in the 3D application. Smaller objects could be put inside of a white paper lantern, lit from above.

 

When scanning the mesh also try to capture some of the immediate surroundings, especially if they have strong colors. In the following example the tree bark receives a considerable amount of green bounce light:

  • Raw color
  • Indirect illumination
  • Un-lit color

The high polygon mesh contains the tree and a patch of grass around it. The green color contribution is easier to see on the unprocessed low poly mesh on the second image. The last picture shows how the colorization and the effect of the sky light were significantly reduced by the filter.

 

Ideally the lighting environment is reconstructed from an HDR light probe captured along the mesh. However the filter has not been tested with such a setup, so there might be artifacts. If you run into issues please let me know.

 

When an area is very dark due to occlusion then boosted saturation might produce weird colors since it doesn’t have much data to work with. In those cases manual retouching is required.