当前位置:网站首页>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.
边栏推荐
- 关于出现大量close_wait状态的理解
- MATLAB/Simulink & & STM32CubeMX tool chain completes model-based design development (MBD) (three)
- Error EPERM operation not permitted, mkdir ‘Dsoftwarenodejsnode_cache_cacach两种解决办法
- [shell basics] determine whether the directory is empty
- MySQL fuzzy query can use INSTR instead of LIKE
- Heavyweight | The Open Atomic School Source Line activity was officially launched
- ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost3306' (10061)Solution
- Exsl file preview, word file preview web page method
- 参考代码系列_1.各种语言的Hello World
- 两个地址池r2负责管地址池r1负责管dhcp中继
猜你喜欢
The input input box displays the precision of two decimal places
【debug锦集】Expected input batch_size (1) to match target batch_size (0)
(五)final、抽象类、接口、内部类
idea工程明明有依赖但是文件就是显示没有,Cannot resolve symbol ‘XXX‘
已解决:不小心卸载pip后(手动安装pip的两种方式)
(4) Recursion, variable parameters, access modifiers, understanding main method, code block
Unity教程:URP渲染管线实战教程系列【1】
扫雷游戏(c语言写)
XSS shooting range (3) prompt to win
Learning DAVID Database (1)
随机推荐
简易网络文件拷贝的C实现
Minesweeper game - C language
three.js make 3D photo album
IDEA common shortcut keys and plug-ins
产学研用 共建开源人才生态 | 2022开放原子全球开源峰会教育分论坛圆满召开
Safety 20220718
Can‘t load /home/Iot/.rnd into RNG
两个地址池r2负责管地址池r1负责管dhcp中继
Visual studio shortcuts that improve efficiency, summary (updated from time to time)
[Linear Neural Network] softmax regression
论治理与创新 | 2022开放原子全球开源峰会OpenAnolis分论坛圆满召开
打造基于ILRuntime热更新的组件化开发
SOLVED: After accidentally uninstalling pip (two ways to manually install pip)
【SemiDrive源码分析】【MailBox核间通信】44 - 基于Mailbox IPCC RPC 实现核间通信(RTOS侧 IPCC_RPC Server 消息接收及回复 原理分析篇)
Can't load /home/Iot/.rnd into RNG
递归实现汉诺塔问题
C language confession code?
重磅 | 开放原子校源行活动正式启动
Win10 CUDA CUDNN installation configuration (torch paddlepaddle)
[py script] batch binarization processing images