Bloom, fake HDR, true HDR)

Source: Internet
Author: User

Bloom, fake HDR, true HDR Concept

The principle of HDR has been mentioned on my old website. It mainly refers to the principle on gamedev.Article. Now let's explain them together.

These post-processing technologies are designed to achieve luminous effects (glow effect)

HDR refers to the high dynamic light range, similar to the effect of exposure, because the RGB component is displayed on the computer

When it exceeds the range of 255, It is discarded, so the effect of exposure is not very good, so some

To achieve this effect, the common method is to find out the highlight and then add the color to mix the original scene.

Bloom and fake HDR (pseudo HDR), true HDR (real HDR) are similar in principle, mainly in the implementation

The implementation method is as follows:

1. Bloom implementation:

Only render the emitted light to a Paster image (for example, turn off the light and only render the Light of the Self-emitting object)

And then blur.

Finally, it is mixed into the scenario by adding colors.

2. True HDR implementation:

Read HDR files

Convert the color to a 64-bit floating point original texture.

Render the original texture to the downsample texture in 1/4 (only the highlight is taken, and LDR is discarded. That is, the brightness lower than 1 is filtered out)

Perform horizontal Blur for downsample and then vertical blur

Finally, the final texture is formed by adding the color of The Blur and the original texture and performing tone mapping (adjust the brightness and multiply the exposure index.

Tip:

What is tone mapping:

Tone mapping refers to scaling the rbg value of an image that may be too bright or too dark (because the final output

The rbg value of cannot exceed the display range of the computer ).

For details, see the HDR tutorial (very simple, with the source code ):

Http://www.gamedev.net/columns/hardcore/hdrrendering/default.asp

3. Fake HDR implementation:

Due to the need for sm3.0 floating point texture support for HDR, some people make pseudo HDR under dx8.

Convert the HDR floating point format to a 16-bit integer to an integer texture, and then extract the luminous part and render it to another Paster,

Perform blur on it, and then mix it with the first texture by coloring.

Reference (in fake HDR and true HDR ):

Http://www.realistic3d.com/Documents/hdr.pdf

To put it bluntly, this hacker technology can be implemented in a very simple way. For details, refer to the dxsdk post-processing example.

Has Bloom, glow and other effects, and can be combined by itself (a bit like the post-Synthesis of 3dsmax), but due to many

Processing of times rendering and related computing slows down the speed.

DX examples are: Microsoft DirectX SDK (December 2006) \ samples \ c ++ \ direct3d \ postprocess \

Here I haveProgramAnalysis:

Http://blog.csdn.net/flipcode/archive/2008/03/18/2194994.aspx

For more information about HDR, see <something about HDR> In phoenixzz:

His Website: http://phoenixzz.blogbus.com/logs/1586174.html

His explanation:

HDR (high dynamic range) lighting technology is a very popular technology recently. Many of the latest demos and commercial games use this technology, such as the recent popular empire era three and Half-Life2. Because the texture color in Traditional Graphics ranges from 0 to 1, and in real life, the light ranges far beyond [0, 1], the light information beyond the range will be lost. Because DX9 supports the floating point texture format, it can support a wider range of colors and HDR can be implemented.

In the end, the fundamental technology of HDR implementation lies in the floating point texture format and the floating point drawing surface. The texture format of a16b16g16r16f is sufficient. In fact, the integer format texture can also be used to achieve HDR, but it requires a lot of money, you need to represent the floating point as an integer format into the integer format of the texture.

Rendering technology is actually very simple. First, multiply the pixel result by an exposure (generally greater than 1), which generally exceeds the range, save the part smaller than 1 as a normal LDR texture (which can be in r8g8b8 format) and save the part larger than 1 as an HDR texture (a16r16g16b16f format ); then perform blur on the HDR texture (First horizontal and then vertical, and the texture size of The Blur can be 1/2 or 1/4 of the original size, or multiple times of blur ), the final result is obtained by adding the LDR texture to the result of blur.

For special effects, you need to carefully adjust the exposure and some parameters.

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.