Lens effects - LuxRender Wiki
Luxrender GPL Physically Based Renderer

Lens effects

Personal tools

From LuxRender Wiki

Jump to: navigation, search

LensEffects.png

LuxRender supports several post-processing effects that simulate camera artifacts and imperfections. We tend to perceive a computer generated image as being fake if it looks perfect, or even like something our eyes would see, rather than the more distorted images cameras take.

LuxRender has four built in lens effects: bloom, vignetting, chromatic aberration and glare. The bloom and glare are performed on more “raw” data than would be saved in most image file formats, improving the quality of the effect.

Lens effects that have you "compute a layer" (bloom and glare) are baked to their own layers, this layer will simply be re-composited on each refresh of the GUI. The effects that do not bake (vignetting and chromatic abberation) are re-computed from scratch on each refresh, these can slow down rendering when the GUI is open and they are active. It is best to disable lens effects during rendering unless you are actively working with them. (Refreshing in and of itself consumes CPU cycles, so it is always best to minimize the LuxRender GUI during a render. This will cause it to stop refreshing the image until it is unminimized. It will simply render and write to disk at regualr intervals)


Contents

Bloom

Bloom simulates the fuzzy fringe of light that surrounds bright objects in photos, which makes bright spots in the image appear even brighter. It is a fairly simple filter, consisting of just two options: Amount and radius. Amount controls the brightness of the bloom effect, while radius controls how far from the light source the bloom extends. (To be more exact, "amount" adjusts the opacity of the bloom layer, "radius" is the blur radius used when the bloom layer is first computed)

To add a bloom effect, select a radius and click the “compute layer”. Note that computing the effect may take some time. Once the layer is calculated, you can adjust the intensity. Changes to the “amount” slider will update in near-real time, but if you change radius, you must re-compute the layer.

Note that in most cases, bloom is best used subtly. Too much bloom often gives a bizarre, glowing, foggy look that if often used to simulate the vision of someone who is dazed or suffering from impaired vision.

The bloom effect in LuxRender does not have any sort of "mask" or "threshold". The entire image is duplicated, blurred, and mixed back into the original. This is all performed on the raw HDR data, prior to tonemapping, so it may appear to be masked at times if some objects are extremely bright. As a result of being performed on the HDR data, bloom can also simulate the colored blooming around a light source that has itself clipped to white in the final output image.

No bloom


Too much bloom


A nice amount of bloom


Vignetting

Vignetting is used to darken or lighten a “ring” around the outside edge of the image. In real life, this often occurs as an undesired imperfection in lens design. Vignetting can also draw focus into the center of the image and is therefore sometimes applied intentionally.

LuxRender’s vignette effect is calculated on the visible image data. It updates in real time, or near real time on higher resolutions. To use it, simply enable it with the checkbox, then use the slider to adjust the effect. 0 is no vignetting, +1 is a very dark vignette, and -1 is a very light vignette.

No vignetting


Vignetting at +0.5


Vignetting at -0.5


Chromatic Aberration

Chromatic Aberration is a lens distortion that is caused when a camera lens focuses different wavelengths of light onto different parts of the sensor. It results in a blurring of objects, and colored edges. This image provides a good example of chromatic aberration in a real life photo: http://commons.wikimedia.org/wiki/File:Chromatic_aberration_(comparison).jpg

Like vignetting, chromatic aberration works on the visible data; you simply enable it and select an amount. Be careful, as a little goes a long way and this is generally not an attractive effect! It is for “dirtying-up” your render for the sake of realism.

No chromatic aberration


chromatic aberration at .3


chromatic aberration at 1. Pay attention to the edge of the back left (platinum) sphere, and the edge and shadow of the front-right sphere



Glare

LuxRender's glare effect adds “stars” to bright objects, which in a real camera is caused by reflection on the lens diaphragm. This effect works on HDR data, and requires you to compute an effect layer first. This usually takes a long time. The effect has an assortment of controls:

Amount - This controls how quickly the brightness of the "star arms" falls off along their length
Blades - number of spikes each star has. if this is an odd number, it will be multiplied by 2. Also, all values 3 and below appear the same, as 6 spikes (3x2).
Radius - the size of each star
Threshold - the minimum brightness a pixel must have to be used for the effect. Lowering this will increase processing time, and setting it much lower than .85 or .9 often ends up looking pretty silly anyhow. However, dimmer scenes may need a lower threshold, so start with a high threshold such as .8, and lower it if the you want the effect from dimmer areas.

As with bloom, changing any settings other than amount will require you to recompute the layer, so set them first, then hit compute.

The glare effect in action