In standard rendering, the red, green and blue values for a pixel are each represented by a fraction in the range 0..1, where 0 represents zero intensity and 1 represents the maximum intensity for the display device. While this is straightforward to use, it doesn't accurately reflect the way that lighting works in a real life scene. The human eye tends to adjust to local lighting conditions, so an object that looks white in a dimly lit room may in fact be less bright than an object that looks grey in full daylight. Additionally, the eye is more sensitive to brightness differences at the low end of the range than at the high end.

在标准渲染,每像素的红、绿、蓝值表示0~1的范围比例,其中0表示零强度和1表示显示设备的最大强度。虽然这是直观使用,它并不能准确反映在真实的生活场景的照明。人眼倾向于以适应本地的照明条件,所以,一个物体在昏暗的房间里看起来是白色的,并不比在日光下灰色的物体亮。此外,眼睛在该范围看低处的亮度差异比在高处更敏感。

More convincing visual effects can be achieved if the rendering is adapted to let the ranges of pixel values more accurately reflect the light levels that would be present in a real scene. Although these values will ultimately need to be mapped back to the range available on the display device, any intermediate calculations (such as Unity's image effects) will give more authentic results. Allowing the internal representation of the graphics to use values outside the 0..1 range is the essence of High Dynamic Range (HDR) rendering.

更有说服力的视觉效果可以实现,如果让渲染适应像素值的范围更准确的反射灯光的等级,这将是一个真实的场景。虽然这些值将最终需要被映射回显示设备的可用范围,任何中间计算(如Unity的图像效果)将提供更真实的结果。允许使用内部的图像,0...1值外范围是高动态范围(HDR)渲染。

Working with HDR 使用HDR

HDR is enabled separately for each camera using a setting on the Camera component:-

HDR为每个相机组件单独启用设置:

When HDR is active, the scene is rendered into an HDR image buffer which can accommodate pixel values outside the 0..1 range. This buffer is then postprocessed using image effects such as HDR bloom. The tonemapping image effect is what converts the HDR image into the standard low dynamic range (LDR) image to be sent for display. The conversion to LDR must be applied at some point in the image effect pipeline but it need not be the final step if LDR-only image effects are to be applied afterwards. For convenience, some image effects can automatically convert to LDR after applying an HDR effect (see Scripting below).

当HDR激活,该场景被渲染成一个HDR图像缓冲区可容纳0..1范围以外的像素值。这个缓冲区然后被后期处理使用图像效果,如HDR bloom。色调映射tonemapping图像效果是转换HDR图像到标准的低动态范围(LDR)图像发送显示。转换到LDR必须在一些点应用图像效果管线,如果仅LDR图像效果在后来应用,但它不需要最后一步。为方便起见,一些图像效果能自动转换为 LDR之后应用HDR效果(请参见下面的脚本)。

Tonemapping 色调映射

Tonemapping is the process of mapping HDR values back into the LDR range. There are many different techniques, and what is good for one project may not be the best for another. A variety of tonemapping image effects have been included in Unity. To use them select Assets -> Import Package -> Image Effects (Pro Only) select the camera in the scene then select Component -> Image Effects ->ToneMapping a detailed description of the tonemapping types can be found in the image effects documentation.

Tonemapping是HDR值反映射回到LDR范围的过程。有许多不同的技术,在这个项目是好的,未必在另外一个项目也是最好的。各种tonemapping图像特效已包含在Unity中。要使用他们,选择Assets -> Import Package -> Image Effects (Pro Only) ,选择在场景中的摄像机,然后选择Component -> Image Effects ->ToneMapping,关于tonemapping类型的详细描述,可以在图像特效文档找到image effects documentation.。

An exceptionally bright seen rendered in HDR. Tonemapping is used to bring the bright intensities back into the displayable range.

在HDR下渲染看到格外明亮。 tonemapping用于把明亮的强度降低到可显示的范围。

HDR Bloom

Using HDR allows for much more control in post processing. LDR bloom has an unfortunate side effect of blurring many areas of a scene even if their pixel intensity is less than 1.0. By using HDR it is possible to only bloom areas where the intensity is greater than one. This leads to a much more desiarable outcome with only super bright elements of a scene bleeding into neighboring pixels. The built in 'Bloom and Lens Flares' image effect now also supports HDR. To attach it to a camera select Assets -> Import Package -> Image Effects (Pro Only) select the camera in the scene then select Component -> Image Effects ->Bloom (Supports HDR and Lens Flare) a detailed description of the 'Bloom and Lens Flares' effect can be found in the image effects documentation.

使用HDR,允许更多的后处理控制。LDR bloom有些副作用,场景的许多区域变得模糊,即使他们的像素强度小于1.0。通过使用HDR,只bloom像素强度大于1的区域。这将导致一个场景中超高亮度元素渗色到邻近的像素得到更理想的结果。内置的"Bloom and Lens Flares'"的图像特效现在也支持HDR。选择Assets -> Import Package -> Image Effects (Pro Only) 把它关联到摄相机,选择在场景中的摄像机,然后选择Component -> Image Effects ->Bloom (Supports HDR and Lens Flare) (支持HDR和镜头光晕),详细描述 "Bloom and Lens Flares'"效应,可以查阅图像特效文档 image effects documentation。

An exceptionally bright scene where bloom has been applied to intensities greater than 1.0. The bloomed image has also been tonemapped back into the displayable range.

一个格外明亮的场景,像素强度>1.0的地方已经使用bloom。Bloom处理后的图像也进行tonemapped,变到可显示的范围。

Advantages of HDR ( HDR的优势)

  • Colors not being lost in high intensity areas 颜色在高强度区域不会丢失
  • Better bloom support 更好支持bloom
  • Reduction of banding in low frequency lighting areas 减少低频照明区域的波段

Disadvantages of HDR ( HDR的缺点)

  • Uses Floating Point buffers (rendering is slower and requires more VRAM) 
    使用浮点缓冲区(渲染很慢并且需要更多显存)
  • Not supported on all hardware 
    不是所有的硬件都支持

Usage notes 使用说明

Forward Rendering 正向渲染

In forward rendering mode HDR is only supported if you have an image effect present. This is due to performance considerations. If you have no image effect present then no tone mapping will exist and intensity truncation will occur. In this situation the scene will be rendered directly to the backbuffer where HDR is not supported.

正向渲染模式下,HDR仅支持在如果目前有一个图像特效的情况下。这是由于性能方面的考虑。如果你当前没有图像效果那么将不会发生色调映射和发生强度截断。在这种情况下,场景将直接渲染到不支持HDR的后备缓冲区。

Deferred Rendering 延迟渲染

In HDR mode the light prepass buffer is also allocated as a floating point buffer. This reduces banding in the lighting buffer. HDR is supported in deferred rendering even if no image effects are present.

在HDR模式下,灯光prepass缓冲区也被分配成浮点缓冲区。这将减少照明缓冲区的波段。即使当前没有图像特效,在延迟渲染下支持HDR。

Scripting 脚本

The ImageEffectTransformsToLDR attribute can be added to an image effect script to indicate that the target buffer should be in LDR instead of HDR. Essentially, this means that a script can automatically convert to LDR after applying its HDR image effect.

ImageEffectTransformsToLDR属性可以被添加到图像效果脚本来表示目标缓冲区应该是在LDR,而不是HDR的。基本上,这意味着一个脚本可以自动转换到LDR后应用HDR图像效果。

paper 72 :高动态范围(HDR)图像 HDR (High Dynamic Range)的更多相关文章

  1. paper 73 :HDR(High Dynamic Range Imaging)在摄影中指高动态范围成像

    HDR(High Dynamic Range Imaging)在摄影中指高动态范围成像.国内的教程基本语焉不详,找到一篇比较详尽的国外教程翻译出来,希望对大家有帮助.^_^ 原文地址:http://p ...

  2. 高动态范围光照(High Dynamic Range Imaging,简称HDRI或HDR)

    1  HDR基本概念 高动态范围光照(High Dynamic Range Imaging,简称HDRI或HDR),是一种表达超过了显示器所能表现的亮度范围的图像映射技术,已成为目前游戏应用不可或缺的 ...

  3. Unity Lighting - High Dynamic Range (HDR) 高动态范围(五)

      High Dynamic Range (HDR) 高动态范围 As well as Color Space, the ‘dynamic range’ of your camera needs to ...

  4. HDR(High Dynamic Range) - 高动态范围

    1. Dynamic Range 动态范围是指一个场景的最亮和最暗部分之间的相对比值   2. Tone-mapping 现实真正存在的亮度差,即最亮的物体亮度和最暗的物体亮度之比为 , 而人类的眼睛 ...

  5. Dynamic range compression

    这段时间终于把手头的东西都搞完了,还剩下一个AEC这个模块,这个模块跟整个系统机制有很大关系,单独的模块意义不大. 另外,刚写完一个分类器,希望能大幅提升音乐流派分类的准确率. 下周正式开搞AEC,把 ...

  6. paper 116:自然图像抠图/视频抠像技术梳理(image matting, video matting)

    1. Bayesian Matting, Chuang, CVPR 2001.http://grail.cs.washington.edu/projects/digital-matting/paper ...

  7. leetcode@ [72/115] Edit Distance & Distinct Subsequences (Dynamic Programming)

    https://leetcode.com/problems/edit-distance/ Given two words word1 and word2, find the minimum numbe ...

  8. Unity3d HDR和Bloom效果(高动态范围图像和泛光)

    文章开始先放两组效果,文章结尾再放两组效果本文测试场景资源来自浅墨大神,shader效果为本文效果 HDR 人们有限的视觉系统,只支持16.7百万的颜色,超出这个范围的颜色就不能显示了bmp或jprg ...

  9. HDR 高动态范围图像

    以下来源于百度百科: 高动态范围图像(High-Dynamic Range,简称HDR),相比普通的图像,可以提供更多的动态范围和图像细节,根据不同的曝光时间的LDR(Low-Dynamic Rang ...

随机推荐

  1. Mongo中的数组操作

    当前mongo中有这么一条数据 book是一个数组,在他后面添加一条数据 { "_id" : ObjectId("5721f504d1f70435632b5ce7&quo ...

  2. Qt Focus事件,FocusInEvent()与FocusOutEvent()

    描述:一开始我要实现的目的就是,在一个窗体上有多个可编辑控件(比如QLineEdit.QTextEdit等),当哪个控件获得焦点,哪个控件的背景就高亮用来起提示作用,查了下文档应该用focusInEv ...

  3. 【Android开发学习笔记】【随笔】UI线程

    概念 UI线程 是Android中的主线程,涉及到UI方面的一些操作都需要在ui线程中进行操作 在非ui线程中想操作ui,就会报错 android.view.ViewRoot$CalledFromWr ...

  4. C++ Primer Pluse_6_课后题

    #include <iostream> #include <cctype> #include <array> #include <string> #in ...

  5. Android笔记:真机调试无法输出Log 信息的问题

    机器在出厂时将log的级别做了限制,方法是:拨号盘输入*20121220# -> 选择日志输出级别 -> 选择Java log level -> 选择LOGD即可. 方法是:拨号盘输 ...

  6. JS控制flash的播放

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xht ...

  7. thinkPHP 接支付宝及时到账接口

    支付宝及时到帐接口,现在整理以下: 1.先将支付宝提供的公共类库函数库文件防盗thinkPHP的Vender目录下建的一个alipay文件下,以便之后的调用. //四个文件我分别给他们改了下名字,因为 ...

  8. Hand 3D Pose Estimation

    https://cvarlab.icg.tugraz.at/projects/hand_detection/

  9. python多进程(三种方法)

    #!/usr/bin/env python # -*- coding:utf- -*- from multiprocessing import Pool import time def f(x): t ...

  10. Vue.2.0.5-Vue 实例

    构造器 每个 Vue.js 应用都是通过构造函数 Vue 创建一个 Vue 的根实例 启动的: var vm = new Vue({ // 选项 }) 虽然没有完全遵循 MVVM 模式, Vue 的设 ...