LuxRender Tone mapping
Views
Personal tools
From LuxRender Wiki
While rendering, LuxRender calculates the brightness of the image using physical values. Typically, the contrast between the brightest and the darkest areas of the rendering is bigger than a computer screen or print can display. Therefore, the calculated values somehow need to be converted to coloured pixels. This is exactly what tone mapping does.
In LuxRender, tone mapping settings can be adjusted in real time while rendering.
Contents |
Tone Mapping Kernels
Reinhard/non linear
The Reinhard tonemapper was developed by Erik Reinhard, Mike Stark, Peter Shirley, and James Ferwerda. This algorithm is designed to adapt the high dynamic range of the real world to print or screen. In simple terms it balances the light and dark areas of an image and compresses them to fit the dynamic range of the media in question. This is based on a photographic process called the zone system, developed by Ansel Adams, which is explained in detail in the pdf file on the site listed above. Essentially the bright parts of the image are darkened and the darker parts of the image are brightened until a balance is achieved. In photography this is accomplished using various zones of luminance, which are burned or dodged as needed. The Reinhard tonemapper can do this on a pixel by pixel basis.
parameters
- prescale
- This setting controls the brightness of the darker areas (shadows, in image editing lingo) of the image. Increasing it brightens the shadows. Once it reaches a certain point it begins to compress the dynamic range (and thus the histogram) to the middle of the overall range, which can affect the contrast of the scene, i.e. a setting of 8.0 compresses the dynamic range a lot which produces a very gray and washed out image. Prescale is connected to the "burn" setting. One affects the other.
- postscale
- This setting is separate from the other two and it controls the brightness of the scene by scaling the output image brightness up or down (sliding the histogram to the right or left), ex. a setting of 8 yields a white and over exposed scene, and a setting of 0.1 produces a very dark and under exposed scene.
- burn
- This setting affects the brightness of highlights in the image relative to the darker areas. Increasing it dims the highlights. It does this by scaling the image down (sliding the histogram to the left). However, unlike "postscale" when the histogram reaches the same point where the histogram begins to compress it compresses toward the darker side of the histogram instead of to the middle.
The "prescale" and "burn" settings are connected; the areas they affect overlap. You can use the the postscale control to get a good, even exposure for your image. The histogram can help here, just check that the main curve is mostly centered between the two white bars. Once you have it centered, you can use the prescale and burn controls to get an acceptable exposure.
examples
Note how the highlight from the other light source on the teapot is muted to compensate for the overly bright shelf light while using the default settings.
Linear
The linear tonemapper settings are based on real camera and film settings. The linear tonemapper is not brightness-adaptive, so it should be used for animations in order to avoid flickering. This is for the same-reason that you would turn off auto-exposure on a real camera when shooting a properly lit film.
- Sensitivity (ISO)
- Sensitivity is directly related to the ISO setting or film speed of photographic film. Film speed is the measure of a photographic film's (or digital sensor's) sensitivity to light. The values for sensitivity directly correlate to film ISO settings. With relation to film speed, ISO 25 film is very slow due to it's low sensitivity to light and will require higher exposure times, where as a faster/more sensitive ISO 800 film will require a much shorter exposure time.
- Exposure
- The exposure setting is directly related to camera shutter speed, how long the shutter is open exposing the film to light. The shorter the exposure time the higher the film ISO needed. As an example consider the Sunny 16 rule. This rule states that on a sunny day you can use ISO 100 film with an f/stop of 16 (f/16) and an exposure time of 1/100th of a second or the reciprocal if the ISO speed (ISO 400 and 1/400th of a second). The acutal setting in the luxrender scene file (lxs file) is a decimal representation of the shutter speed. ex. To set a shutter speed of 1/125th of a second you would divide 1 by 125 which equals 0.008.
- f/stop
- f/stop is directly related to the f/stop setting of a camera. The f/stop, or F-number of a camera is an expression of the aperture width and the focal length. Quoted from the wikipedia article. "In simpler terms, the f-number is the focal length divided by the "effective" aperture diameter." The smaller the f-number the wider the aperature, and the more light is transmitted to the film. The actual setting in the luxrender scene file (lxs file) is the same as the f/stop number. ex. f/2.8 is equal to 2.8, f/16 is equal to 16.0.
- Gamma
- This setting scales the final result to match the specified camera settings at the gamma setting specified in the Gamma and Film Response panel.
Auto-Linear
Auto-linear works the same way as the linear tonemapper, but it will auto-configure itself. It has no settings. The auto-linear tonemapper can be a good choice for test renders before you have your final scene lighting set up.
Contrast
The "contrast" tone mapping process maps visible differences in calculated luminance into visible contrast in the resulting image. Just like the "maximum to white" tone mapper, this process is applied to the image as a whole. Therefore, this process will be less successful if the brightness varies a lot on different parts of the image.
The "world adaption luminance" value (Ywa) controls the overall brightness of the final image.
Maximum to White (max white)
The "maximum to white" tone mapping process is the most simple tone mapping process available: it will check for the brightest pixel in the image and consider this white. All other pixels are scaled relative to this pixel.
This process works well on images with limited contrast, but if the view contains a very bright object, the rest of the image will appear too dark.
Clamp Method
This controls how LuxRender will deal with values that are too high to be displayed in the final, low-dynamic range output.
Preserve Luminosity (lum)
In this mode, LuxRender will attempt to keep general light intensity the same by making bright areas to clip to white, regardless of actual color.
Preserve Hue (hue)
In this mode, LuxRender will attempt to preserve the color of bright objects. Once one channel of a pixel clips (reaches RGB 255) the other 2 channels will be locked for that pixel so that they are unable to change proportionately to the clipped channel. This will prevent bright areas from clipping to white or starting to change hue, which is what is usually done in drawings, and often what we see due to the high dynamic range of the human eye. However, this can also give highlights a strange "compressed" appearance
Clip Individually (cut)
This will allow each channel to clip indepently of the others. This will cause colors to change hue or desaturate as their brightness approaches the maximum the image will allow. This is not a visually pleasant effect, however, it is how digital cameras behave, so this can be desireable from a realism standpoint.
White Point
The white point setting serves to define the color "white" in a given render. This gives you the ability to adapt to different lighting situations.
For instance, outdoor (sunlight) shots typically need the white point set to 6500 deg. kelvin (blackbody temperature). This is often referred to as D6500, the D stands for daylight.
With a properly lit indoor scene that uses incandescent lights. The white point should be set to approximately 2700–3300 deg. kelvin. Now if you want to simulate a camera set to the wrong white point then set it to D6500. The scene will look a bit orange but it will be accurate.
Color Space
| |
|
|
|
| Adobe RGB 1998 color space | Apple RGB color space | CIE E color space | NTSC 1953 color space |
| |
|
|
|
| NTSC 1979 color space | PAL/SECAM color space | ROMM RGB color space | sRGB-HDTV color space |
Gamma and Film Response
Gamma is used to correct for your screen gamma when viewing the image in LuxRender. It is an important part of linear workflow with LuxRender. This slider should always be left at 2.2, unless you have a specific reason for using a different value.
Film Response loads color profiles for various film and camera setups. Film and digital cameras are generally not designed with a linear response to light, since this results in images that many people consider to be dull and sterile-looking. Film response profiles will offset the light response LuxRender uses during tonemapping, in order to give a more pleasing color and contrast. This can help reduce the "sterile, raytraced look".
Histogram
The histogram is a tool to analyse the result of tone mapping. It schematically displays how bright pixels in the tone mapped image are.
The histogram is divided in three parts by two vertical lines. On the bottom of the graph, there is a gradient going from black (on the left) to white (on the right). The vertical height of the graph indicates how many pixels will have a brightness corresponding to the brightness of the gradient.
Any value that is on the left side of the first dividing line will show completely black in the output image. Any value on the right of the second dividing line will be completely white. Typically, to get a properly exposed image most of the graph should be located between the two lines.
NOTE: It's not "wrong" to have part of the image outside the two lines. If you have one extremely bright object, like a light bulb, it might look oddly dim unless it's clipped out.



