Search public documentation:


Interested in the Unreal Engine?
Visit the Unreal Technology site.

Looking for jobs and company info?
Check out the Epic games site.

Questions about support via UDN?
Contact the UDN Staff

UE3 Home > Particle & Effects > Lens Flares > Lens Flare Editor User Guide
UE3 Home > FX Artist > Lens Flare Editor User Guide

Lens Flare Editor User Guide

Lens Flare Editor User Guide


The Lens Flare system has been recently introduced. The lens flare editor is a tweaked version of Cascade, where you add sprites as elements that each reference a material.

Creating a Lens Flare

At a basic level, lens flares are made of two elements: A source and a reflection. The source element is the parent and the reflections are children.

The source should already be created by default. All that needs to be done is assign it a lens flare material by adding that material to the LFMaterials array under the SourceElement dropdown menu. Note that the source will always draw in the world depth priority group.

For something as simple as the sun by itself, you could stop here; but if you want additional elements, right-click in the upper right view of the lens flare editor and select 'Add Element <Before/After>' to add reflection elements.

When you add reflections, they will all be stacked in the same space by default, which will give you no parallax as your view of the lens flare changes. To separate the reflections to give the effect depth, you want to increase the RayDistance value of the reflection. This value is in the property rollout of the reflection element, along with all the other values.

Just like the Source element, there is a LFMaterials slot to plug a material for the reflection into. Here you can scale, rotate, and recolor the material of the reflections or the source right within the editor. These would be the AxisScaling, Rotation, and Color properties respectively.

It's best to test the lens flare in the actual location where it will be used in-game so that you can get a better feel for what values should be used when tweaking properties such as the reflection raydistance.


Lens Flare Editor Layout


Context Menu

Right-clicking in the editor opens up a context menu:

Working with Lens Flares

Lens flares are placed in the level as Actors and show up as sprites like emitters, until you hit the realtime button. Simply locate and select the lens flare that you created in a given package, and then right-click in the level and you can add it like any other Actor.

If you make changes to a lens flare, make sure you hit the orange "update in editor" button in the upper left corner so that you see your changes in the viewport.

The most important thing to know is that the Reflections array lists the various elements, and the RayDistance field determines the amount of parallax that each element receives as the camera pans past the source. With this you can make anything from subtle flares to the all-too-common student-graphics-artists-photoshop-style-35mm-lens-flares.

Almost all properties of Lens Flares utilize distributions to map values based on the position of the element from the source. A 0.0 indicates the element is right on top of the source, 1.0 is on the opposite edge of the screen from the source horizontally or vertically, and 1.4 is on the opposite edge of the screen diagonally. If bNormalizeRadialDistance is enabled, 1.0 will be the max value around the edge of the screen.

(Information on distributions can be found here: Distributions)

At the bottom of the Properties for a given LF element you will see parameters which are prepended with "Distmap_"

The following three parameters:


All map to values which change depending on their distance from the Lens Flare source. The distance is calculated based on the camera to source view distance and is used as the lookup into their distributions.

This can be used to change the color, shape, or alpha of a Lens Flare element as it varies in distance from the Lens Flare source. Keep in mind that the Color and Alpha parameters are just Vertex Color parameters being passed back into the Material that's assigned to your lens flare, so anything you can do with Vertex Color in a material can be used here to create some interesting effects.

Standard Lens Flares

Lens Flares use special parameters passed back in from the material editor in order to performm custom functions related directly to Lens Flares. Here is a breakdown of the material nodes and their uses:


This node is similar to a dot product, it gets brighter as the camera directly faces the lens flare and darker as the lens flare approaches the edge of the screen (0-1). Modify output as needed. This allows your lens flare elements to fall off or change value as the reach the edges of the screen.


Returns a value that approximates how occluded the lens flare is. This calculation is based off of the bounding box of the Lens Flare (right click in the main window of the Lens Flare editor and choose 'Select Lens Flare' to select the base properties of the flare to access the bounding box size settings) and scales properly based on distance, so that your values make sense from all distances. A larger bounding box means that more of the flare must be occluded. This result interacts with the Lens Flare parameter called ScreenPercentageMap. The ScreenPercentageMap is a curve which maps the falloff as it related to the occlusion amount. This allows you to make a light source that stays bright when only a small portion is occluded or one that dims greatly if even a small portion is occluded. Generally you want this to be a fairly linear ramp so the flare gets dim gradually based on occlusion.

Vertex Color

Similar to our other particles, Vertex Color is passed into each lens flare element from the material editor. This allows you to change your color and alpha values directly in the LF editor using the Color and Alpha parameters set in each source and element in the lens flare actor.

Radius The Radius field applies to any lens flare and sets a radius around it, outside of which the flare is not visible. (This is similar to point and spot lights.)

Directional Lens Flares

If you have a lens flare that uses a cone (like a flashlight corona or car headlight), then the flare is considered to be directional.

To set a cone, right click in the main LF editor window and choose "Select Lens Flare". This selects the base properties of the Lens Flare actor and allows you to set a Min and Max falloff cone (like the light settings in UE3) as well as a radius which controls distance. You will then see the radius indicated in the editor if you have your LF placed in the world and it is selected.


For Directional Lens Flares, multiplying this parameter in allows the flare to fall off based on the view angle from the cone. This causes a nice smooth dropoff in intensity as the flare starts to point away from the camera.

These two function identically to the way a spot light works w.r.t. settings:

the outer cone of a directional lens flare.
the inner cone of a direction lens flare.


This is used to 'cheat' the cone size by shrinking the calculated angle w.r.t. the cone to prevent it popping out when you are still within the cone.