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

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

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

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

Light10am12pm5:30pm
Sun⊥120,000130,00090,000
Sky⊥20,00025,0009,000
Sun⊥+Sky⊥100,000105,00081,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  
−40.0080.00230.1560.015
−30.0160.00460.3130.029
−20.0310.00910.6250.058
−10.0630.0181.250.116
00.1250.0362.50.232
10.250.07350.465
20.50.146100.929
310.292201.86
420.584403.72
541.17807.43
682.3316014.9
7164.6732029.7
8329.3464059.5
96418.71280119
1012837.42560238
1125674.75120476
1251214910,240951
13102429920,4801903
14204859840,9603805
154096119581,9207611
1681922391163,84015,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 photographyexposure 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 conditionEV100
Daylight
Light sand or snow in full or slightly hazy sunlight (distinct shadows)a16
Typical scene in full or slightly hazy sunlight (distinct shadows)a, b15
Typical scene in hazy sunlight (soft shadows)14
Typical scene, cloudy bright (no shadows)13
Typical scene, heavy overcast12
Areas in open shade, clear sunlight12
Outdoor, natural light
Rainbows
Clear sky background15
Cloudy sky background14
Sunsets and skylines
Just before sunset12–14
At sunset12
Just after sunset9–11
The Moon,c altitude > 40°
Full15
Gibbous14
Quarter13
Crescent12
Blood0 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 signs9–10
Night sports9
Fires and burning buildings9
Bright street scenes8
Night street scenes and window displays7–8
Night vehicle traffic5
Fairs and amusement parks7
Christmas tree lights4–5
Floodlit buildings, monuments, and fountains3–5
Distant views of lighted buildings2
Indoor, artificial light
Galleries8–11
Sports events, stage shows, and the like8–9
Circuses, floodlit8
Ice shows, floodlit9
Offices and work areas7–8
Home interiors5–7
Christmas tree lights4–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 (CanonNikon, 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值 。直接使用光学设备测量环境中的照明情况既方便又便于理解,重要的是光照具有一致性,其它渲染系统可以对光照不做修改拿来就用。

  • 0
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值