轻量级渲染管线_轻量级渲染管道的发展方式

轻量级渲染管线_轻量级渲染管道的发展方式

轻量级渲染管线

We have renamed the Lightweight Render Pipeline in 2019.3. It’s now the Universal Render Pipeline, a powerful solution that delivers beautiful graphics and performance while scaling to a wide range of platforms. The Universal Render Pipeline supports the latest artist tools, and it’s suitable for 2D, 3D, virtual reality (VR), and augmented reality (AR) projects.

我们已在2019.3中重命名了轻量级渲染管道。 现在是Universal Render Pipeline,这是一个功能强大的解决方案,可提供精美的图形和性能,同时可扩展到各种平台。 Universal Render Pipeline支持最新的美术师工具,适用于2D,3D,虚拟现实(VR)和增强现实(AR)项目。

The Lightweight Render Pipeline (LWRP) was designed to be a fast, scalable pipeline enabling high-quality graphics across all mobile devices supported by Unity. Over the last year, this Scriptable Render Pipeline has become production-ready, and we have continued to extend its features, performance, and platform support. 

轻量级渲染管线(LWRP)设计为快速,可扩展的管线,可在Unity支持的所有移动设备上实现高质量的图形。 在过去的一年中,此可编写脚本的渲染管道已投入生产,并且我们继续扩展其功能,性能和平台支持。

We wanted the render pipeline to have broad applications with universal benefits. It is now a powerful solution that delivers beauty and performance while scaling to a wide range of platforms. Whether you’re building 2D, 3D, VR, or AR projects, if you want to develop once and deploy everywhere, this is the rendering technology to use. In 2019.3, the LWRP has evolved into the Universal Render Pipeline. 

我们希望渲染管线具有广泛的应用范围并具有普遍的好处。 现在,它是一个功能强大的解决方案,可在扩展到各种平台的同时提供美观和性能。 无论您要构建2D,3D,VR还是AR项目,如果要一次开发并部署到任何地方,这就是要使用的渲染技术。 在2019.3中,LWRP已演变为通用渲染管线。

支持平台 (Platforms supported)

The platform reach of the Universal Render Pipeline continues to grow.

Universal Render Pipeline的平台范围不断扩大。

使用通用渲染管道的好处 (Benefits of using the Universal Render Pipeline)

  • Production-ready now

    现已投入生产
  • Develop once and deploy on any platform that Unity runs

    一次开发并部署在Unity运行的任何平台上
  • Ideal for making all types of projects (2D, 3D, XR)

    适用于制作所有类型的项目(2D,3D,XR)
  • Tools designed for artists (Visual Effect Graph, Shader Graph, Render Passes)

    专为艺术家设计的工具(视觉效果图,明暗器图,渲染通道)
  • Growing to become the default rendering option for Unity projects

    逐渐成为Unity项目的默认渲染选项
  • Supported in 2019.4 LTS

    在2019.4 LTS中受支持

从LWRP升级需要了解的内容 (What you need to know about upgrading from LWRP)

The Universal Render Pipeline is a continuation of the LWRP, just with a new name. For creators, the transition from LWRP to Universal Render Pipeline should be relatively seamless. Projects that currently use the LWRP will upgrade to Universal Render Pipeline with very little intervention. Custom rendering effects and shaders written in LWRP will automatically upgrade to Universal Render Pipeline. You will have to manually upgrade shader paths only if you are using Shader.Find or UsePass in your custom shaders.

通用渲染管道是LWRP的延续,只是有一个新名称。 对于创作者而言,从LWRP过渡到Universal Render Pipeline应该相对无缝。 当前使用LWRP的项目将只需很少的干预即可升级到Universal Render Pipeline。 用LWRP编写的自定义渲染效果和着色器将自动升级到Universal Render Pipeline。 仅在自定义着色器中使用Shader.Find或UsePass时,才必须手动升级着色器路径。

When upgrading to Universal Render Pipeline, you will also have to upgrade post-processing effects. Post-processing is now integrated directly into the pipeline; you do not need a separate package. We’ve improved the user experience, and it is more performant than PPv2. However, the post-processing does not currently support custom effects; we plan to add this support.

升级到Universal Render Pipeline时,还必须升级后处理效果。 现在,后处理已直接集成到 管道中; 您不需要单独的包装。 我们改善了用户体验,它的性能比PPv2高。 但是,后处理当前不支持自定义效果。 我们计划添加此支持。

In the Universal Render Pipeline, post-processing features include Anti-aliasing, Depth of Field, Motion Blur, Panini projection, Bloom, Lens Distortion, Chromatic Aberration, Color Grading and Tonemapping, Vignette, Film Grain, and 8-bit Dithering.

在Universal Render Pipeline中,后处理功能包括抗锯齿,景深,运动模糊,Panini投影,Bloom,镜头失真,色差,颜色分级和色调映射,晕影,胶片颗粒和8位抖动。

轻量级渲染管线_轻量级渲染管道的发展方式

Some Universal Render Pipeline post-processing effects

某些通用渲染管线后处理效果

Stay tuned for a detailed guide to upgrading the LWRP to URP. 

请继续关注 将LWRP升级到URP 的详细 指南

为什么要从内置渲染管道升级 (Why you should upgrade from the built-in render pipeline)

通用渲染管线可扩展 (Universal Render Pipeline is extensible)

Unity’s built-in render pipeline allowed developers to choose between forward and deferred rendering paths. Extensibility was achieved by injecting command buffers into specific events in the pipeline. However, it was not possible to add custom rendering strategies, and extending the existing ones was limited to a few injection points. 

Unity的内置渲染管道允许开发人员在正向渲染路径和延迟渲染路径之间进行选择。 通过将命令缓冲区注入到管道中的特定事件中来实现可扩展性。 但是,无法添加自定义渲染策略,并且扩展现有策略仅限于几个注入点。

Universal Render Pipeline increases extensibility by introducing the concept of renderers. A renderer implements a set of features and lighting strategy. 

通用渲染管线通过引入渲染器的概念来提高可扩展性。 一个 渲染器 实现了一套功能和照明战略。

In 2019.3, Universal Render Pipeline comes with a forward renderer that shades all lights in a single pass and a 2D renderer that supports multiple types or real-time lights. An optimized deferred renderer is coming soon. 

在2019.3中,Universal Render Pipeline附带了一个前向渲染器,该渲染器可一次性遮挡所有灯光,而2D渲染器则支持多种类型或实时灯光。 经过优化的延迟渲染器即将推出。

When setting up a project, developers can now declare the list of renderers in the pipeline asset so that each camera can use a renderer from that list.

设置项目时,开发人员现在可以在管道资产中声明渲染器列表,以便每个摄像机都可以使用该列表中的渲染器。

轻量级渲染管线_轻量级渲染管道的发展方式

On the right: Pipeline asset contains list of renderers. On the left: Select a renderer for the camera to use.

在右侧:管道资产包含渲染器列表。 在左侧:选择要用于相机的渲染器。

Developers can create their own renderers to extend the pipeline with additional rendering strategies such as Tile/Cluster-based rendering. By implementing a custom renderer for Universal Render Pipeline, instead of working on a custom rendering pipeline from scratch, the Universal Render Pipeline handles a lot of rendering boilerplate for you. Once a renderer is implemented, it’s all plug and play.

开发人员可以创建自己的渲染器,以通过其他渲染策略(例如基于Tile / Cluster的渲染)扩展管道。 通过为Universal Render Pipeline实现自定义渲染器,Universal Render Pipeline无需从头开始处理自定义渲染管道,而是为您处理了许多渲染样板。 实施渲染器后,即插即用。

You can also extend renderers with additional renderer features. These features are scriptable objects that contain resources and logic to inject render passes in a renderer. Each feature can inject one or multiple render passes at specific events in the renderer. The Universal Render Pipeline contains a general purpose RenderObjects feature that provides a lot of customization. You can add it to a renderer by adding it to the “Renderer Features” list in the renderer. Users can also create custom features. Universal Render Pipeline provides a script template to create features available at Asset -> Create -> Rendering -> Universal Render Pipeline -> Renderer Feature. If you want to know more about extending the Universal Render Pipeline, you can follow this presentation and check out these custom rendering examples.

您还可以使用其他 渲染器功能 扩展渲染 。 这些功能是可编写脚本的对象,其中包含资源和逻辑以将 渲染过程 注入 渲染 器中。 每个功能可以在渲染器中的特定事件处注入一个或多个渲染通道。 通用渲染管道包含通用的RenderObjects功能,该功能提供了许多自定义功能。 您可以通过将其添加到渲染器的“渲染器功能”列表中,将其添加到渲染器。 用户还可以创建自定义功能。 Universal Render Pipeline提供了一个脚本模板,用于创建在 Asset-> Create-> Rendering-> Universal Render Pipeline-> Renderer Feature中 可用的 功能 。 如果您想了解有关扩展通用渲染管线的更多信息,可以按照此 演示文稿 并查看这些 自定义渲染示例

轻量级渲染管线_轻量级渲染管道的发展方式

On the left: FPSSetup is a Forward Renderer with additional renderer features. On the right: By clicking on the “+” icon you can add features to a renderer.

在左侧:FPSSetup是具有其他渲染器功能的正向渲染器。 右侧:通过单击“ +”图标,可以将功能添加到渲染器。

通用渲染管线可扩展性 (Universal Render Pipeline extensibility in action)

The development team behind Crest Ocean, which is available on the Asset Store, was able to extend the Universal Render Pipeline to create realistic oceans. Effects like this were hard to achieve before, but with explicit hooks, it’s now possible to extend rendering significantly without having to write a renderer from scratch.

可在Asset Store上购买的 Crest Ocean背后的开发团队 能够扩展Universal Render Pipeline以创建逼真的海洋。 这样的效果以前很难实现,但是有了显式的钩子,现在可以显着扩展渲染,而不必从头开始编写渲染器。

通用渲染管线的性能优势 (Performance benefits of the Universal Render Pipeline)

Universal Render Pipeline is a leaner rendering solution than our previous built-in render pipeline, while also delivering improved quality. When upgrading a project from the built-in render pipeline to the Universal Render Pipeline, you should expect similar or improved performance. 

与我们以前的内置渲染管道相比,Universal Render Pipeline是一种更精简的渲染解决方案,同时还提供了更高的质量。 将项目从内置渲染管道升级到通用渲染管道时,您应该期望获得类似或更高的性能。

We converted the Polygon Farm asset pack from the built-in render pipeline to Universal Render Pipeline and compared visuals and performance on an iPhone 6S. We tweaked both projects to make sure the quality and rendering settings matched. By using Universal Render Pipeline, we were able to achieve higher frame rates without reducing the visual quality.

我们将 Polygon Farm资产包 从内置渲染管道转换为通用渲染管道,并比较了iPhone 6S的视觉效果和性能。 我们调整了两个项目,以确保质量和渲染设置匹配。 通过使用通用渲染管线,我们能够在不降低视觉质量的情况下获得更高的帧速率。

轻量级渲染管线_轻量级渲染管道的发展方式

Universal Render Pipeline

通用渲染管线

轻量级渲染管线_轻量级渲染管道的发展方式

Universal Render Pipeline

通用渲染管线

轻量级渲染管线_轻量级渲染管道的发展方式

Built-in render pipeline

内置渲染管道

轻量级渲染管线_轻量级渲染管道的发展方式

*Difference in draw calls is due to the fact that Universal Render Pipeline doesn’t render additional draw calls for each additional light. **Difference in batches is due to the fact that Universal Render Pipeline batches per shader while Built-in batches per material.

*绘制调用中的差异是由于Universal Render Pipeline不会为每个额外的灯光渲染附加的绘制调用。 **批次之间的差异是由于每个着色器的通用渲染管线批次为每一种材质而内置批次为这一事实。

If you convert a project and don’t get a performance improvement, the first thing to check is whether the quality settings between the two pipelines match. The Universal Render Pipeline controls all aspects of quality in the pipeline asset. The pipeline now supports setting a pipeline asset per quality setting. This way, you can scale quality between different platforms while centralizing all quality settings in the pipeline asset. This differs from the built-in renderer where the settings are scattered across Quality Settings and Graphics Tiers. When you convert a project to Universal Render Pipeline, the settings from your original project don’t get automatically upgraded. You must manually upgrade the quality settings.

如果您转换项目而没有提高性能,则首先要检查的是两个管道之间的质量设置是否匹配。 通用渲染管道控制着管道资产质量的各个方面。 管道现在支持按质量设置设置管道资产。 这样,您可以在不同平台之间扩展质量,同时集中管理管道资产中的所有质量设置。 这与内置渲染器不同,后者的设置分散在“质量设置”和“图形层”中。 将项目转换为Universal Render Pipeline时,原始项目中的设置不会自动升级。 您必须手动升级质量设置。

If you have a case where the converted project matches quality, but you are experiencing worse performance with the Universal Render Pipeline, please submit a bug report.

如果转换后的项目符合质量要求,但Universal Render Pipeline的性能却较差,请提交 错误报告

通用渲染管线的未来 (The future of the Universal Render Pipeline)

We’re committed to evolving the Universal Render Pipeline. We want you to take advantage of features like VFX Graph, Shader Graph, Custom Render Passes, and the latest Post-Processing. The Universal Render Pipeline lets you develop once and deploy to a wide range of platforms while achieving the same or better quality and performance. In 2020, we’re working towards feature parity with the Built-in renderer, including deferred renderer and camera stacking. You’ll be able to use the same set of features in your project, but not necessarily the same way. 

我们致力于发展通用渲染管线。 我们希望您利用VFX Graph,Shader Graph,Custom Render Pass和最新的后期处理等功能。 Universal Render Pipeline使您可以一次开发并部署到各种平台,同时达到相同或更好的质量和性能。 在2020年,我们正在努力与内置渲染器实现功能均等,包括延迟渲染器和相机堆叠。 您将能够在项目中使用相同的功能集,但不必以相同的方式使用。

While developing the Scriptable Render Pipeline, we took the time to redesign our rendering system. Some previous features will remain deprecated as we have developed better alternatives. Some examples of features that changed in Universal Render Pipeline are the rendering callbacks, grabpass, and camera stacking. Besides evolving features, we are continually improving performance. Given the same quality settings, Universal Render Pipeline has equal or more performance than our previous rendering solution in most cases. Where that’s not the case, we’re treating those situations as regressions and processing them as bugs.

在开发可编写脚本的渲染管道时,我们花了一些时间重新设计渲染系统。 随着我们开发出更好的替代方案,某些先前的功能将被弃用。 Universal Render Pipeline中更改的某些功能示例包括渲染回调,抓取传递和摄影机堆叠。 除了不断发展的功能,我们还在不断提高性能。 在相同的质量设置下,在大多数情况下,Universal Render Pipeline具有与我们以前的渲染解决方案相同或更高的性能。 如果不是这种情况,我们会将这些情况视为回归并将其视为错误。

In 2021, we want to ensure that performance for all supported platforms is maintained while we grow the Universal Render Pipeline with features for high-end mobile and console platforms.

在2021年,我们希望确保在支持具有高端移动和控制台平台功能的Universal Render Pipeline的同时保持所有受支持平台的性能。

通用渲染管线和高清渲染管线 (Universal Render Pipeline and High Definition Render Pipeline)

The Universal Render Pipeline does not replace or encompass the High Definition Render Pipeline (HDRP). The Universal Render Pipeline aims to be the future default render pipeline for Unity. Develop once, deploy everywhere. It is more flexible, is more extensible and delivers higher performance than the built-in render pipeline, and has improved graphics quality.

通用渲染管道不替代或包含 高清渲染管道 (HDRP)。 通用渲染管线 旨在成为Unity未来的默认渲染管线。 一次开发,随处部署。 它比内置渲染管道更灵活,更可扩展并提供更高的性能,并提高了图形质量。

HDRP delivers state-of-the-art graphics. HDRP is the best to use if your goal is more targeted – pushing graphics on high-end hardware, delivering performant powerful high-fidelity visuals. 

HDRP提供最先进的图形。 如果您的目标更有针对性,则HDRP是最佳使用方式-在高端硬件上推送图形,提供高性能的高保真视觉效果。

You should choose the render pipeline to use for a project according to the features and platform requirements of your project.

您应根据项目的功能和平台要求选择要用于项目的渲染管道。

开始使用通用渲染管道 (Start using the Universal Render Pipeline)

You can start taking advantage of all the production-ready features and performance benefits today. Upgrade your projects using the upgrade tooling or start a new project using our Universal template from the Unity Hub.

您现在就可以开始利用所有生产就绪的功能和性能优势。 使用升级工具升级项目,或者使用Unity Hub中的通用模板开始新项目。

Please send us feedback in the Universal Render Pipeline forum!

请在“通用渲染管线” 论坛中 向我们发送反馈

翻译自: https://blogs.unity3d.com/2019/09/20/how-the-lightweight-render-pipeline-is-evolving/

轻量级渲染管线