Unity3d image post-processing effects--bloom and Lens flares

Source: Internet
Author: User
Tags mixed

Blooming is the optical effect where light from a bright source (such as a glint) appears to leak into Surroundin G objects. The Bloom and Lens flares image effect adds Bloom and also automatically generates Lens flares in a highly effici Ent. Bloom is a very distinctive effect the can make a big difference to a scene and may suggest a magical or dreamlike enviro Nment especially when used in conjunction with HDR rendering. Bloom and Lens flares is actually a enhanced version of the Glow image effect which offers greater control over the Bloom At the expense of rendering performance.

A floodlight is an optical effect that refers to a light that comes from a strong light source (such as a flicker) that looks like it affects the surrounding object. The Bloom and Lens flares image effect adds a floodlight effect in an efficient way and automatically generates the effect of a lens flare. Universal light is a very unique effect that, when used in conjunction with the HDR rendering method, can greatly alter the ambience of the scene and create a magical, dreamy environment. The floodlight and lens flare effects are actually an enhanced version of the Glow effect, which provides better control over the flood effects, but also brings expensive rendering performance overhead.

Example showing how Bloom and Lens flares can give a soft glow using the new screen blend mode. The new anamorphic lens flare type helps evoke a cinematic feeling.

The example shows that this effect provides a soft glow effect when new screen blending modes are used. The new variant lens flare type helps to create a cinematic feel.

As with the other image effects, this effect was only available in Unity Pro and you must has the Pro standard Assets Inst Alled before it becomes available.

As with other image effects, this effect is only available on Unity Pro and must be installed before using Pro standard Assets.

Properties Property

Tweak Mode

Adjustment Mode

Choose complex mode For additional options such as lens flares.

For additional options, select a complex pattern, such as a lens flare effect.

Blend Mode

Mixed Mode

The method used to add bloom to the color buffer. The softer screen mode was better for preserving bright image details but doesn ' t work with HDR.

A method that adds a flood effect to the color cache. A more supple screen mode is better suited to preserving bright image detail, but this mode cannot be used with HDR.

HDR

High Dynamic Range

Whether Bloom is using HDR buffers. This would result in a different look as pixel intensities could leave the [0,1] range, see details in tonemapping and HDR.

Determines whether the effect uses an HDR cache. Using HDR will result in a different visual perception because the pixel brightness will exceed the [0,1] range, with details visible tonemapping and HDR.

Cast Lens Flares

Projection lens Flare

Enable or disable automatic lens flare generation.

Turns the auto-generated lens halo effect on or off.

Intensity

Strength

The global light intensity of the added light (affects bloom and lens flares).

The global intensity of the additional light (the light source that affects the effect).

threshhold

threshold Value

Regions of the image brighter than this threshold receive blooming (and potentially lens flares).

Areas in the image that have a higher luminance than this threshold will produce a floodlight effect (and a potential lens halo effect).

Blur iterations

Blur Count

The number of times Gaussian blur is applied. More iterations improve smoothness but take extra time to process and hide small frequencies.

The number of Gaussian blur applications. The number of iterations increases the smoothness of the screen, but it also takes extra time to process and hide the details of the small frequency.

Blur Spread

Fuzzy diffusion

The max radius of the blur. Does not affect performance.

The maximum radius of the blur. does not affect performance.

Use Alpha Mask

using an alpha matte

The degree to which the alpha channel acts as a mask for the bloom effect.

Use the alpha channel as a matte to apply to the flood effect.

Lens Flare Mode

Lens flare Mode

The type of lens flare. The options are ghosting, anamorphic or a mix of the.

There are three main types of lens flares: ghosting, morphing, or combination of the two.

Lens Flare Mask

Lens Halo Mask

Mask used to prevent lens flare artifacts on screen edges.

A mask that prevents the lens flare from causing errors at the edge of the screen.

Local Intensity

Local Strength

Local intensity used only for lens flares.

Used only for the local strength of the lens halo effect.

Local Threshold

Local threshold value

The accumulative light intensity threshold that defines which image parts is candidates for lens flares.

The cumulative light intensity threshold that defines which parts of the image affect the lens flare.

Stretch Width

Stretch Width

The width for anamorphic lens flares.

The deformation width of the lens flare.

Blur iterations

Blur Count

The number of times blurring is applied to anamorphic lens flares. More iterations improve smoothness and take more processing time.

The number of Blur applied to the flare of the deformed lens. More iterations will enhance the smoothness of the screen, but it also takes up more processing time.

Tint Color

Hue Color

Color modulation for the anamorphic flare type.

Color modulation for Morph flare types

1st-4th Color

Color Type

Color modulation for all lens flares if ghosting or Combined is chosen.

The modulation color used when the ghosting or merge is selected.

  blend modes:add and screen blending modes: Add mode and display mode

Blend modes determine the "the" and "images would be" combined when overlaid. Each pixel from the base image was combined mathematically with the pixel in the corresponding position in the overlay imag E. Both blend modes is available for Unity image effects, Add and screens.

The blending mode determines the merging method when two images overlap. Each pixel on the base image is merged with the corresponding pixels on the overlapping image according to the mathematical formula. Currently unity supports two blending modes: Add mode and screen mode.

Add mode

When the images is blended in ADD mode, the values of the color channels (red, green and blue) is simply added together and clamped to the maximum value of 1. The overall effect is a areas of each image, aren ' t especially bright can easily blend to maximum brightness in the Result. The final image tends to lose color and detail and so ADD mode are useful when a dazzling ' white out ' effect is required.

When a picture is blended by adding a pattern, the values of each color channel (red, green, blue) are simply added and the maximum is limited to 1. In this way, the overall effect is to make each picture on the original is not particularly bright area in the mixed results will be easily reached the maximum brightness value, so that the final picture may lose color and detail information, so the increase mode is more suitable for generating "white" effect.

Screen mode

Screen mode was so named because it simulates the effect of projecting the the both source images onto a white screen Simultaneo usly. Each color channel was combined separately but identically to the others. Firstly, the channel values of the pixels is inverted (ie, subtracted from 1). Then, the inverted values of multiplied together and the result is inverted. The result is brighter than either of the same source pixels but it'll be in maximum brightness only if one of the source Colors was also. The overall effect is, the more color variation and detail from the source images are preserved, leading to a gentler effec T than Add mode.

The screen mode is called because it simulates the effect by projecting two images onto a screen at the same time. Each color channel is fused separately, first, the pixels on the two source images are inverse (by one minus each channel value), then the two values are multiplied and the result is reversed again, the result will be brighter than the two source pixels, but only if one of the pixels is the maximum brightness, the result will be maximized. At the same time, the overall effect also shows more color changes and retains more detail information.

Hardware Support Hardware

This effect requires a graphics card with pixel shaders (2.0) or OpenGL ES 2.0. Pc:nvidia Cards since 2003 (GeForce FX), AMD cards since 2004 (Radeon 9500), Intel cards since 2005 (GMA 900); Mobile:opengl ES 2.0; Consoles:xbox, PS3.

This special effect requires a graphics card with a pixel shader (2.0) or OpenGL ES 2.0. Desktop: Nvidia graphics card after 2003 (GeForce FX), AMD graphics after 2004 (Radeon 9500), Intel card after 2005 (GMA 900), mobile device: OpenGL ES 2.0, console: Xbox 360, PS3.

All image effects automatically disable themselves if they can not run on end-users graphics card.

All image effects are automatically turned off if they cannot be run on the user's video card.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.