The Rendering > Lens Flare effect
The Lens Flare is an over-illumination effect seen through an optical lens.
Usually encountered in the world of photography, it occurs when the image framed is excessively illuminated and when a non adequate lens is used. Several types of lens flare are encountered: ring, streaks, circles, …
They are located along the straight line from the light source to the camera lens used. Sometimes the lens-flare effect obtained takes the shape of blades used as the lens diaphragm (see drawing below).
Diagram of a camera with a 6-blade diaphragmExamples of the resulting Lens Flare effect (hexagonal effects)Photo with a true Lens Flare effect
The larger the lens, the more the Lens Flares will be visible and the size is proportional to this lens (when using the zoom, for example). We will now take a closer look at the various options proposed for this effect in order to allow you to obtain results similar to those illustrated in the image above.
When you choose the Lens-Flare effect in the Rendering effects menu, the first parameter to be entered is the Position of the light source and the lens. The first four numeric fields are used to adjust these positions.
The Lens radius is measured in pixels and is used as a reference for the size of future light interference effects you wish to create (ring, streaks, circles...). The Luminosity parameter controls the luminosity of all light interference visible on the screen.
The position of the light source, lens and lens radius may also be adjusted with the HUD
The Lens Flare popup menu creates various types of lens flare effects: they may be of the Generic, Streaks or Image type. It is also possible to rename, duplicate or delete these effects at your convenience.
Once a type of lens flare has been created, its name appears in the Lens Flare popup menu.
In the header of this menu you will find the name of the lens flare the parameters of which are visible on the screen.
• Lens Flares of the generic type
Here are the various Lens Flare parameters of the generic type. You may:
- Change the Size of the Lens Flare: this value is a percentage of the lens size (the size that you have implicitly chosen when setting the lens radius).
- Change the Offset of the Lens Flare : in other words, modify the position of the lens flare in relation to the center of the lens and light source.
An offset of 0 places your Lens Flare at the same level as the light source.
An offset of 1 places the effect at the same level as the lens center.
An offset of 0.5 places your Lens Flare in the middle of the two aforementioned points.
It is also possible to use a negative offset or an offset greater than 1.
- Choose single-color or gradient color artifacts (see below).
- Modify the profile of your artifact using the profile curve.
This effect is constructed in the same way as we have already seen in lesson 2. Correctly setting the profile parameters is essential if exceptional results are to be obtained (see examples below).
The Blade mode indicated above enables adjustment of all Lens Flares of the generic type according to the diaphragm blades of your virtual camera.
It is very important to set its parameters correctly if realistic results are to be obtained.
You may choose a Blade mode of the Circle type (images above) or a user defined Blade mode.
- You may choose the Blade count for your virtual camera lens (see examples below, based on the various profiles described above).
From left to right:
The lens diaphragm of your camera is circular, with three blades, five blades and seven blades.
- You may modify the Form factor:
With a factor of 0, the points are linked to form a circle.
With a factor of 1, the points are linked by straight segments.
With a factor of 2, the points are linked by incoming arcs.
From left to right:
Form factors 2, 1, 0.5 and 0.
- You may modify the Angle of your lens flares:
From left to right:
Angles 0°, -15°, -30°, -45°, -60°, -75°.
When required, each Lens Flare of the generic type may be given its own Blades mode different from the Global blades mode described above.
The latter is located at the bottom of the generic Lens Flare parameters and offers the same options.
• Streak type Lens Flares
Even if the Lens Flares of the Streaks type offer a completely different effect than the Generic lens Flares (see examples below), the parameters are nonetheless quite similar.
You may therefore set the Size, Offset, Color(s) and Profile in the same way as described on the previous pages.
There are, however, several specific options which we will now take a closer look at :
- The Angle and Rotation parameters are used to rotate light interference effects.
- The Spokes parameter is used to select the number of spokes in the streaks
(opposite from left to right the Spoke parameter with the values 200, 50, and 20)
- The Minimum parameter is used to adjust the contrast between the spokes.
If this parameter is set to 0, maximum contrast is obtained.
If this parameter is set to 1, minimum contrast is obtained.
(opposite from left to right with contrast values 1, 0.5 and 0)
- The Noise parameter is used to adjust the sharpness of the spokes:
If this parameter is set to 0, the spokes are less sharp.
If this parameter is set to 1, the spokes are more sharp.
(opposite from left to right with noise values 1, 0.5 and 0)
- The Seed parameter is used to randomly vary the streaks layout.
Combined use of several types of lens flares and light interference applied to the same point in your project may create a very realistic effect.
Opposite you will see two generic lens flares and one streaked lens flare to create a sun surrounded by a light halo.
• Lens Flares of the Image type
Lens Flares of the Image type allows you, as the name implies, selection of the image of your choice to create a lens flare.
* This image, referred to as source image, may be a default image (the current image), an already opened project or even a file for which the access path must be given.
* You may set the Size, Offset and Angle parameters as indicated for the lens flares discussed previously.
* Your image will be applied as a lens flare on the current layer. This is possible in the various Drawing modes (color, behind, erase, etc.) studied in lesson 2.
• The Render order for lens flares
The Render order popup menu offers the following four options :
* Creation: your light artifacts are calculated and drawn by the program in the order they were created (i.e. as they appear in the lens-flare popup menu, from top to bottom).
* Invert. creation: your light artifacts are calculated and drawn by the program in the inverted order of creation (in the lens-flare popup menu, from bottom to top).
* Lens to light: your light artifacts are calculated and drawn by the program according to their offset in the direction Lens => Light.
* Light to lens: your light artifacts are calculated and drawn by the program according to their offset in the direction Light => Lens.
Take the image type artifacts illustrated below, for example.
Based on their position in the Lens Flare popup menu opposite, they were created in the following order: blue, then green, then red.
Here you have the effect obtained (for application in color mode) in the various cases:
CreationInverted creationLight to lensLens to light
• The Lens Flare Obscuration layer
Let's assume our drawing is animated as indicated below:
When the planet moves and the sun becomes visible, the Lens Flare effect becomes visible at the same time.
In general, if an object of any kind passes in front of the light source, the lens flare tends to disappear.
The Obscuration layer parameter above allows you to manage this phenomenon.
* To do this, you must first define what is going to block the light source. This may be an image or animation in a layer, project, brush, etc... (Pre, Post Behavior, Animation Mode, Offset will also be defined if necessary).
* The Type of obscuration to take place when the effect is applied must be indicated here:
- The Alpha option will block the lens flare when an opaque object passes in front of the light source.
- The Invert alpha option will block the lens flare when a transparent object passes in front of the light source.
- The R.G.B option will modify the lens flare color so that it becomes identical to that of the object passing in front of the light source.
- The R.G.B + A option functions in the same way as the R.G.B option but also takes into account the opacity of the pixels in the same way as the Alpha option.
* We generally obtain a Lens Flare effect when the lens of your camera is pointed towards a very small and very bright light source.