当前位置:网站首页>Unity Tutorial: URP Rendering Pipeline Practical Tutorial Series [1]
Unity Tutorial: URP Rendering Pipeline Practical Tutorial Series [1]
2022-07-31 04:44:00 【Clank's Game Stack】
URPRendering pipeline combat decryption(一)
More and more mobile game developers are now using itURP渲染管线,来代替之前UnityThe engine's default forward rendering pipeline,This section elaborates on the following aspectsURP 渲染管线,对URPA comprehensive understanding of the rendering pipeline.
(1)为什么使用URP渲染管线;
(2)如何创建一个URPItems of the render pipeline;
(3)基于URPGlobal configuration of the rendering pipeline
这里有个游戏开发交流小组 Everyone can learn together
1为什么使用URP渲染管线
game is fromPCThe end game developed,We take the distance from the light source in the traditional forward rendering pipeline,The forward rendering pipeline supports any number of significant light sources,每个重要光源, Unity All objects are drawn once based on this light, 这样导致passVery many times,The performance consumption overhead is very large,So there is static lighting,Static baking, etc.With the development of mobile games,People are not satisfied with fake static lighting,Requires realtime lighting,And to ensure good performance.这个时候,It requires developers to make a trade-off and choice,Under the premise of meeting the specific needs of mobile game development,Maximize performance,于是URPThe rendering pipeline is out,He assumed some specific conditions such as the main light source can only be directional light,Other additional light sources are limited in number in the configuration file,在一个passAll light sources and lighting calculations are processed within the system.After adding these constraints,URPThe rendering pipeline can develop very good effects for real-time lighting for mobile games,At the same time, it can maximize the best performance.URPThe rendering pipeline is to make some restrictions on the use environment,The rendering strategy is customized based on these constraints, Get good results and good performance at the same time.So slowly many companies have adopted itURPRendering pipeline for mobile games.
URP渲染管线,是基于UnityA programmable rendering pipeline mechanism for game engines,接合URPThe premise of the rendering pipeline,Implemented rendering strategy.In terms of rendering, he has re-customized the camera,光照计算,阴影计算,后期处理,Unique setShader等(基于URP的PBR shader,of the previous forward rendering pipelinePBR Shader不能用了).Unityput in the new versionURPThe rendering pipeline is made into a project template,We use this template to createURPRender pipeline projects are very easy,Later, we will also talk about how to upgrade old projects to URPRender pipeline item.
2 如何创建一个URPItems of the render pipeline
接下来我们使用Unity 2020.2.3f1 来创建一个URPItems of the render pipeline,Learn from this projectURP.打开Unity Hub,Selecting New Project will appearURP项目模板,如图 1.1-1所示:

图1.1-1
创建完成以后,We can see a standard based on thatURPRendered project and development environment(Packages下都有URPThe render pipeline code with Shader,There are some in the project directoryURPSome related settings, etc.),You can develop your own projects and code based on this environment,In fact, it is no different from normal.如图1.1-2:

图1.1-2
Next, let's start with the folder to analyzeURPexample scenarios and how the project is organized.Example scenarios are givenURPseveral important parts,如图1.1-3:

图1.1-3
URP摄像机: Main Camera, Write about it belowbase摄像机与Overlay摄像机.
Main light source and additional light source:The main light source is a directional light,Multiple parallel lights can be superimposed,The additional light source is deployed in the scene as shown in the figure1.1-4:

图1.1-4
Post-processing of images: Controls for post-processing of images,Mainly after rendering is completed,Add some post-rendering effects,Divided into global and local mode,It will be explained later in the tutorial.如图1.1-5所示:

图1.1-5
接下来看下URP项目文件夹,URPThe project organization is actually pretty much the same as ordinary ones,Packages下安装好了URP相关的依赖,在AssetsThe bottom is slightly different from the normal one,主要在于URP的配置文件,一起来看下.

图1.1-6

图1.1-7
1.1-7中ExampleAssets与Materials文件夹We can directly delete it in our own project,At that time, you can replace it with the resource directory of the project.Presets文件夹It contains some global settings,Usually bring it to the project.Scenes / Scripts文件夹Store scenes and code,和普通项目一样,Can be deleted and modified at will.Settings文件夹存The configuration file of the rendering pipeline is placed as shown in the figure1.1-8,不要删除.

图1.1-8
TutorialInfo文件夹items can be deleted,没有任何实际的作用.

图1.1-9
URP渲染管线ShaderAll relevant information is stored here,Use based on when doing project developmentURP的Shader,自己开发Shader也要符合URP的规范.
3基于URPGlobal configuration of the rendering pipeline
URPThe global configuration parameters of the rendering pipeline that determine the criticality of rendering are inPipeLine的配置里面.How to open global configuration,打开Project Settings窗口啊, 选择Graphics,如图1.1-10

图1.1-10
There is light here,Fog as well as preloadedShader以外,就是有一个Scriptable Render Pipeline Settings, Here are some configurations of the rendering pipeline,And this file is associated with the projectSettings文件夹中的设置,如图1.1-11所示:

图1.1-11
URPThe rendering pipeline settings are divided into3个等级,One profile per level,分为:
High rendering quality level:UniversalRP-HighQuality
Medium rendering quality level: UniversalRP-MediumQuality
Low rendering quality level:UniversalRP-LowQuality
The main parameters of the render settings are as follows,如图1.1-12所示

图1.1-12
You can switch the rendering level according to the performance of the phone,Thereby, a good balance between performance and effect can be obtained on mobile phones with different performances.
今天的分享就到这里,关注我们,We will continue to explain in the next sectionURPRendering pipeline practical tutorial.
边栏推荐
- Understanding of the presence of a large number of close_wait states
- WeChat applet uses cloud functions to update and add cloud database nested array elements
- BUG destroyer!!Practical debugging skills are super comprehensive
- 三子棋的代码实现
- PCL 计算点云坐标最值及其索引
- Industry landing presents new progress | 2022 OpenAtom Global Open Source Summit OpenAtom OpenHarmony sub-forum was successfully held
- (6) Enumeration and annotation
- exsl文件预览,word文件预览网页方法
- Unity资源管理系列:Unity 框架如何做好资源管理
- Thinking about data governance after Didi fines
猜你喜欢

【R语言】【3】apply,tapply,lapply,sapply,mapply与par函数相关参数
![[Linear Neural Network] softmax regression](/img/98/ffdff5e96ad0d6ac0142af7ca11e9a.png)
[Linear Neural Network] softmax regression

View source and switch mirrors in two ways: npm and nrm

打造基于ILRuntime热更新的组件化开发

Hand in hand to realize the picture preview plug-in (3)

Vue项目通过node连接MySQL数据库并实现增删改查操作

扫雷小游戏——C语言

Unity URP渲染管线摄像机核心机制剖析

从零开始,一镜到底,纯净系统搭建除草机(Grasscutter)

The Vue project connects to the MySQL database through node and implements addition, deletion, modification and query operations
随机推荐
volatile内存语义以及实现 -volatile写和读对普通变量的影响
Unity教程:URP渲染管线实战教程系列【1】
【debug锦集】Expected input batch_size (1) to match target batch_size (0)
数字经济时代的开源数据库创新 | 2022开放原子全球开源峰会数据库分论坛圆满召开
【AUTOSAR-RTE】-4-Port and Interface and Data Type
From scratch, a mirror to the end, a pure system builds a grasscutter (Grasscutter)
ENSP,划分VLAN、静态路由,三层交换机综合配置
[C language] General method of base conversion
专访 | 阿里巴巴首席技术官程立:云+开源共同形成数字世界的可信基础
【py脚本】批量二值化处理图像
重磅 | 基金会为白金、黄金、白银捐赠人授牌
el-image tag doesn't work after binding click event
Hand in hand to realize the picture preview plug-in (3)
Open Source Database Innovation in the Digital Economy Era | 2022 Open Atom Global Open Source Summit Database Sub-Forum Successfully Held
.NET-9.乱七八糟的理论笔记(概念,思想)
剑指offer专项突击版第15天
Visual studio shortcuts that improve efficiency, summary (updated from time to time)
Puzzle Game Level Design: Reverse Method--Explaining Puzzle Game Level Design
[R language] [3] apply, tapply, lapply, sapply, mapply and par function related parameters
HCIP Day 10_BGP Route Summary Experiment