Post-processing之Auto Exposure

本文深入探讨游戏开发中各种视觉特效与后期处理技术,包括自动曝光、Bloom、色差、颜色校正、景深、噪点、镜头扭曲、运动模糊、空间反射及暗角效果。每种效果都附有详细参数说明,帮助开发者精确控制游戏画面,提升视觉体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Auto Exposure

 Auto Exposure :自动曝光,根据图像包含的亮度级别范围动态调整图像的曝光
 

Properties

PropertyFunction
Filtering过滤器,设置直方图的上下百分比,找到稳定的平均亮度。超出此范围的值将被丢弃,不会影响平均亮度。
Minimum设置环境光当中最小平均亮度
Maximum设置环境光当中最大平均亮度
Exposure Compensation曝光补偿,设置中灰色值来补偿场景的全局曝光。.

Adaptation settings:

PropertyFunction
Type选择适应类型。progressive的自动曝光。fix的自动曝光。
Speed Up设置从黑暗环境到光明环境的适应速度.
Speed Down设置从光亮环境到黑暗环境的适应速度。

Details

使用Filtering 去控制非常黑暗和光亮的像素,让这些像素不参加平均亮度的计算

Minimum/Maximum 的值用来计算给定范围内的平均亮

Fixed 就像一个自动曝光设置

使用Light Meter 监视器,在使用这个效果

 

 

Bloom

 Bloom  创建了一种在图片中 从光亮区域往外扩散的流苏效果 , 就像一个白场

 亮度高的区域回往外扩散,通过控制值,让他扩散整个屏幕

也可以用Lens Dirt 在屏幕上设置一些灰尘,衍射bloom这个效果

Properties

Bloom settings:

PropertyFunction
Intensity强度
Threshold设置亮度的等级,在此等级下过滤像素,用 gamma-space表示
Soft Knee设置阈值以下/阈值以上的渐变阈值(0 =硬阈值,1 =软阈值)。越大扩散范围越大
Clamp控制 Bloom 效果像素的数量.
Diffusion设置往外扩散的等级Set the extent of veiling effects in a screen resolution-independent fashion.
Anamorphic Ratio设置比例以垂直(范围[-1,0])或水平(范围[0,1])缩放Bloom。这模拟了变形透镜的效果
Color设置往外扩散的颜色.
Fast Mode开启扩散的质量变低

Dirtiness settings:

PropertyFunction
Texture选择一个肮脏的纹理添加污渍或灰尘的镜头。
Intensity设置镜头的脏度。

Details

对于适当暴露的HDR场景,阈值应该设置为~1,这样只有大于1的像素才会泄漏到周围的对象中。在LDR中工作时删除此值,否则效果将不可见。

Performance

 Diffusion 越低,效果渲染越快 Anamorphic Ratio越大,渲染月满. Fast Mode适用移动平台

 

 

Chromatic Aberration

给物体添加带色彩的边缘条

Properties

PropertyFunction
Spectral LutSelect the texture used for a custom fringing color. When left empty, Unity will use the default texture.
IntensitySet the strength of the Chromatic Aberration effect.
Fast ModeUse a faster variant of Chromatic Aberration effect for improved performance.

 

 

 

Color Grading

颜色矫正,调色,这个比较使用,但是现在一般都有专门的镜头调色插件

The Color Grading effect comes with three modes:

  • Low Definition Range (LDR): ideal for lower-end platforms. Grading is applied to the final rendered frame clamped in a [0,1] range and stored in a standard LUT.
  • High Definition Range (HDR): ideal for platforms that support HDR rendering. All color operations are applied in HDR and stored into a 3D log-encoded LUT to ensure a sufficient range coverage and precision (Alexa LogC El1000).
  • External: for use with custom 3D LUTs authored in external software.

 

Properties

PropertyFunction
Lookup TextureLDR: Select a custom lookup texture (strip format, e.g. 256x16) to apply before the rest of the color grading operators. If none is provided, a neutral one will be generated internally.

External: A custom 3D log-encoded texture.
ContributionLDR: Set how much of the lookup texture will contribute to the color grading.

Note: Volume blending between multiple LDR lookup textures is supported but only works correctly if they're the same size. For this reason it is recommended to stick to a single LUT size for the whole project (256x16 or 1024x32).

Tonemapping

色调映射

 

PropertyFunction
ModeOnly available in the High Definition Range mode. Select the Tonemapping mode from the dropdown menu.
None: No Tonemapping applied.
Neutral: Applies a range-remapping with minimal impact on color hue and saturation.
ACES: Applies a close approximation of the reference ACES tonemapper for a cinematic look. This effect has more contrast than Neutral affects color hue and saturation. When this tonemapper is enabled, all grading operations are performed in the ACES color spaces for optimal precision and results.
Custom: A fully parametric tonemapper. This is the only tonemapper with its own settings.
Toe StrengthSet a value for the transition between the toe and the mid section of the curve. A value of 0 means no toe, a value of 1 means a very hard transition.
Toe LengthSet the value for how much of the dynamic range is in the toe. With a small value, the toe will be very short and quickly transition into the linear section, and with a longer value having a longer toe.
Shoulder StrengthSet the value for the transition between the mid section and the shoulder of the curve. A value of 0 means no shoulder, value of 1 means a very hard transition.
Shoulder LengthSet the value for how many F-stops (EV) to add to the dynamic range of the curve.
Shoulder AngleSet the value for how much overshot to add to the shoulder.
GammaSet the value for applying a gamma function to the curve.

 

 

 

 

 

Depth of Field

Depth of Field :景深

Properties

PropertyFunction
Focus Distance设置焦点的距离,就是哪个地方是焦点
Aperture光圈大小,光圈和景深成反比,光圈越大,景深越小
Focal Length焦距,焦距和景深成反比,焦距越大,景深越小.
Max Blur SizeSelect the convolution kernel size of the bokeh filter from the dropdown. This setting determines the maximum radius of bokeh. It also affects the performance (the larger the kernel is, the longer the GPU time is required).

 

 

Grain

Grain :给屏幕添加噪点

Properties

PropertyFunction
Colored启动彩色噪点,打开耗费性能.
Intensity强度
Size噪点大小
Luminance Contribution设置数值,控制噪声响应曲线。此值基于场景亮度。值越低场景中黑暗的地方,噪点就少。

 

 

 

Lens Distortion

 Lens Distortion:扭曲图片,鱼眼镜头

Properties

PropertyFunction
Intensity设置鱼眼镜头的强度
X Multiplier在X轴上设置强度倍增器。将其设置为0以禁用此轴上的失真。
Y Multiplier在Y轴上设置强度倍增器。将其设置为0以禁用此轴上的失真。
Center X设置畸变中心点(X轴)。
Center Y设置畸变中心点(Y轴)
Scale设置全局屏幕缩放的值。

 

 

Motion Blur

 Motion Blur运动模糊,当物体的运动速度大于曝光时间,物体就会模糊.

Properties

PropertyFunction
Shutter Angle设置旋转快门的角度。更大的值提供更长的曝光时间和更强的模糊效果
Sample Count设置采样点数量的值。这会影响质量和性能,较低的值,性能越高

 

 

Screen Space Reflections

The Screen Space Reflection 空间反射,在一些镜子和小水坑的时候容易用,防止反射光过强

Properties

PropertyFunction
Preset渲染质量预设
Maximum Iteration Count (Custom preset only)更高的数值意味着更多的反射。
Thickness (Custom preset only)设置射线厚度的值。值越低,资源越密集,但检测的细节越小。
Resolution (Custom preset only)选择内部缓冲区的大小。选择Downsample以最大化性能。Supersample是较慢的,但产生更高的质量的结果。
Maximum March Distance设置在场景中穿越的最大距离,之后将停止绘制反射。
Distance Fade设置距离的值,使反射在近平面附近渐褪。这对于隐藏常见的工件非常有用。.
Vignette选择使屏幕边缘附近的反射褪色的值。

 

 

Vignette

 Vignette 使图像的边缘变暗,使图像的中心变亮

 

Classic

经典模式

Properties

PropertyFunction
Color设置颜色.
Center设置中心点,屏幕重心是 [0.5,0.5]).
Intensity强度
Smoothness平滑度
Roundness值越小包围图形越方
Rounded启用时,使用圆形包围,禁用时,使用方形
### Unity HDRP 中实现自动曝光效果 在 Unity HDRP (高清晰度渲染管线) 中,为了使场景看起来更加真实并适应不同的光照条件,自动曝光功能显得尤为重要。由于 HDRP 是一个完全基于物理的渲染系统,所有灯光和材质设置都遵循物理规律,因此正确配置曝光对于获得理想的视觉效果至关重要[^2]。 #### 配置自动曝光 要启用和调整自动曝光,在 Post-processing Volume 组件中操作: 1. **创建或选择体积对象** 创建一个新的 `Volume` 对象或将现有对象转换为体积对象。这可以通过右键点击层次视图中的空白处,然后依次选择 `Effect > Volumes > Global Volume` 来完成。 2. **添加 Auto Exposure Effect** 打开所选体积对象上的 `Volume` 组件窗口,点击加号按钮 (+),搜索 "Auto Exposure" 并将其添加到当前卷内。 3. **参数调节** 在 `Auto Exposure` 设置面板下可以找到多个可调选项用于微调最终的效果表现: - **Min Luminance**: 定义了最低亮度阈值,默认情况下该数值较低意味着暗部细节更明显。 - **Max Luminance**: 设定了最高亮度界限,较高的最大值可以让明亮区域不过曝。 - **Eye Adaptation Speed Up/Down**: 控制眼睛适应速度,即当环境光线突然变化时屏幕变亮或变暗的速度。 ```csharp // C# 脚本示例:通过脚本修改自动曝光属性 using UnityEngine; using UnityEngine.Rendering.HighDefinition; public class AdjustExposure : MonoBehaviour { private void Start() { var volume = GetComponent<Volume>(); if (!volume.profile.TryGet(out AutoExposure autoExposure)) return; // 修改最小亮度 autoExposure.minLum.value = 0.05f; // 修改最大亮度 autoExposure.maxLum.value = 8.0f; // 提高速度向上适配 autoExposure.eyeAdaptSpeedUp.value = 2.0f; // 减慢向下适配速度 autoExposure.eyeAdaptSpeedDown.value = 0.75f; } } ``` 上述代码展示了如何利用编程方式来改变自动曝光的相关参数,从而影响游戏运行期间的画面呈现效果。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

TO_ZRG

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值