PostFX v2 –惊人的视觉效果,已升级

PostFX v2是Unity中的一款强大工具,它简化了创建和微调高质量视觉效果的过程,适用于戏剧性和真实感场景。通过体积混合,用户可以轻松在不同内置或自定义效果间切换。PostFX v2支持抗锯齿、环境光遮挡、景深等多种效果,且与LWRP、HDRP及内置渲染管线兼容。

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

The Post-Processing Stack makes it easy to create and fine-tune high-quality visuals for dramatic and realistic effect. Coming out of beta in 2018.1, we’ve added the most requested features and have fixed as many bugs as possible. We’ve also added mobile-specific paths, volume blending, and a complete framework for custom user-effects.

通过后期处理堆栈,可以轻松创建和微调高质量的视觉效果,从而获得逼真的效果。 自2018.1的beta版开始,我们添加了最受欢迎的功能并修复了尽可能多的bug。 我们还添加了特定于移动设备的路径,音量混合以及用于自定义用户效果的完整框架。

Version 2 (v2) of the Post-Processing Stack ships as the first of many upcoming packages, which will give users the plug-in flexibility of an Asset Store pack, but with the update-ability of a core Unity feature. It’s also available via the Templates in the Unity Hub.

后处理堆栈的版本2(v2)是即将推出的许多软件包中的第一个,它将为用户提供Asset Store Pack的插件灵活性,但具有Unity核心功能的可更新性。 也可以通过Unity Hub中的模板使用。

In 2018.1 the Post-Processing Stack (PostFX v2) has been improved to feature higher-quality effects, automatic volume blending with a powerful override stack, and a flexible framework to write and distribute your own custom effects. It’s compatible with the LWRP, HDRP, and built-in rendering pipelines.

在2018.1中,对后处理堆栈(PostFX v2)进行了改进,以提供更高质量的效果,具有强大的替代堆栈的自动音量混合以及灵活的框架来编写和分发您自己的自定义效果。 它与LWRP,HDRP和内置渲染管道兼容。

(image on left no post processing, imagine on right with full stack)

(左图没有后期处理,右图有完整堆栈)

进展如何 (How it’s progressed)

PostFX v1 has been available from the Asset Store for free for some time with the aim to gather user feedback, understand user workflows and improve quality and efficiency. This gave us valuable insight into how we can improve this feature and take it to the next level.

PostFX v1已在资产商店免费提供了一段时间,目的是收集用户反馈,了解用户工作流程并提高质量和效率。 这为我们提供了宝贵的见解,帮助我们了解如何改进此功能并将其提高到一个新的水平。

PostFX v2 provides many of the same effects in an improved form, and we’ve changed the workflow to a volumetric approach to make it easier to swap between effects instead of having multiple cameras, each one with its own stack.

PostFX v2以改进的形式提供了许多相同的效果,并且我们将工作流程更改为体积方法,以使在效果之间进行交换变得容易,而不是拥有多个摄像机,每个摄像机都有自己的堆栈。

PostFX v2 has been on hosted on GitHub throughout its development, we did this to be as open and transparent as possible so that you, our users can give feedback and also contribute if you wish. Through this process, we have had some amazing responses: over 2000★ and 330 forks. We opened 450 tickets and 30 pull requests, from minor fixes to bigger PRs where our users had customized the stack and sent us their changeset.

PostFX v2 整个开发过程中一直托管在GitHub上 ,我们这样做是为了尽可能公开和透明,以便您,我们的用户可以提供反馈,也可以根据需要提供帮助。 通过这个过程,我们得到了一些惊人的回应:超过2000★和330叉。 我们打开了450张票和30个拉票请求,从较小的修复到更大的PR,我们的用户在其中定制了堆栈并向我们发送了变更单。

Thank you to all who tried it out, provided feedback and any PRs. It really does help.

感谢所有尝试过的人,并提供反馈和任何PR。 确实有帮助。

现在如何获得 (How to get it now)

You can now access it via Package manager in the editor, this is the tested and verified version of the package. If you’re after the very latest development branch of PostFX v2 then it still will be hosted on GitHub.

现在,您可以通过编辑器中的“程序包管理器”访问它,这是程序包的经过测试和验证的版本。 如果您正在使用PostFX v2的最新开发分支,那么它仍将托管在GitHub上。

If you are new to Package Manager, a Unity 2017.2 addition, it’s a modular system and API that dynamically loads and updates new Unity-developed features in your projects. Unity 2018.1 takes it one step further with the newly released Package Manager User Interface, the Hub, and Project Templates, all of which help you get new projects started faster and more efficiently. For more information see our Package Manager documentation.

如果您不熟悉Package Manager,它是Unity 2017.2的新增功能,它是一个模块化系统和API,可动态加载和更新项目中Unity开发的新功能。 Unity 2018.1通过新发布的Package Manager用户界面,集线器和项目模板又向前迈进了一步,所有这些都可以帮助您更快,更有效地启动新项目。 有关更多信息,请参见我们的Package Manager 文档

You can also get it via the Unity Hub through the Templates. Project Templates change the way you launch a new project in Unity. The aim of Unity Project Templates is to improve the “out of the box” Unity experience for the majority of users. They provide preselected settings based on common best practices for different project types such as mobile, high-end PC, 3D, 2D, VR, etc.

您也可以通过Unity Hub通过模板获得它。 项目模板更改了在Unity中启动新项目的方式。 Unity项目模板的目的是为大多数用户改善“开箱即用”的Unity体验。 它们基于常见的最佳实践为不同的项目类型(例如移动设备,高端PC,3D,2D,VR等)提供预选设置。

You can see how to get the most of templates in this blog post.

您可以在此博客文章中了解如何充分利用模板

包含什么 (What’s included)

As a default, we have a whole range of effects built in for you to customize the look and feel of your scene. Many of these effects have been re-written since v1 and there are some new components as part of the this new version. When possible, we try to merge the effects into one pass while others are still standalone. We also have some mobile specific options to help optimize on lower end devices. Let’s jump in to see what’s there:

默认情况下,我们内置了各种效果供您自定义场景的外观。 自v1以来,其中许多效果已被重写,并且此新版本中包含一些新组件。 在可能的情况下,我们尝试将这些效果合并为一个过程,而其他过程仍然独立。 我们还提供一些特定于移动设备的选项,以帮助在低端设备上进行优化。 让我们跳进去看看那里是什么:

环境光遮挡(SAO,MSVO) (Ambient Occlusion (SAO, MSVO))

It darkens creases, holes, intersections and surfaces that are close to each other. In real life, such areas tend to block out or occlude ambient light, hence they appear darker.

它会使彼此靠近的折痕,Kong,交点和表面变暗。 在现实生活中,此类区域往往会遮挡或遮挡环境光,因此它们看起来更暗。

抗锯齿(FXAA,SMAA,TAA) (Anti-aliasing (FXAA, SMAA, TAA))

The Anti-aliasing effect offers a set of algorithms designed to prevent aliasing and give a smoother appearance to 3D graphics. Aliasing is an effect where lines appear jagged or have a “staircase” appearance.

抗锯齿效果提供了一组旨在防止锯齿并为3D图形提供更平滑外观的算法。 混淆是线条出现锯齿状或外观呈“阶梯”状的效果。

The algorithms supplied in the post-processing stack are:

后处理堆栈中提供的算法是:

    自动曝光 (Auto-exposure)

    This effect dynamically adjusts the exposure of the image according to the range of brightness levels it contains. The adjustment takes place gradually over a period of time, so the player can be briefly dazzled by bright outdoor light when, say, emerging from a dark tunnel. Equally, when moving from a bright scene to a dark one, the “eye” takes some time to adjust. In fact, this effect was called “Eye Adaptation” in the v1 stack.

    该效果根据其所包含的亮度级别范围动态调整图像的曝光。 调整会在一段时间内逐步进行,因此,例如从黑暗的隧道出来时,玩家可能会被明亮的室外光线短暂地弄得眼花azz乱。 同样,当从明亮的场景移动到黑暗的场景时,“眼睛”需要一些时间来调整。 实际上,此效果在v1堆栈中称为“眼睛适应”。

    盛开 (Bloom)

    This effect produces fringes of light extending from the borders of bright areas in an image, contributing to the illusion of an extremely bright light overwhelming the camera or eye.

    这种效果会产生从图像明亮区域边界延伸的光线条纹,导致幻觉极强的光线笼罩相机或眼睛。

    色差 (Chromatic Aberration)

    This is an effect resulting from a camera’s lens failing to converge all colors to the same point. It appears as “fringes” of color along boundaries that separate dark and bright parts of the image.

    这是由于相机镜头无法将所有颜色会聚到同一点而产生的效果。 它沿分隔图像暗部和亮部的边界显示为颜色的“条纹”。

    The Chromatic Aberration effect is used to replicate this camera defect. It’s also often used to artistic effect, for example as a part of camera impact.

    色差效果用于复制此相机缺陷。 它还经常用于艺术效果,例如作为相机冲击的一部分。

    颜色分级(LDR,HDR,CUBES) (Color Grading (LDR, HDR, CUBES))

    Color grading is the process of altering or correcting the color and luminance of the final image. You can think of it like applying filters in something like Instagram.

    颜色分级是更改或校正最终图像的颜色和亮度的过程。 您可以将其想象为在Instagram之类的应用过滤器。

    The Color Grading effect comes with three modes:

    颜色分级效果具有三种模式:

      景深 (Depth of Field)

      Depth of Field is a common post-processing effect that simulates the focus properties of a camera lens. In real life, a camera can only focus sharply on an object at a specific distance; objects nearer or farther from the camera will be somewhat out of focus.

      景深是一种常见的后处理效果,可模拟相机镜头的聚焦特性。 在现实生活中,相机只能在特定距离上清晰对焦。 距离相机较近或较远的物体会有些失焦。

      粮食 (Grain)

      The Grain effect is based on a coherent gradient noise. It is commonly used to emulate the apparent imperfections of film and often exaggerated in horror themed games.

      颗粒效果基于相干梯度噪声。 它通常用于模仿电影的明显瑕疵,并且在恐怖主题游戏中经常被夸大。

      镜头变形 (Lens Distortion)

      This effect simulates the shape of a lens by distorting or undistorting the final rendered picture.

      该效果通过使最终渲染的图像失真或不失真来模拟镜头的形状。

      运动模糊 (Motion Blur)

      Motion Blur is a common post-processing effect that simulates the blurring of an image when objects filmed by a camera are moving faster than the camera’s exposure time. This can be caused by rapidly moving objects or a long exposure time.

      运动模糊是一种常见的后期处理效果,当相机拍摄的对象移动的速度快于相机的曝光时间时,它会模拟图像的模糊。 这可能是由于物体快速移动或曝光时间过长引起的。

      屏幕空间反射 (Screen-space Reflections)

      Screen-space Reflection is a technique for reusing screen-space data to calculate reflections. It is commonly used to create more subtle reflections such as on wet floor surfaces or in puddles.

      屏幕空间反射是一种用于重复使用屏幕空间数据来计算反射的技术。 通常用于产生更细微的反射,例如在潮湿的地板表面或水坑中。

      小插图 (Vignette)

      In Photography, vignetting is the term used for the darkening and/or desaturating towards the edges of an image compared to the center.

      在摄影中,渐晕是用于与中心相比朝图像边缘变暗和/或去饱和的术语。

      组成部分 (The Components)

      后处理层 (Post Process Layer)

      The Post Process Layer component would sit on your camera. You can find it in Component -> Rendering -> Post-process Layer.

      后处理层组件将位于您的相机上。 您可以在组件->渲染->后处理层中找到它。

      Broken down under different headings you can; control the volume blending by setting the trigger (usually the camera Transform) and what layer that applies to, apply your chosen method of anti-aliasing and enable fog. The extra “Toolkit” settings below come with a few utilities to export the current frame to EXR format.

      您可以按照不同的标题细分; 通过设置触发器(通常是“相机变换”)和适用的图层来控制音量混合,应用所选的抗锯齿方法并启用雾化。 以下额外的“工具包”设置带有一些实用程序,可用于将当前框架导出为EXR格式。

      Finally, the last section allows you to change the rendering order of custom effects. More information on Writing Custom Effects.

      最后,最后一部分允许您更改自定义效果的渲染顺序。 有关编写自定义效果的更多信息。

      后期处理量 (Post Process Volume)

      The way post-processing works in this framework is by using local & global volumes. It allows you to give each volume a priority and a set of effect overrides to automatically blend post-processing settings in your scene. For instance, you could have a light vignette effect set-up globally, but when the player enters a cave you would only override the Intensity setting of the vignette to make it stronger while keeping the rest of the settings intact.

      后处理在此框架中的工作方式是使用本地和全局卷。 它使您可以为每个卷赋予优先级,并设置一组效果覆盖以自动混合场景中的后处理设置。 例如,您可能在全局设置了一个淡淡的晕影效果设置,但是当玩家进入一个洞穴时,您只会覆盖晕影的“强度”设置以使其更牢固,同时保持其余设置不变。

      In this example I have one Global Volume with “Is Global” ticked, every other volume would derive from this volume and Post Process Profile. I’ve then created a “Cave Area Profile” to override the effects from the “Global Profile” when my Camera (the trigger) enters the Trigger area (Set up by the box collider. The “Cave Area Profile” has a blend distance set and a higher priority than my Global Volume.

      在此示例中,我有一个全局卷,其中勾选了“是全局”,其他每个卷都将从该卷和“后处理概要”导出。 然后,当我的相机(触发器)进入触发区域(由对撞机设置)时,我创建了一个“洞穴区域配置文件”以覆盖“全局配置文件”的效果。“洞穴区域配置文件”具有混合距离设置,并且优先级高于“我的全局容量”。

      We can see in the video below how it works in the scene. As the camera enters the volume, the global settings are overridden and the effects blend nicely.

      我们可以在下面的视频中看到它在场景中的工作方式。 当摄像机输入音量时,全局设置将被覆盖,效果会很好地融合在一起。

      演示地址

      后期处理调试 (Post Process Debug)

      The post-processing stack also includes a collection of monitors and debug views to help you set up your effects correctly and debug problems in the output.

      后处理堆栈还包括监视器和调试视图的集合,以帮助您正确设置效果并调试输出中的问题。

      创建自定义效果 (Creating Custom Effects)

      This framework also allows you to write custom post-processing effects and plug them into the stack without having to modify the codebase. Of course, all effects you write against the framework will work out-of-the-box with volume blending, and unless you need loop-dependent features, they’ll also automatically work with the Scriptable Render Pipeline (SRP)!

      该框架还允许您编写自定义的后处理效果并将其插入堆栈,而无需修改代码库。 当然,您针对该框架编写的所有效果都可以通过体积混合立即使用,除非您需要依赖于循环的功能,否则它们还将自动与可脚本渲染管道(SRP)一起使用!

      You can see many experiments from one of our field engineer’s Keijiro on Twitter:

      您可以在Twitter上从我们的一位现场工程师的Keijiro中看到许多实验:

      Implementing custom effects for the post processing stack. https://t.co/SVNCptnKgn pic.twitter.com/QVRQ6aYBuP

      为后处理堆栈实现自定义效果。 https://t.co/SVNCptnKgn pic.twitter.com/QVRQ6aYBuP

      — Keijiro Takahashi (@_kzr) March 21, 2018

      -高桥敬治郎(@_kzr) 2018年3月21日

      Added a few stylization effects. https://t.co/SVNCptnKgn pic.twitter.com/PDRshGggXX

      添加了一些样式化效果。 https://t.co/SVNCptnKgn pic.twitter.com/PDRshGggXX

      — Keijiro Takahashi (@_kzr) March 21, 2018

      -高桥敬治郎(@_kzr) 2018年3月21日

      与Cinemachine和时间线一起使用 (Using it with Cinemachine and Timeline)

      PostFx v2 is tightly integrated with other part of the Editor such as Cinemachine, with a Cinemachine Post Processing Component. Both of these can be added to Timeline allowing Artists and Designers full creative control. You can see examples on our YouTube channel and via our Learn site.

      PostFx v2通过Cinemachine后处理组件与编辑器的其他部分(如Cinemachine)紧密集成。 两者都可以添加到时间轴中,以允许艺术家和设计师进行完全的创作控制。 您可以在我们的YouTube频道和“ 学习”网站上看到示例。

      在手机上运行 (Running on Mobile)

      Running Post Processing on mobile isn’t an easy feat and certain effects, such as Ambient Occlusion are just far too expensive to run on even the most high-end mobile platform.

      在移动设备上运行后期处理并不是一件容易的事,某些效果(例如环境光遮蔽)太昂贵了,甚至无法在最高端的移动平台上运行。

      For some effects, such as Anti-aliasing, Bloom and Chromatic Aberration, we’ve created ‘fast mode’, boosting performance by reducing quality. We would also suggest using Low Definition Range for Color Grading and reducing the use of other effects as much as possible. We’re working on even more specific optimizations for mobile which will come in the future.

      对于某些效果,例如抗锯齿,光晕和色差,我们创建了“快速模式”,通过降低画质来提高性能。 我们还建议使用低清晰度范围进行颜色分级,并尽可能减少其他效果的使用。 我们正在为将来的移动设备进行更具体的优化。

      结论 (Conclusion)

      PostFx v2 enables you to easily create and fine-tune high-quality visuals for dramatic and realistic effect. Volume blending makes it easier to switch between, override and blend between different in-built or custom effects. You can find a more extensive guide on our Post-processing wiki.

      PostFx v2使您可以轻松创建和微调高质量的视觉效果,从而获得逼真的效果。 音量混合使您更容易在不同的内置或自定义效果之间进行切换,覆盖和混合。 您可以在我们的后期处理Wiki上找到更详尽的指南

      It’s now available via package manager in 2018.1 or on GitHub if you’re still using 2017.x. We’ll continue to update the package on both channels.

      现在可以通过2018.1中的包管理器或如果仍在使用2017.x在GitHub上使用它。 我们将继续在两个渠道上更新软件包。

      If you still haven’t tried 2018.1, then now’s the time to jump on board!

      如果您还没有尝试过2018.1 ,那么现在是时候开始尝试了!

      Keep on creating.

      继续创作。

      翻译自: https://blogs.unity3d.com/2018/06/11/postfx-v2-amazing-visuals-upgraded/

      评论
      添加红包

      请填写红包祝福语或标题

      红包个数最小为10个

      红包金额最低5元

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

      抵扣说明:

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

      余额充值