Cross-Polarization Photography for Textures |
Cross-polarization photography is a technique that removes specular reflectance from photographs. Linear polarizer film is placed over a light or flash, and a polarizer filter is likewise placed on the camera lens. The polarizer filter is then rotated until it is perpendicular to the polarizer film -- hence the name "cross-polarization" or "perpendicular polarization" or as the cool kids call it "x-pol." Removing spec from a photo for texture maps This technique has an immediate benefit for taking photographs for use in texture maps since it removes unwanted specular highlights and reflections in the photo (slide the bar on the image below).
hi When taking pictures of human skin, you can shoot cross-polarized photos from multiple angles, and then combine them together in Photoshop using masking and the "lighten only" blending mode. This removes any shadowing in the images so they merge seamlessly, as opposed to using the clone stamp tool to combine them which can lead to splotchy uneven surfaces. This "unwrapped" map can then be used as a good starting point source image for the texture map on a face.
Deriving a spec pass from a photo An additional benefit is that when a cross polarized photo is subtracted from a parallel polarized photo in a compositing program like Nuke, we can see what the specular highlights look like on an actual photo. This allows texture artists to see what a real world specular pass looks like, giving them a photographic reference for to base their CG spec pass on.
This technique is also relatively simple. The only trick is to use a tripod and have your subject stand perfectly still while you take the two photos so they will align properly. The first photo is taken with the polarizer filter on the camera rotated to be parallel to the polarizer on the light (A), and a second photo with the polarizer rotated 90 degrees to be perpendicular, and thus cross-polarized (B). Then in Nuke, subtract the two images (A-B) giving you the specular difference. You will need to desaturate this as well for dielectric materials. The final image shows the result of adding the cross-polarized "diffuse only" image with the derived specular image (B+C).
Separating the spec from an image like this can give us great insights into the details of how dielectric materials are working. For example, in the image below, notice that the powdery film (known as grape "bloom") that characteristically appears on the red grapes is visually composed of rough specular highlights. Being able to see these kinds of things in a photo separated into its diffuse and specular components helps an artist to know how to recreate this in a CG material.
It is worth noting that the cross polarization process is not perfect. The derived spec images contain color, even though dielectric specular should be colorless. This is in part due to the the limitations of 8-bit images. If an image has a pixel value range of zero to one (black to white) and a color is removed (the color of the cross-polarized image), the result will be the inverse color, rather than white. The way around this mathematical problem is to use HDR images which have a value range that is above 1, meaning that a color can be subtracted and still result in a white spec. This is done by taking multiple images at bracketed exposures and combining them in a program such as HDR Lab's Picturenaut (Photoshop's HDR feature is less accurate). This alleviates the issue in the case of bright highlights that are above 1, but on dimmer highlights there is still some degree of color spill. The ICT labs postulate that this may in part be due to the effects of single scattering, where the light enters the surface but scatters exactly once off some element of the material before reflecting to the camera. This picks up some of the surface's pigmentation, adding a little color to the image. The take away is that, even when shooting multiple bracketed exposure HDR images, it is still quite difficult to obtain an image without color in the specular highlights. Additionally, taking multiple bracketed exposure images slows the process considerably, making it problematic for capture of human subjects (since it's hard to stand still for so long). Considering all of the above, in practice it is much simpler to just take regular non-HDR RAW images and, understanding that dielectric materials should have colorless spec, simply desaturate the resulting polarization-difference image (i.e. the derived "spec only" image) in post. Another issue to be aware of is that the proportional amounts of the diffuse and spec will be off slightly. This is because the parallel polarized image lets 100% of the spec through, but blocks 50% of the diffuse, meaning that the spec will be 2x brighter, in relation to the diffuse, than it would in a photo without any polarizing filters. You can observe in the images above that the skin looks oilier than it normally would. Once aware of this, it is easy to adjust for it in your comp by either brightening the diffuse or darkening the spec a bit. In the animated image below, you can see the effects of brightening the cross polarized "diffuse" pass and the resulting composited image.
Equipment and Setup Here's a list of all the equipment you'll need:
DSLR camera with circular polarizer, and mounted LED light panel with diffuser and linear polarizer
Here's my workflow for using RAW images: Read the RAW image in Photoshop, keeping everything linear. In Photoshop, set the mode the 32bit, and save the image as an EXR. Open the EXR in Nuke and save this as a 16bit with ZIP compression. You may also want to use the denoiser in Nuke if your image is grainy. This should be done before any color corrections.
With everything set up, you're ready to go.The process of taking a cross polarized photo is as follows:
|