第一节 基于物理相机曝光方案

一套完善的基于物理渲染的系统要有三部分组成:(1)基于物理的材质(Physically material);(2)基于物理的光照(Physically based lighting);(3)基于物理的相机(Physically based camera);

我们基于物理的相机(camera) ,根据实际的光照情况选用合适的相机参数设置来曝光(expose)场景,输出合适的光亮度(luminance)。这也要求光照部分使用真实环境的光照物理量,比如不同环境下光度计测出的光照度,亮度信息,这里以太阳光\天光为例,说明现实生活中太阳实际照度:

Light 10am 12pm 5:30pm
Sun⊥ 120,000 130,000 90,000
Sky⊥ 20,000 25,000 9,000
Sun⊥+Sky⊥ 100,000 105,000 81,000

                                     Table 1: Illuminance values in lx (a full moon has an illuminance of 1 lx)

我们再看不同EV 值对应的曝光量:(假设您一定能区分光亮度luminance , 光照度illuminnance的区别  ,否则物理渲染基础还没入门,建议重新再翻翻)

  EV100     Luminance   Illuminance
  cd/m2     fL     lx     fc  
−4 0.008 0.0023 0.156 0.015
−3 0.016 0.0046 0.313 0.029
−2 0.031 0.0091 0.625 0.058
−1 0.063 0.018 1.25 0.116
0 0.125 0.036 2.5 0.232
1 0.25 0.073 5 0.465
2 0.5 0.146 10 0.929
3 1 0.292 20 1.86
4 2 0.584 40 3.72
5 4 1.17 80 7.43
6 8 2.33 160 14.9
7 16 4.67 320 29.7
8 32 9.34 640 59.5
9 64 18.7 1280 119
10 128 37.4 2560 238
11 256 74.7 5120 476
12 512 149 10,240 951
13 1024 299 20,480 1903
14 2048 598 40,960 3805
15 4096 1195 81,920 7611
16 8192 2391 163,840 15,221

                   Table 2. Exposure value vs. luminance (ISO 100, K = 12.5) and illuminance (ISO 100, C = 250)

上面给大家个整体认识,这个EV值在物理渲染相机模型中起决定作用(它是相机光圈,快门组合模式),无论什么相机, EV值相同,曝光量相同(也就是照片亮度一样)。我们对HDRI(亮度信息,值精度超出0.0-1.0)做tonemapping生成 LDRI(取值范围0.0-1.0),  也就是归一化,将渲染产出的光亮度或照度值除于EV对应的测光值,也就曝光了, 是的,就这么回事。这里只谈曝光处理,光圈、快门选择对最终画质的影响这里不做讨论。一般光圈值的选定影响景深, 快门速度的选定影响图像清晰度,快门越快,图片越清晰,光圈越大,进光量越多,拍出的照片也就越亮。

我们使用物理相机对场景进行曝光,主要有以下几个步骤:

(1)根据光圈值f/n、快门速度 t,感光度ISO设置计算出 EV值;

(2)使用EV值计算出光照环境光亮度或光照度值;

(3)对场景渲染出的光照结果(一般是光亮度或光照度)除于EV值对应的光亮度或光照度值,并归一化得到最终场景LDRI;

这里再重提一次, 我们的光照系统单位首先要是物理单位,而且光照是真实测量值,如果光照系统单位不是物理单位,不能直接使用基于物理相机来曝光

第二节 EV 的定义、推导、及与光照信息的关系

我还是从维基百科摘点重点给大家看看,有些地方注解下,人懒,没法子,英语又不怎么地。。。

In photography, exposure value (EV) is a number that represents a combination of a camera's shutter speed and f-number, such that all combinations that yield the same exposure have the same EV (for any fixed scene luminance). Exposure value is also used to indicate an interval on the photographic exposure scale, with a difference of 1 EV corresponding to a standard power-of-2 exposure step, commonly referred to as a stop.[1]

Although all camera settings with the same EV nominally give the same exposure, they do not necessarily give the same picture. The f-number (relative aperture) determines the depth of field, and the shutter speed (exposure time) determines the amount of motion blur, as illustrated by the two images at the right (and at long exposure times, as a second-order effect, the light-sensitive medium may exhibit reciprocity failure, which is a change of light sensitivity dependent on the irradiance at the film).

上面的意思是定义了什么是曝光值,曝光值对最终照片亮度的影响。EV值是光圈值和快门的组合,不同的相机只要选定相同的EV值,它的曝光量就一样,但画质可能不一样,因为影响画质的因素有多种,景深,模糊等等,不同的光圈值,快门速度拍出来照片是不一样的。

相机曝光值定义

N 是光圈值, t 是快门速度,这个公式定义光圈值快门速度的一个比率,以2为底的对数,方便定义2次缩放,比如EV+1, 场景光照情况强一倍,EV-1, 光照情况减一倍。N/t 的比值只是个助记结果,确切的说EV值只是方便助记。要记住,一个特定的 EV 值对应多种不同的光圈值、快门速度的组合,这只是影响最终画质,但不影响曝光量, EV 值确定了,曝光量也就确定了。这个公式也不要看单独的N、t 对EV 的影响,要整体看,它只是个比率,不要认为N 大了,光圈小了 EV 也就越大,曝光应该越多,画面越亮才对。其实不是这样,N 调整, t 也会跟着调整, 这个比率是恒定的,说白了是由EV值决定N/t的组合。

我们再看看胶片曝光量的定义:

这个定义挺好理解,胶片或影像平面曝光量等于  照度 乘以 曝光时间。光度学里光照度是单位时间通过区域的光能量, 辐射度学里照度是单位时间通过区域的辐射能量,其实一个意思,H是胶片接收的总能量。

大师们就是聪明,把数学玩的溜溜的,能把遇到的实际情况用数学公式表达出来,既然曝光与光照度和时间相关,把影响曝光的的因子凑个比例出来不就中了,公式来了==

 

曝光量与快门速度(也就是曝光时间),光圈值相关,第一个公式定义曝光量影响因子,时间越长曝光量越大,相机光圈直径越大曝光量越大,N是光圈值(f/n),光圈值越大镜头反而越小, 所以凑了个N的二次方放下边, 用二次方方便取对数。第二个公式,说明不同光圈值\快门速度比例关系; 第三个公式把公式1的比例倒过来取对数,这就是Ev的定义,反正就是比率,倒过来也没关系而且好处也多,维基百科的解释:

The ratio t/N2 could be used to represent equivalent combinations of exposure time and f-number in a single value. But for many such combinations used in general photography, the ratio gives a fractional value with a large denominator; this is notationally inconvenient as well as difficult to remember. Inverting this ratio and taking the base-2 logarithm allows defining a quantity Ev 。

相机曝光值(以前曝光这个词汇表示相机曝光值或照片曝光,为了不产生歧义,现在把EV值就表述成相机曝光值,曝光特指胶片曝光 )公式是给出来了,咋用到实际情况呢?大师们又凑了这个公式,把亮度,胶片感光度跟光圈快门速度之比联系起来,

再取个对数完美了:

其中L是拍摄环境亮度,S感光度。大师们定义EV0是光圈值是1, 曝光时间为1s, K是常量,由厂家指定。一般设定胶片感光度100为基础,通过不同的EV级别计算出L。这样根据光度计测量的实际环境值在表里配配对就找到对应的EV值,所以有了表2, EV 由 -4 到 16对应关系。

照度相关的 EV 推导,同理:

我们看看由光学测量设备测量的光照对应的EV值匹配表, 以ISO100为基础:

Lighting condition EV100
Daylight
Light sand or snow in full or slightly hazy sunlight (distinct shadows)a 16
Typical scene in full or slightly hazy sunlight (distinct shadows)a, b 15
Typical scene in hazy sunlight (soft shadows) 14
Typical scene, cloudy bright (no shadows) 13
Typical scene, heavy overcast 12
Areas in open shade, clear sunlight 12
Outdoor, natural light
Rainbows
Clear sky background 15
Cloudy sky background 14
Sunsets and skylines
Just before sunset 12–14
At sunset 12
Just after sunset 9–11
The Moon,c altitude > 40°
Full 15
Gibbous 14
Quarter 13
Crescent 12
Blood 0 to 3[6]
Moonlight, Moon altitude > 40°
Full −3 to −2
Gibbous −4
Quarter −6
Aurora borealis and australis
Bright −4 to −3
Medium −6 to −5
Milky Way galactic center −11 to −9
Outdoor, artificial light
Neon and other bright signs 9–10
Night sports 9
Fires and burning buildings 9
Bright street scenes 8
Night street scenes and window displays 7–8
Night vehicle traffic 5
Fairs and amusement parks 7
Christmas tree lights 4–5
Floodlit buildings, monuments, and fountains 3–5
Distant views of lighted buildings 2
Indoor, artificial light
Galleries 8–11
Sports events, stage shows, and the like 8–9
Circuses, floodlit 8
Ice shows, floodlit 9
Offices and work areas 7–8
Home interiors 5–7
Christmas tree lights 4–5

                                 Table 3. Exposure values (ISO 100) for various lighting conditions

如何计算其它感光度的EV值呢? 这个好办!在ISO100的基础上根据对数运算法则做加减就行了。

有了 EV 与 luminance , illuminance 的公式,算出luminnance , illuminance 很容易了:

For a given ISO speed and meter calibration constant, there is a direct relationship between exposure value and luminance (or illuminance). Strictly, EV is not a measure of luminance or illuminance; rather, an EV corresponds to a luminance (or illuminance) for which a camera with a given ISO speed would use the indicated EV to obtain the nominally correct exposure. Nonetheless, it is common practice among photographic equipment manufacturers to express luminance in EV for ISO 100 speed, as when specifying metering range (Ray 2000, 318) or autofocus sensitivity. And the practice is long established; (Ray 2002, 592) cites Ulffers (1968) as an early example. Properly, the meter calibration constant as well as the ISO speed should be stated, but this seldom is done.

Values for the reflected-light calibration constant K vary slightly among manufacturers; a common choice is 12.5 (Canon, Nikon, and Sekonic[8]). Using K = 12.5, the relationship between EV at ISO 100 and luminance L is then

Values of luminance at various values of EV based on this relationship are shown in Table 3. Using this relationship, a reflected-light exposure meter that indicates in EV can be used to determine luminance.

As with luminance, common practice among photographic equipment manufacturers is to express illuminance in EV for ISO 100 speed when specifying metering range.[9]

The situation with incident-light meters is more complicated than that for reflected-light meters, because the calibration constant C depends on the sensor type. Two sensor types are common: flat (cosine-responding) and hemispherical (cardioid-responding). Illuminance is measured with a flat sensor; a typical value for C is 250 with illuminance in lux. Using C = 250, the relationship between EV at ISO 100 and illuminance E is then

Values of illuminance at various values of EV based on this relationship are shown in Table 3. Using this relationship, an incident-light exposure meter that indicates in EV can be used to determine illuminance.

Although illuminance measurements may indicate appropriate exposure for a flat subject, they are less useful for a typical scene in which many elements are not flat and are at various orientations to the camera. For determining practical photographic exposure, a hemispherical sensor has proven more effective. With a hemispherical sensor, typical values for C are between 320 (Minolta) and 340 (Sekonic) with illuminance in lux. If illuminance is interpreted loosely, measurements with a hemispherical sensor indicate "scene illuminance".

常用的相机曝光表

附上计算相机曝光度的一个实用网站:

https://rechneronline.de/exposure/

光照系统单位是物理的有很多优势,有些基于物理的渲染系统光照采用的是非物理单位,比如太阳光设置为 color(10.0,10.0,10.0)的强度值,这样的实现既不直观又缺乏统一性,例如从室外到室内的照明只能靠美工调校,color 缺乏物理意义,有些系统定义color 为光垂直照射到白纸上的F0值 。直接使用光学设备测量环境中的照明情况既方便又便于理解,重要的是光照具有一致性,其它渲染系统可以对光照不做修改拿来就用。

基于物理相机渲染 第一篇 EV light condition(相机曝光值与光照情况关系)相关推荐

  1. [图形学] 基于物理的渲染(PBR)

    reference :<real-time rendering 4> BRDF 概述 基于物理的渲染即计算沿着视线进入相机的光照辐射.如果不考虑吸收或散射的介质,则进入相机的辐射等于离开相 ...

  2. 游戏中基于物理的渲染

    转载请注明出处为KlayGE游戏引擎,本文的永久链接为http://www.klayge.org/?p=493 "游戏中基于物理的渲染"系列由4-5篇文章组成,介绍了如何在实时渲染 ...

  3. 【基于物理的渲染(PBR)白皮书】(二) PBR核心理论与渲染光学原理总结

            本文由@浅墨_毛星云 出品,首发于知乎专栏,转载请注明出处           文章链接: https://zhuanlan.zhihu.com/p/56967462 这是[基于物理的 ...

  4. [Shader] Shader Cookbook 基于物理的渲染[4]

      在Unity 5中引入的基于物理的渲染(PBR)是一种shading模型,它试图以一种与现实世界中光线工作方式相似的方式渲染图形.我们在第5章"理解照明模型"中遇到的所有照明模 ...

  5. (十九)unity shader之——————基于物理的渲染技术(PBS):中篇(Unity 5中的Standard Shader的实现和使用)

    一.unity 5中的standard shader 在unity5中新创建一个模型或是新创建一个材质时,默认使用的着色器都是一个名为standard 的着色器.这个standard shader使用 ...

  6. 游戏中基于物理的渲染简简明科普

    http://tieba.baidu.com/p/3922888163 基于物理的渲染(PBR)是一个近几年时常见诸于各大游戏行业技术交流.游戏开发商公关以及游戏媒体口中的词汇.这个词涵盖内容广泛,定 ...

  7. 游戏中基于物理的渲染(一)

    "游戏中基于物理的渲染"系列由4-5篇文章组成,介绍了如何在实时渲染中使用基于物理的方法.内容主要来自于SIGGRAPH 2010的course:Physically-Based ...

  8. Learn OpenGL 笔记7.1 PBR Theory(physically based rendering基于物理的渲染 理论)

    PBR,或更通常称为基于物理的渲染,是一组渲染技术,它们或多或少基于与物理世界更接近的相同基础理论.由于基于物理的渲染旨在以物理上合理的方式模拟光线,因此与我们的原始光照算法(如 Phong 和 Bl ...

  9. 基于物理的渲染PBR(一):pbr的基础理论和推导

    初始PBR 最近刚接触pbr不久,我搜寻了许多文章进行阅读并了解后发现,pbr涉及到的知识点繁琐且不容易理解,所以想在博客上给自己记录并总结一下,方便以后回顾并加深记忆. 这里首先借用知乎上的大佬毛星 ...

最新文章

  1. 一幅图读懂量子力学(数学的判决)
  2. ue4 导出模型_UE4构建光照后模型变黑,二套UV解决办法
  3. 7.10 枚举——最大公约数和最小公倍数问题
  4. Mirantis Certification summary
  5. 数据特征分析-对比分析
  6. 第一家云创大数据产业学院在佛山职业技术学院挂牌
  7. Linux基础知识之用户和用户组以及 Linux 权限管理
  8. 把本地的jar包打包到maven本地仓库里
  9. 第一节 如何用Go实现单链表
  10. vue x 兼容iphone_【前端vue系列】初始化一个vue工程
  11. 最快的滚屏截图软件--SpaceCapture
  12. ARCH模型以及编程实现
  13. 关于QQ游戏大厅的架构我也想说几句
  14. 从《计算机网络》到TCP/IP
  15. 数据中心服务器多少度宕机,害怕宕机?来看看数据中心机房的4大等级!
  16. Go语言学习笔记(三)---指针,运算符及流程控制
  17. 如何免费下载qq音乐 ----ctf学习之php漏洞
  18. 水库工程标准化运管云系统,科技助力水库工程管理国家样板创建
  19. mysql必知必会第5版pdf_sql必知必会
  20. Skia深入分析5——skia文字绘制的实现

热门文章

  1. 《JAVA300集》多线程_并发基础案例-day21
  2. 腾讯月薪60k招程序员,看到要求我傻眼了!
  3. linux dc命令,Linux中ntpdc命令起什么作用呢?
  4. 量化投资学习-36:选股的基本方式
  5. 干货!学习STM32的一些经验分享
  6. 我的“网友”一只贴代码君
  7. 如何在电子学习 e-learning 平台学习管理系统 LMS 中集成使用 ONLYOFFICE
  8. Unity_VRTK 3.2.1_UI手柄射线检测点击事件的问题
  9. 内网穿透工具nps使用教程 - 来自内部交流群
  10. [SceneKit专题]20-仿水果忍者小游戏Geometry-Fighter