Что такое render pipeline unity

Unity’s Rendering Pipeline

Shaders define both how an object looks by itself (its material properties) and how it reacts to the light. Because lighting calculations must be built into the shader, and there are many possible light & shadow types, writing quality shaders that “just work” would be an involved task. To make it easier, Unity has Surface Shaders, where all the lighting, shadowing, lightmapping, forward vs. deferred rendering things are taken care of automatically.

This document describes the pecularities of Unity’s lighting & rendering pipeline and what happens behind the scenes of Surface Shaders.

Rendering Paths

How lighting is applied and which Passes of the shader are used depends on which Rendering Path is used. Each pass in a shader communicates its lighting type via Pass Tags.

Forward Rendering path

ForwardBase pass renders ambient, lightmaps, main directional light and not important (vertex/SH) lights at once. ForwardAdd pass is used for any additive per-pixel lights; one invocation per object illuminated by such light is done. See Forward Rendering for details.

If forward rendering is used, but a shader does not have forward-suitable passes (i.e. neither ForwardBase nor ForwardAdd pass types are present), then that object is rendered just like it would in Vertex Lit path, see below.

Deferred Shading path

Deferred pass renders all information needed for lighting (in built-in shaders: diffuse color, specular color, smoothness, world space normal, emission). It also adds lightmaps, reflection probes and ambient lighting into the emission channel. See Deferred Shading for details.

Legacy Deferred Lighting path

PrepassBase pass renders normals & specular exponent; PrepassFinal pass renders final color by combining textures, lighting & emissive material properties. All regular in-scene lighting is done separately in screen-space. See Deferred Lighting for details.

Legacy Vertex Lit Rendering path

Since vertex lighting is most often used on platforms that do not support programmable shaders, Unity can’t create multiple shader variants internally to handle lightmapped vs. non-lightmapped cases. So to handle lightmapped and non-lightmapped objects, multiple passes have to be written explicitly.

Источник

Графика высокого разрешения воплотит ваши творческие планы

High Definition Render Pipeline (HDRP) обеспечивает непревзойденную производительность графического процессора. Вам доступен любой стиль, от фотореализма до стилизованной графики.

Что такое render pipeline unity. Смотреть фото Что такое render pipeline unity. Смотреть картинку Что такое render pipeline unity. Картинка про Что такое render pipeline unity. Фото Что такое render pipeline unity

Unity предлагает два готовых процесса: High-Definition Render Pipeline (HDRP) и Universal Render Pipeline. Каждый из них имеет свою область применения и системные требования.

С помощью SRP можно управлять и настраивать рендеринг посредством скриптов на C#. Это позволяет не только вносить небольшие изменения, но и полностью перерабатывать и настраивать процесс рендеринга в соответствии с вашими требованиями.

Имея в арсенале универсальные средства физического рендеринга и бескомпромиссную эффективность использования графического процессора, HDRP создан специально для амбициозных проектов с графикой высокого разрешения.

HDRP предназначен для высокопроизводительных платформ, включая ПК, Xbox и PlayStation. Он позволяет обеспечить реалистичную графику в сложных сценариях. В HDRP используются технология Compute Shader и возможности современных графических процессоров.

HDRP можно использовать в разработке игр высокого разрешения, автомобильных демонстраций, архитектурных и других приложений, где приоритет отдается качеству графики. HDRP поддерживает как упреждающий, так и отложенный рендеринг, и использует физическое освещение и материалы.

HDRP — это огромный технологический скачок в области реализма графики, а также повышенное удобство использования.

Процесс создан специально для игр на современных консолях и ПК.

Настраиваемый стек постобработки позволяет создавать эффекты, автоматически интегрируемые в систему объема. Custom Render Pass позволяет добавлять шейдеры и код на C# в определенные моменты цикла рендеринга для отрисовки объектов, выполнения полноэкранных проходов и считывания данных из буфера камеры, включая глубину, цвет и нормали.

Look Dev представляет собой инструмент освещения, который позволяет проверять и сравнивать ассеты с помощью их визуализации, а также проверять правильность их работы при разных настройках освещения. Проверить ассет можно мгновенно, ведь он отображается в инструменте именно так, как будет отображаться в приложении.

Благодаря параметрам масштабирования вы можете создавать массивы HDRP-ассетов для проекта, каждый из которых будет иметь разные настройки качества графики. Это значит, что пользователи вашего приложения смогут выбрать уровень качества графики, соответствующий параметрам их оборудования.

Unity 2019.3 содержит улучшения алгоритмов Depth of Field, Screen Space Ambient Occlusion, системы теней (упрощенной), системы программирования освещения, а также интерфейса работы с освещением. Мы добавили поддержку DiscLight (только для запекания), оттенков полутеней, а также документацию к функциям API и графики.

Что такое render pipeline unity. Смотреть фото Что такое render pipeline unity. Смотреть картинку Что такое render pipeline unity. Картинка про Что такое render pipeline unity. Фото Что такое render pipeline unity

Студия использовала стек постобработки, чтобы добиться кинематографического качества графики и физически корректного поведения камер, и все это — с рендерингом в реальном времени.

В демофильме также показаны цифровые модели людей с отрисовкой в реальном времени. В проекте использовались данные, полученные с помощью 3D- и 4D-сканирования для захвата текстур и движений. Создатели разработали полностью готовый процесс, от сбора данных до рендеринга в реальном времени в Unity, используя услуги различных поставщиков. Для отрисовки использовались все шейдеры, необходимые для достижения желаемого качества графики с применением HDRP.

Что такое render pipeline unity. Смотреть фото Что такое render pipeline unity. Смотреть картинку Что такое render pipeline unity. Картинка про Что такое render pipeline unity. Фото Что такое render pipeline unity

Приключенческая игра с сильным сюжетом и множеством возможностей исследовать игровой мир. Инновационные технологии покадровой анимации воплощены с помощью различных инструментов Unity, в том числе фотограмметрии и HDRP, а сочетание Timeline и Cinemachine открыло для студии возможности нелинейного монтажа

Что такое render pipeline unity. Смотреть фото Что такое render pipeline unity. Смотреть картинку Что такое render pipeline unity. Картинка про Что такое render pipeline unity. Фото Что такое render pipeline unity

Разработчики из Multiverse создали игру с богатой графикой и инопланетными, но не менее живыми окружениями. Такое качество было достигнуто благодаря использованию множества эффектов HDRP, например, настройки экспозиции, тонокоррекции, подповерхностного рассеивания, объемного освещения, цветокоррекции и искажения линз. В результате получился впечатляюще красивый мир, который демонстрирует стабильную производительность на уровне 60 кадров в секунду даже во время напряженных схваток с толпами врагов.

Источник

Начало работы с High Definition Render Pipeline (HDRP) для игр

Что вы узнаете на этой странице: информацию об оценке целесообразности High Definition Render Pipeline (HDRP) и сведения о том, как начать использовать его в разработке. Материал подготовлен на основе доклада Дженнифер С. Рож-Десландес, представленного на Unite Copenhagen 2019.

Among the most frequent questions Unity engineers get from creators are “What is HDRP?” and “How can I use it in my project?” So we put together this list of considerations to help you understand how you can use the High Definition Render Pipeline (HDRP) in your projects to get the most out of it.

Let’s start by answering a few questions to assess if your project is ready for HDRP:

The first question you need to ask yourself is if you are shipping on a supported platform. If you’re planning to ship on consoles such as Xbox One and PlayStation 4, Windows (DirectX 11, DirectX 12 and Vulkan), Mac (Metal), and VR headsets (PlayStation VR, Oculus Rift, OpenVR, Windows Mixed Reality), then we’ve got you covered. There’s currently very little support for Linux, and no support for Nintendo Switch, OpenGL, and mobile platforms.

HDRP will be out of preview with the Unity 2019.3 release. We strongly recommend you use HDRP with that version onwards; with Unity 2019.3 Long-Term Support (LTS) and above, you will have full support. If you use HDRP with any previous Unity versions, you’ll have to do all of the maintenance yourself.

Working with HDRP requires a lot of upgrade and maintenance. To move from the Built-in rendering pipeline or the Universal Render Pipeline, you’ll also have to ramp up on technical knowledge for HDRP. Make sure that you and your team allocate some time to learn this tech.

HDRP is grounded in physically based rendering and offers a unified lighting pipeline. Also, it comes with several tools for your artistic needs: Visual Effect Graph, Look Dev, and post-processes. For characters and environment, HDRP offers skin, hair, and eye shaders, as well as subsurface scattering and some support for terrain.

If you’re still deciding what render pipeline to use, here are a few things to consider. HDRP is supported with Unity 2019 LTS and above, and it comes with its own high-definition post-processing stack. It also comes with ray tracing support, VFX Graph support, Shader Graph support, and state-of-the-art graphics features.

If your project contains complex scenes, HDRP will scale better than with the built-in rendering pipeline. However, if you’re planning to ship on both mobile and consoles, HDRP might not be the right tech for you.

Одно из направлений HDRP — единое и логичное освещение. Другое направление — производительность и, разумеется, современные технологии.

Единое и логичное освещение

HDRP — это процесс физического рендеринга, что позволяет вам использовать параметры реального мира для разработки сцен. Например, световой поток здесь измеряется в люменах или в люксах.

Теперь художники могут разрабатывать ассеты независимо от контекста. При изменении контекста графические элементы проекта не потеряют визуальную однородность.

Производительность с самого начала

Функции HDRP способны обеспечивать высокое качество на всех поддерживаемых платформах. Мы хотим, чтобы у вас была возможность реализовать творческие идеи без оглядки на производительность.

Самые современные технологии

HDRP использует технологии, ставшие стандартом в игровой индустрии: физический рендеринг, физические единицы измерения свойств света, физические компоненты и дружелюбный инструментарий.

Чтобы использовать HDRP в проекте, мы рекомендуем выполнить следующее.

Все созданные в Unity демонстрации разработаны с использованием тех же технологий, которые вы будете использовать после загрузки пакета HDRP. Вот два проекта для изучения: Fontainebleau и Spaceship. Обе демонстрации отлично документированы, по ним подготовлены статьи, объясняющие процесс разработки.

Каждый выпуск пакета HDRP сопровождается примерами.

Если вы готовы приступить, то вот как можно создать проект с поддержкой HDRP в Unity: откройте Unity Hub, создайте новый проект, выберите шаблон High Definition Render Pipleline и готово! Вы сможете начать свои эксперименты, как только откроется Editor.

Если что-то идет не так, то Render Pipeline Wizard поможет вам выявить проблемы вашего проекта. Он находится в меню Window > Analysis > Render Pipeline Wizard.

Что такое render pipeline unity. Смотреть фото Что такое render pipeline unity. Смотреть картинку Что такое render pipeline unity. Картинка про Что такое render pipeline unity. Фото Что такое render pipeline unity

Если вы уже работаете над проектом с использованием встроенного процесса рендеринга и хотите перевести проекта на HDRP, мы рекомендуем следующее.

Для начала убедитесь, что вы используете нужную версию Unity. Принимая решение, сверяйтесь с документацией. Откройте Package Manager и выберите пакет High Definition RP, чтобы увидеть его версию. Ниже есть несколько ссылок, и самые важные из них — документация и список изменений.

Обратите внимание, что крупные выпуски пакета выходят вместе с новыми совместимыми выпусками Unity. Эту информацию можно найти в менеджере пакетов. Например, версия HDRP 5.0.1 совместима с Unity 2019.1. Поняв, какой выпуск Unity и соответствующий ей пакет HDRP вам подходит лучше, вы можете приступать к обновлению вашего проекта.

Что такое render pipeline unity. Смотреть фото Что такое render pipeline unity. Смотреть картинку Что такое render pipeline unity. Картинка про Что такое render pipeline unity. Фото Что такое render pipeline unity

Во-первых, нужно удалить текущий используемый стек постобработки, поскольку в HDRP есть собственный стек. Для этого выберите пакет Post Processing в менеджере пакетов и нажмите кнопку Remove.

После этого нужно проверить, используется ли в вашем проекте линейное цветовое пространство. Откройте настройки по адресу Edit > Project Settings > выберите пункт Player > перейдите в раздел Other Settings, чтобы увидеть настройки цветового пространства (Color Space Settings). Измените значение Gamma на Linear.

После этого загрузите пакет HDRP. В Package Manager выберите пакет High Definition RP и нажмите на кнопку Install. Обновите пакет до последней версии, актуальной для вашего выпуска Unity.

Для использования HDRP в проекте нужно использовать High-Definition Render Pipeline Asset. В окне Project щелкните правой кнопкой мыши в папке Assets и выберите пункт Create > Rendering, а затем — High Definition Render Pipeline Asset. Назначьте его проекту: выберите Edit > Project Settings > Graphics, а затем High Definition Render Pipeline Asset.

Что такое render pipeline unity. Смотреть фото Что такое render pipeline unity. Смотреть картинку Что такое render pipeline unity. Картинка про Что такое render pipeline unity. Фото Что такое render pipeline unity

Если что-то пошло не так, то возможно дело в том, что ваши материалы несовместимы с HDRP. Используйте Render Pipeline Wizard чтобы проверить настройки, материалы и освещение на совместимость с HDRP.

Render Pipeline Wizard (Window > Analysis > Render Pipeline Wizard) формирует полный список потенциальных проблем проекта. Вы можете решать каждую проблему по отдельности или исправить все разом, нажав на кнопку Fix All.

Что такое render pipeline unity. Смотреть фото Что такое render pipeline unity. Смотреть картинку Что такое render pipeline unity. Картинка про Что такое render pipeline unity. Фото Что такое render pipeline unity

После устранения неполадок приступайте к конвертированию материалов. Для этого выберите пункт Edit > Render Pipeline > Upgrade Project Materials to High Definition Materials; все шейдеры Standard Lit/Unlit в проекте будут преобразованы в материалы HDRP Lit/Unlit.

После этого измените настройки освещения, выбрав физически точные единицы. После конвертации материалов и настройки освещения вам нужно будет заново настроить постобработку.

Постобработка уже включена для вашего проекта по умолчанию. Убедиться в этом можно по адресу Project Settings > HDRP Default Settings > Volume Components. Например, эффекты Tonemapping и Bloom включаются по умолчанию, но это можно изменить в разделе Volume Components. В этом разделе вы также можете создать собственный объем для сцены и добавить новый профиль.

Проверьте настройки HDRP. Их можно найти в разных местах:

Настроив проект, можно переходить к более тонким параметрам.

Есть несколько способов настройки процесса рендеринга в пакете HDRP.

Исходный код HDRP доступен GitHub — вы можете менять его в соответствии со своими потребностями. Но мы настоятельно рекомендуем вам создать ответвление и регулярно интегрировать все исправления от Unity.

Если вы хотите узнать больше о том, как начать работу с High Definition RP в проекте, обратите внимание на обзорное руководство по HDRP, ознакомьтесь с нашей недавней статьей в блоге и присоединяйтесь к обсуждениям на форуме.

Источник

Scriptable Render Pipeline

The SRP gives you more granularity and customization options than the built-in Unity render pipeline. And you can use one of the pre-built SRPs to target your specific needs.

Using an SRP is different from using the built-in Unity render pipeline. For example, the pre-built SRPs come with a new Shader A small script that contains the mathematical calculations and algorithms for calculating the Color of each pixel rendered, based on the lighting input and the Material configuration. More info
See in Glossary library. This is because the Lit shaders from the built-in render pipeline, and custom Lit shaders, do not work with SRPs. You can upgrade the built-in Lit shaders to both LWRP and HDRP.

Note: This is a preview feature and is subject to change. Any scripts that use this feature may need updating in a future release. Do not rely on this feature for full-scale production until it is no longer in preview.

Pre-built SRPs

Unity has built two Scriptable Render Pipelines that use the SRP framework: the High Definition Render Pipeline (HDRP) and the Lightweight Render Pipeline (LWRP). Each render pipeline targets a specific set of use-case scenarios and hardware needs. The pre-built render pipelines are available as templates for new Projects.

Both of these render pipelines are delivered as packages via the Package Manager window in Unity. They both include the Shader Graph and Post-processing packages.

Note: LWRP and HDRP are not compatible with each other, and neither is compatible with the built-in Render Pipeline. Before you start development, you must decide which render pipeline to use in your Project.

High Definition Render Pipeline

The HDRP targets high-end hardware like consoles and PCs. With the HDRP, you’re able to achieve realistic graphics in demanding scenarios. The HDRP uses Compute Shader technology and therefore requires compatible GPU hardware.

Use HDRP for AAA quality games, automotive demos, architectural applications and anything that favors high-fidelity graphics over performance. HDRP uses physically-based Lighting and Materials, and supports both Forward and Deferred rendering.

The High Definition Render Pipeline is provided in a single template.

For more information on HDRP, see the HDRP overview on the SRP GitHub Wiki.

Lightweight Render Pipeline

You can use the LWRP across a wide range of hardware. The technology is scalable to mobile platforms, and you can also use it for higher-end consoles and PCs. You’re able to achieve quick rendering at a high quality. LWRP uses simplified, physically based Lighting and Materials.

The Lightweight Render Pipeline is available via two templates: LWRP and LWRP-VR. The LWRP-VR comes with pre-enabled settings specifically for VR.

To see the latest documentation for LWRP, go to Package Manager in Unity, navigate to the Lightweight Render Pipeline package, and click View Documentation.

Setting up a Scriptable Render Pipeline

There are several different ways to install SRP, HDRP and LWRP: If you want to use one of the pre-built SRPs in a new or current Project, continue reading this section. If you are an advanced user, and you want to modify the SRP scripts to directly, see Creating a custom SRP.

Using a pre-built SRP with a new Project

If you want to use the HDRP or the LWRP in a new Project, and you don’t need to customise the render pipeline, you can create a new Project using Templates.

To create a Project using Templates:

For more information on using Templates, see Project Templates.

Installing the latest SRP into an existing Project

You can download and install the latest version of HDRP, LWRP or SRP to your existing Project via the Package Manager system.

Switching to an SRP from an existing Project consumes a lot of time and resources. HDRP, LWRP and custom SRPs all use custom shaders. They are not compatible with the built-in Unity shaders. You will have to manually change or convert many elements. Instead, consider starting a new Project with your SRP of choice.

To install an SRP into an existing Project:

Configuring and using a pre-built render pipeline

Before you can use either of the pre-built render pipelines, you must create a Render Pipeline Asset Any media or data that can be used in your game or Project. An asset may come from a file created outside of Unity, such as a 3D model, an audio file or an image. You can also create some asset types in Unity, such as an Animator Controller, an Audio Mixer or a Render Texture. More info
See in Glossary and add it to your Project settings. The following sections explain how to create the SRP Asset and how to add it to an HDRP or LWRP.

Creating Scriptable Render Pipeline Assets

To properly use your chosen SRP, you must create a Scriptable Render Pipeline Asset.

The Scriptable Render Pipeline Asset controls the global rendering Quality settings of your Project and creates the rendering pipeline instance. The rendering pipeline instance contains intermediate resources and the render pipeline implementation.

You can create multiple Pipeline Assets to store settings for different platforms or for different testing environments.

To create a Render Pipeline Asset:

Note: HDRP and LWRP are not compatible with each other, because they use different lighting models. Your Project must use one or the other. You can, however, use different Assets with the same render pipeline. This means that you can test different settings using different Assets by swapping between them, instead of changing individual settings.

Configuring and using HDRP

To use HDRP, you must edit your Project’s Player and Graphics settings as follows:

Tip: Always store your High Definition Render Pipeline Asset outside of the Scriptable Render Pipeline folder. This ensures that your HDRP settings are not lost when merging new changes from the SRP GitHub repository.

Configuring and using LWRP

To use the LWRP, you must edit your Project’s Graphics settings as follows:

Tip: Always store your new Lightweight Render Pipeline Asset outside of the Scriptable Render Pipeline folder. This ensures that your Lightweight settings are not lost when merging new changes from the SRP GitHub repository.

Creating a custom SRP

The Scriptable Render Pipelines are available in an open Project on GitHub. You can clone an SRP and make modifications in your local version.

To configure local script files for a new or existing Unity Project:

Create a clone of the SRP repository. Place the clone in the root of the Project directory, next to the Assets folder. For information on cloning repositories, see the GitHub help on Cloning a repository.

In your Project manifest, update dependencies to so that they point to the SRP packages. To read more about Project manifests, see the Package Manager documentation. Here is an example of what your script should look like:

Open your Project in Unity. Your packages are now installed locally. When you open the Project solution in an integrated development environment, you can debug and modify the script directly.

2018–12–12 Page amended with editorial review

Preview of Scriptable Render Pipeline added in 2018.1 NewIn20181

Did you find this page useful? Please give it a rating:

Источник

Scriptable Render Pipeline

An SRP gives you more granularity and customization options than the built-in Unity render pipeline. And you can use one of the pre-built SRPs to target your specific needs.

Using an SRP is different from using the built-in Unity render pipeline. For example, the pre-built SRPs use their own Shader A small script that contains the mathematical calculations and algorithms for calculating the Color of each pixel rendered, based on the lighting input and the Material configuration. More info
See in Glossary library. This is because the Lit shaders from the built-in render pipeline, and custom Lit shaders, do not work with SRPs. You can upgrade the built-in Lit shaders to both LWRP and HDRP.

Unity has built two Scriptable Render Pipelines: the High Definition Render Pipeline (HDRP) and the Lightweight Render Pipeline (LWRP). Each render pipeline targets a specific set of use-case scenarios and hardware needs. The pre-built render pipelines are available as Project Templates.

Both of these render pipelines are delivered as packages via the Package Manager window in Unity. They both include the Shader Graph and Post-processing packages.

Note: HDRP and LWRP are not compatible with each other because they use different lighting models. Your Project must use one or the other. You can, however, use different Assets with the same render pipeline. This means that you can test different settings using different Assets by swapping between them, instead of changing individual settings.

If you are an advanced user, and you want to modify the SRP scripts to directly, see Creating a custom SRP.

Lightweight Render Pipeline (LWRP)

LWRP is available via two templates: LWRP and LWRP-VR. The LWRP-VR comes with pre-enabled VR settings.

For more information, see the LWRP documentation. Tip: You can also access the documentation via the Package Manager in Unity ( the Lightweight Render Pipeline package, and click View Documentation).

High Definition Render Pipeline (HDRP)

HDRP targets high-end hardware like consoles and PCs. With HDRP, you’re able to achieve realistic graphics in demanding scenarios. HDRP uses Compute Shader technology and therefore requires compatible GPU hardware.

Use HDRP for AAA quality games, automotive demos, architectural applications and anything that requires high-fidelity graphics over performance. HDRP uses physically-based Lighting and Materials, and supports both Forward and Deferred rendering.

To start using HDRP, create a Project using the HDRP Template.

For more information, see the HDRP documentation. Tip: You can also access the documentation via the Package Manager in Unity, find the High Definition Render Pipeline package, and click View Documentation.

Setting up LWRP or HDRP

To use LWRP or HDRP, you can either:

Creating a new Project with LWRP or HDRP

If you want to use HDRP or LWRP in a new Project, and you don’t need to customise the render pipeline, you can create a new Project using a Template.

To create a Project using a Template:

For more information on using Templates, see Project Templates.

Converting an existing Project to LWRP or HDRP

You can download and install the latest version of LWRP or HDRP to your existing Project via the Package Manager system.

Switching to LWRP or HDRP from an existing Project consumes a lot of time and resources. LWRP and HDRP use custom shaders. They are not compatible with the built-in Unity shaders. You have to manually change or convert many elements. Instead, consider starting a new Project and using your render pipeline of choice.

To install LWRP or HDRP into an existing Project:

Preparing to use LWRP or HDRP

To create a Render Pipeline Asset for your render pipeline, see either the:

To assign the Render Pipeline Asset to your Project:

Creating a custom SRP

The Scriptable Render Pipelines are available in an open Project on GitHub. You can clone an SRP and make modifications in your local version.

To configure local script files for a new or existing Unity Project:

Create a clone of the SRP repository. Place the clone in the root of the Project directory, next to the Assets folder. For information on cloning repositories, see the GitHub help on Cloning a repository.

In your Project manifest Each Unity Project has a Project manifest, which acts as an entry point for the Package Manager. This file must be available in the

Open your Project in Unity. Your packages are now installed locally. When you open the Project solution in an integrated development environment, you can debug and modify the script directly.

2019–05–06 Page amended with editorial review

Preview of Scriptable Render Pipeline added in 2018.1 NewIn20181

Scriptable Render Pipeline added in 2019.1 NewIn20191

Did you find this page useful? Please give it a rating:

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *