当前位置:网站首页>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.
边栏推荐
- C语言表白代码?
- C language from entry to such as soil, the data store
- (四)递归、可变参数、访问修饰符、理解 main 方法、代码块
- npm、nrm两种方式查看源和切换镜像
- MySQL to revise the root password
- C# 实现PLC的定时器
- Solved (the latest version of selenium framework element positioning error) NameError: name 'By' is not defined
- 扫雷游戏(c语言写)
- PCL 计算点云坐标最值及其索引
- Win10 CUDA CUDNN 安装配置(torch paddlepaddle)
猜你喜欢
C language confession code?
手把手实现图片预览插件(三)
Thinking about data governance after Didi fines
重磅 | 基金会为白金、黄金、白银捐赠人授牌
ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost3306' (10061)Solution
[C language] General method of base conversion
MySQL database must add, delete, search and modify operations (CRUD)
(8) Math class, Arrays class, System class, Biglnteger and BigDecimal classes, date class
马斯克对话“虚拟版”马斯克,脑机交互技术离我们有多远
MySQL数据库必会的增删查改操作(CRUD)
随机推荐
volatile内存语义以及实现 -volatile写和读对普通变量的影响
PCL 计算点云坐标最值及其索引
Understanding of the presence of a large number of close_wait states
Knowledge Distillation 7: Detailed Explanation of Knowledge Distillation Code
Learning DAVID Database (1)
qlib自动化quant
C language confession code?
【C语言进阶】文件操作(一)
C语言表白代码?
BUG消灭者!!实用调试技巧超全整理
(六)枚举、注解
Visual studio shortcuts that improve efficiency, summary (updated from time to time)
MySQL fuzzy query can use INSTR instead of LIKE
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法
【SemiDrive源码分析】【MailBox核间通信】44 - 基于Mailbox IPCC RPC 实现核间通信(RTOS侧 IPCC_RPC Server 消息接收及回复 原理分析篇)
three.js 制作3D相册
BUG destroyer!!Practical debugging skills are super comprehensive
IDEA common shortcut keys and plug-ins
高等数学---第九章二重积分
问题7:列表的拼接