Render pipeline unity что это

UnityTechnologies/ScriptableRenderPipeline

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

This branch is 10863 commits ahead of yaoya:master.

Open a pull request to contribute your changes upstream.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

NOTE: We have migrate reported issues to fogbugz. Please log issues via the in unity bug tracker.

Unity Scriptable Render Pipeline

The Scriptable Render Pipeline (SRP) is a new Unity feature in active development. SRP has been designed to give artists and developers the tools they need to create modern, high-fidelity graphics in Unity. Including a built-in Lightweight Render Pipeline for use on all platforms, and a High Definition Render Pipeline (HDRP) for use on compute shader compatible platforms. These features are available in Unity 2018.1+.

We are committed to an open and transparent development process, and as such you are welcome to take a look around if you are really curious.

Detailed documentation is being added here: Wiki

This feature is currently in preview. Some features may change or be removed before we move to a full release.

How to use the latest version

Note: The Master branch is our current development branch and may not work on the latest publicly available version of Unity. To determine which version of SRP you should use with your version of Unity, go to Package Manager (Window > Package Manager) to see what versions of SRP are available for your version of Unity Editor. Then you can search the Tags tab of the Branch dropdown in the SRP GitHub for that tag number. To use the latest version of the SRP, follow the instructions below:

This repository consists of a folder that should be cloned outside the Assets\ folder of your Unity project. We recommend creating a new project to test SRP. Do not clone this repo into an existing project unless you want to break it, or unless you are updating to a newer version of the SRP repo.

After cloning you will need to edit your project’s packages.json file (in either UnityPackageManager/ or Packages/ ) to point to the SRP submodules you wish to use. See: https://github.com/Unity-Technologies/ScriptableRenderPipeline/blob/master/TestProjects/HDRP_Tests/Packages/manifest.json

This will link your project to the specific version of SRP you have cloned.

You can use the GitHub desktop app to clone the latest version of the SRP repo or you can use GitHub console commands.

To clone the repo using the GitHub Desktop App:

  1. Open the GitHub Desktop App and click Clone a Repository.
  2. Click the URL tab in the Clone a Repository window
  3. Enter the following URL: https://github.com/Unity-Technologies/ScriptableRenderPipeline
  4. Click the Choose… button to navigate to your project’s base folder.
  5. Click the Clone button.

After the repo has been cloned you will need to run the following console commands from the ScriptableRenderPipeline folder:

To download the repo using console commands:

Enter the following commands in your console application of choice:

Scriptable Render Pipeline Assets

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 loop implementation.

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

To create a Render Pipeline Asset:

  1. In the Project window, navigate to a directory outside of the Scriptable Render Pipeline Folder, then right click in the Project window and select Create > Render Pipeline > High Definition or Lightweight > Render Pipeline/Pipeline Asset.
  2. Navigate to Edit > Project Settings > Graphics and add the Render Pipeline Asset you created to the Render Pipeline Settings field to use it in your project.

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

Using the High Definition Render Pipeline (HDRP) or the Lightweight Pipeline

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

  1. Navigate to Edit > Project Settings > Player and set the color space of your project to Linear by selecting Linear from the Color Space dropdown. HDRP does not support Gamma lighting.
  2. In the Project window, navigate to a directory outside of the Scriptable Render Pipeline Folder, then right in click the Project window and select Create > Render Pipeline > High Definition > Render Pipeline.
  3. Navigate to Edit > Project Settings > Graphics and add the High Definition Render Pipeline Asset you created to the Render Pipeline Settings field.

Note: 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 repo.

Using Lightweight Pipeline

To use the Lightweight Pipeline you must edit your project’s Graphics settings as follows:

  1. In the Project window, navigate to a directory outside of the Scriptable Render Pipeline Folder, then right click in the Project window and select Create > Render Pipeline > Lightweight > Pipeline Asset.
  2. Navigate to Edit > Project Settings > Graphics and add the Lightweight Render Pipeline Asset you created to the Render Pipeline Settings field.

Note: Always store your new 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 repo.

Sample Scenes in ScriptableRenderPipelineData

If you want some sample scenes to use with SRP, you can find them at the ScriptableRenderPipelineData GitHub repository.

Clone the repo into your project’s Assets\ folder, likely alongside your ScriptableRenderPipeline clone folder. You can use the same cloning process as described above for the main ScriptableRenderPipeline repo.

Previous iterations of the ScriptableRenderPipeline repo owned this sample scene data, in case you noticed it before, and wondered where it went.

Основы настройки Universal Render Pipeline (URP) в Unity 2019.3

В этом статье вы узнаете, как начать работу с Universal Render Pipeline (далее «URP«) (для Unity 2019.3), который ранее известен как LWRP (Unity 2019.2 и ниже).

URP можно использовать практически на любой крупной платформе и обеспечивает красивую графику и высокую производительность.

Давайте попробуем преобразовать сцену из Unity в URP.

В первую очередь пойти в Windows — Package Manager и отсюда выберите Universal RP.

image

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

image

Первое, что вам нужно сделать — щелкните правой кнопкой мыши в иерархии проекта, чтобы создать файл настройки «URP» – Create – Rendering – Universal Render Pipeline – Pipeline Assets (Forward Render), а затем перейти к редактированию настройка проекта ( Edit – Project Settings — Graphics). Автоматически создастся два файла «URP» и «URP_Renderer».

image

image

И в разделе Scriptable Render Pipeline Settings выбрать «URP» который мы только что создали, и, как вы уже догадались, он преобразует все на сцене в розовый, потому что шейдеры по умолчанию не поддерживается в URP, но не волнуйтесь, мы исправим за одну минуту.

Чтобы преобразовать материалы перейти «Edit – Render Pipeline – Universal Render Pipeline – Upgrade Project Materials to UniversalRP», нажмите продолжить и вуаля, как вы можете видеть это не преобразовало все материалы отлично. Давайте посмотрим, как мы можем преобразовать другие материалы вручную.

image

Например, сцена у нас есть в основном из деревьев и травы, которые нам нужно преобразовать, выберите эту траву и перейдите к ней в материалы, как вы можете видеть, что этот материал травы использует пользовательский шейдер, поэтому он не был преобразован.

Но не волнуйтесь, это просто прозрачная текстура травы, чтобы преобразовать этот материал надо изменить шейдер на «Universal Renderpipeline/Lit», далее «Render Face – Both», в Base Map выбрать текстуру для шейдера, включить Alpha Clipping, а Smoothness опустить на 0.

Ландшафт будет розовым, давайте исправим это.

Идем в папку материалов и создадим новый материал, щелкнуть правой кнопкой мыши Create — Material, который подпишу «Terrain», выберу тип шейдера «Universal Render Pipeline/Terrain/Lit» и после этого переместим его на место материала в terrain сцены.

Вы можете видеть, что наша местность снова отлично видна, но есть еще одна проблема, если вы заметили, наши ветви деревьев не отбрасывают тени, а ствол этих деревьев отбрасывает тень, чтобы решить эту проблему снова перейдите к материалу веток деревьев и из типа поверхности выбрать (surface type) прозрачный (transparent) и заменить на непрозрачный (opaque) и выставить Threshold на 0,5.

Если тени нету — перейдите в Directional light и измените Type — Directional, Mode — Mixed, Shadow Type — Hard Shadow, Dias — Use Pipeline Settings. Теперь они отлично отбрасывают тень.

image

Теперь давайте также добавим некоторые пост эффекты для дальнейшей импровизации сцены, чтобы добавить эффект пост-обработки правой кнопкой мыши Volume и выберите Global Volume, и вы можете увидеть по умолчанию режим.

Установка Mode — Global означает, что весь пост эффект будет применяться ко всей сцене, если вы хотите применить эффект к определенной области, то вы должны выбрать Local.
Далее добавим в Volume с помощью Add Override Bloom, White Balance, Depth Of Field, Shadows Midtones Highlights и Vignette добавляем при желании поиграть с цветами.

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

  • Render Type – Base,
  • Field of View – 45,
  • Render – Default Render (URP_Render),
  • Post Processing – поставить галочку,
  • Anti-aliasing – Fast Approximate Anti-aliasing (FXAA).

Также мы создадим три настройки графики для разных по силе устройств. Перейдем в ранее создан файл «UPR», изменим в Quality параметры по своему усмотрению, параметр Render Scale поможет существенно изменить производительность для слабых устройств, в Shadows измените дистанцию теней от 50 до 300 и добавьте каскады для теней что бы снизить нагрузку, остальные параметры можете оставить по умолчанию.

Rendering

Rendering Vs Drawing

Rendering is the process of drawing a scene on the computer screen.

Rendering involves a combination of geometry calculations, textures, surface treatments, the viewer’s perspective, and lighting.

The rendering pipeline is the process of transforming all of these data into the virtual environment on the screen.

Rendering Pipeline consists of:

Rendering Pipe Line in Unity

Application (CPU work happening in the background)

CPU Input to the GPU, where Geometry and Rasterization will take place, Source: Wikipedia

In the Application Phase, you are giving instructions for handling Geometry and Rasterization. This phase affects Geometry and Rasterization.

for example, triggering post-processing effects to signal a collision will have Rasterization.

Geometry

Creating 3d and 2d models using the mesh data and simulating the virtual world with its dimensions.

It includes calculations about the position of the camera and transformation, rotation and scaling of the virtual world.

Rasterization or (Rasterisation)

Since our screens are 2D, Rasterization is how the Geometry (3D & 2D) will be drawn on our 2D screen.

Rasterization is converting an image from vector graphics format to raster image(ser image)

Rasterization is where we process the virtual environment several times through different filters then output the result on the screen.

Post-processing effects: Effects that happen to the 2d version of the objects (Screen model) not the 3d model (Geometry Model)

Rendering Processes:

  1. Geometry

Mesh data are collected (Vertices Array, Normals Array, Triangle Array and UV Array)

2.Illumination (Models are colored and lit)

In the Illumination stage also we add lighting effects to the virtual world

Using different inputs(textures, normal maps … ,etc.) we color objects in the virtual world.

3. Viewer’s Perspective (Camera Input)

Before rendering the environment on the screen we consider the camera input such as (field of view, Projection Mode[Orthographic or Prespective])

4.Clipping

(Remove objects outside of the Camera View)

5. Screen space Projection

(Projection of 3d Environment on the 2d screen model)

6.Adding post-processing effects

Those are the effects we add to the 2D image just before Displaying the final output on the screen

Depth of field is a post-processing effect applied to the 2D final image

Bloom is a post-processing effect applied to the 2D final image

7. Display

Finally, we renderer our scene.

This was a macroscopic look of the rendering line processes in Unity, it provides an inside perspective about the rendering pipeline and the work done by lots of magnificent engineers to help us create better apps and tools.

Масштабируемая и высокая производительность рендеринга

Universal Render Pipeline от Unity стал мощным решением, сочетающим красоту, скорость и производительность, а также поддержку всех целевых платформ Unity.

The Universal Rendering Pipeline is a scalable multiplatform render pipeline built on top of the Scriptable Render Pipeline (SRP) framework. Thanks to its scalability, customizability, and a rich feature set, URP offers you creative freedom in any type of project, from stylized visuals to physically based rendering.

Lost in Random scene

Lost In Random by Zoink Games

Lego Builder's Journey

LEGO® Builder's Journey от Light Brick Studio

Universal Render Pipeline
Упор на производительность
Однопроходный упреждающий рендеринг
Поддержка Shader Graph

Встроенный процесс рендеринга
Универсальность
Поддерживает как упреждающий, так и отложенный рендеринг

Mini Motorways Game

Mini Motorways by Dinosaur Polo Club

От 2D и 3D до AR/VR-проектов: Universal Render Pipeline позволяет не тратить время на доработку проекта для выпуска на новом устройстве.

  • Mac и iOS
  • Android
  • Xbox One
  • PlayStation 4
  • Nintendo Switch
  • Ведущие AR- и VR-платформы
  • Windows и UWP

Lost in Random: королева

Lost In Random от студии Zoink Games

Возможность конфигурации рендеринга в Unity с помощью скриптов на C# позволяет вам:

  • оптимизировать производительность для конкретных устройств;
  • тонко настраивать процесс рендеринга в соответствии с конкретными требованиями;
  • управлять потреблением вычислительных ресурсов.

Circuit

Circuit Superstars by Original Fire Games

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

Вы можете воспользоваться преимуществами готовых технологий уже сегодня. Обновите проекты с помощью средств перехода или создайте новый проект на основе нашего шаблона Universal через Unity Hub.

Gigaya Beauty Shot

To help with your transition from the Built-in Render Pipeline, URP offers numerous rendering capabilities, from Camera Stacking to Light Cookies and Point Light Shadows, as well as Renderer Features such as Decals and Screen Space Ambient Occlusion (SSAO).

In addition, URP supports the latest node-based tools offered by Unity. Shader Graph allows you to visually author shaders in real-time. With VFX Graph, you can leverage the power of your GPU to create extraordinary VFX.

Баннер Hero Shot

Thanks to its large platform reach, the URP already powers numerous successful games, such as the relaxing puzzle platformer LEGO Builder’s Journey and action-adventure game Lost in Random.

To help you start creating inspiring experiences in URP, Unity offers learning sample content including the URP Package Samples and the Gigaya living game sample.

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

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