Unity HDRP高清渲染管/1/学习笔记

/ 2评 / 2

介绍几个网站

Unity文章: https://connect.unity.com/p?orderBy=trending:w&projectType=article

HDRP文档:
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/index.html

图形渲染

可编程渲染管线(Scriptable Render Pipeline)

高清晰度渲染管线(HDRP)

轻量级渲染管线(LWRP)

High Definition Render Pipeline (HDRP)

新增的(功能/特效)

Shader Library(着色器)

Sky(天空)

Light Entities(灯光)

Debugging Modes and Rendering

PropertyDescription
Lit Shader ModeUse the drop-down to choose which mode HDRP uses for the Lit Shader.
• Forward Only: forces HDRP to only use forward rendering for Lit Shaders.
• Deferred Only: forces HDRP to use deferred rendering for Lit Shaders (HDRP still renders advanced Materials using forward rendering).
• Both: allows the Camera to use deferred and forward rendering.

Select Both to allow you to switch between forward and deferred rendering for Lit Shaders at run time per Camera. Selecting a specific mode reduces build time and Shader memory because HDRP requires less Shader variants, but it is not possible to switch from one mode to the other at run time.
- Multisample Anti-aliasing QualityUse the drop-down to set the number of samples HDRP uses for multisample anti-aliasing (MSAA). The larger the sample count, the better the quality. Select None to disable MSAA.
This property is only visible when Lit Shader Mode is set to Forward Only or Both.
Motion VectorsEnable the checkbox to make HDRP support motion vectors. HDRP uses motion vectors for effects like screen space reflection (SSR) and motion blur. When disabled, motion blur has no effect and HDRP calculates SSR with lower quality.
Runtime Debug DisplayEnable the checkbox to make HDRP display Material and Lighting properties at run time to help debugging.Disable this checkbox to reduce build time and Shader memory. This disables the following debug modes: All Material debug modes except GBuffer debug. The Lux meter, diffuse lighting only, and specular lighting only debug modes. The overriding option for overriding albedo.
Dithering Cross-fadeEnable the checkbox to make HDRP support dithering cross fade. This allows HDRP to implement smooth transitions between a GameObject’s LOD levels. When disabled, this reduces build time if you are not using LOD fade.
Transparent BackfaceEnable the checkbox to make HDRP support transparent back-face render passes. If your Unity Project does not need to make a transparent back-face pass, disable this checkbox to reduce build time.
Transparent Depth PrepassEnable the checkbox to make HDRP support transparent depth render prepasses. If your Unity Project does not need to make a transparent depth prepass, disable this checkbox to reduce build time .
Transparent Depth PostpassEnable the checkbox to make HDRP support transparent depth render postpasses. If your Unity Project does not make use of a transparent depth postpass. Uncheck this checkbox to reduce build time .

Decals

These settings control the draw distance and resolution of the decals atlas that HDRP uses when it renders decals projected onto transparent surfaces.

PropertyDescription
EnableEnable the checkbox to make HDRP support decals in your Unity Project.
- Draw DistanceThe maximum distance from the Camera at which Unity draws Decals.
- Atlas WidthThe Decal Atlas width. This atlas stores all decals that project onto transparent surfaces.
- Atlas HeightThe Decal Atlas height. This atlas stores all decals that project onto transparent surfaces.
- Metal and Ambient Occlusion propertiesEnable the checkbox to allow decals to affect metallic and ambient occlusion Material properties. Enabling this feature has a performance impact.
- Maximum Decals on ScreenThe maximum number of decals you can have on screen at one time.

Dynamic Resolution

PropertyDescription
EnableEnable the checkbox to make HDRP support dynamic resolution in your Unity Project.
- Dynamic Resolution TypeUse the drop-down to select the type of dynamic resolution HDRP uses:
• Software: This option allocates render targets to accommodate the maximum resolution possible, then rescales the viewport accordingly. This allows the viewport to render at varying resolutions.
- Upscale FilterUse the drop-down to select the filter that HDRP uses for upscaling.
• Bilinear: A low quality upsample. The least resource intensive option.
• Catmull-Rom: A bicubic upsample with 4 taps.
• Lanczos: A sharp upsample. This method can potentially introduce artifacts so you should not use it for extreme upsampling cases for example, when the screen percentage is less than 50%.
- Minimum Screen PercentageThe minimum screen percentage that dynamic resolution can reach.
- Maximum Screen PercentageThe maximum screen percentage that dynamic resolution can reach. This value must be higher than the Min Screen Percentage.
- Force Screen PercentageEnable the checkbox to force HDRP to use a specific screen percentage for dynamic resolution. This feature is useful for debugging dynamic resolution.
- Forced Screen PercentageThe specific screen percentage that HDRP uses for dynamic resolution. This property is only visible when you enable the Force Screen Percentage..

Lighting

PropertyDescription
Screen Space Ambient OcclusionEnable the checkbox to make HDRP support screen space ambient occlusion (SSAO). SSAO is a technique for approximating ambient occlusion efficiently in real time.
VolumetricsEnable the checkbox to make HDRP support volumetrics. This allows you to use Volumetric Fog for the Fog Type in the Visual Environment.
- high qualityEnable the checkbox to increase the resolution of volumetrics. This increases the quality of fog effects, but increases the resource intensity greatly.
Light LayersEnable the checkbox to make HDRP support Light Layers. You can assign a Layer to a Light which then only lights up Mesh Renderers with a matching rendering Layer.

Light Layers

Light Layers are used to separate lighting into different layers in order to make object only reacting to certain lights.

PropertyDescription
EnableEnable the checkbox to make HDRP support Light Layers. You can assign a Layer to a Light which then only lights up Mesh Renderers with a matching rendering Layer.
Light Layer Name iThe name displayed on light and meshes when using this HDRenderPipelineAsset.

Cookies

Use the Cookie settings to configure the maximum resolution of individual cookies and the maximum resolution of cookie texture arrays that define the number of cookies on screen at one time. Larger sizes use more memory, but result in higher quality images.

PropertyDescription
Cookie SizeUse the drop-down to select the maximum individual cookie size for 2D cookies. HDRP uses 2D cookies for Directional and Spot Lights.
Texture Array SizeThe maximum Texture Array size for the 2D cookies that HDRP uses for Directional and Spot Lights. Increase this to make HDRP support a greater number of 2D cookies concurrently on screen.
Point Cookie SizeUse the drop-down to select the maximumPoint Cookie size for cubemap cookies. HDRP uses cubemap cookies for Point Lights.
Cubemap Array SizeThe maximum cube map Array size for the Cube cookies that HDRP uses for Point Lights. Increase this to make HDRP support a greater number of cube map cookies concurrently on screen.

Reflections

Use the Reflection settings to configure the resolution of your reflections and whether Unity should compress the Reflection Probe caches or not.

PropertyDescription
Screen Space ReflectionEnable the checkbox to make HDRP support screen space reflection. SSR is a technique for calculating reflections by reusing screen space data.
Compress Reflection Probe CacheEnable the checkbox to compress the Reflection Probe cache in order to save space on disk.
Reflection Cubemap SizeUse the drop-down to select the maximum resolution of individual Reflection Probecubemaps.
Probe Cache SizeThe maximum size of the Probe Cache. Defines how many Probe cube maps HDRP can save in cache.
Compress Planar Reflection Probe CacheEnable the checkbox to compress the Planar Reflection Probe cache in order to save space on disk.
Planar Reflection Texture SizeUse the drop-down to select the maximum resolution of individual Planar Reflection textures.
Planar Probe Cache SizeThe maximum size of the Planer Reflection Probe cache. Defines how many Probe textures HDRP can save in cache.
Maximum Environment Lights on ScreenThe maximum number of environment Lights HDRP can manage on screen at once.

Sky

These settings control skybox reflections and skybox lighting.

PropertyDescription
Reflection SizeUse the drop-down to select the maximum resolution of the cube map HDRP uses to manage fallback reflection when no local reflection probes are present. This property has no effect on the quality of the sky itself.
Lighting Override MaskUse the drop-down to select the Volume layer mask HDRP uses to override sky lighting. Use this to decouple the display sky and lighting. See the Environment Lighting for information on how to decouple environment lighting from the sky background.

Shadow

These settings adjust the size of the shadowmask. Smaller values causes Unity to discard more distant shadows, while higher values lead to Unity displaying more shadows at longer distances from the Camera.

PropertyDescription
ShadowmaskEnable the checkbox to make HDRP support the Shadowmask lighting mode in your Unity Project.
Maximum Shadow on ScreenThe maximum number of shadows you can have in view. A Spot Light casts a single shadow, a Point Light casts six shadows, and a Directional Light casts shadows equal to the number of cascades defined in the HD Shadow Settings override.
Filtering QualityUse the drop-down to select the filtering quality for shadows. Higher values increase the shadow quality in HDRP as better filtering near the edges of shadows reduce aliasing effects. Shadow quality only works for Cameras that use forward renderingDeferred mode uses Medium.
To edit this property, select Both or Forward Only from the Lit Shader Mode drop-down. For information on each filtering quality preset, see the Filtering Qualities table.
Screen Space ShadowsEnable the checkbox to allow HDRP to compute shadows in a separate pass and store them in a screen-aligned Texture.
MaximumSet the maximum number of screen space shadows that HDRP can handle.

The following sections allow you to customize the shadow atlases and individual shadow resolution tiers for each type of Light in HDRP. Shadow resolution tiers are useful because, instead of defining the shadow resolution for each individual Light as a number, you can assign a numbered resolution to a named shadow resolution tier then use the named tier instead of rewriting the number. For example, instead of setting the resolution of each Light to 512, you could say that Medium resolution shadows have a resolution of 512 and then set the shadow quality of each Light to be Medium. This way, you can more easily have consistent shadow quality across your HDRP Project.

The three sections here are:

They all share the same properties, except Directional Light Shadows which does not include Resolution or Dynamic Rescale.

PropertyDescription
Light Atlas
ResolutionUse the drop-down to select the resolution of the shadow atlas.
PrecisionUse the drop-down to select the precision of the shadow map. This sets the bit depth of each pixel of the shadow map. 16 bit is faster and uses less memory at the expense of precision.
Dynamic RescaleEnable the checkbox to allow HDRP to rescale the shadow atlas if all the shadows on the screen don’t currently fit onto it.
Shadow Resolution Tiers
LSet the resolution of shadows set to this quality. Light's with their Resolution set to Low use this resolution for their shadows.
MSet the resolution of shadows set to this quality. Light's with their Resolution set to Medium use this resolution for their shadows.
HSet the resolution of shadows set to this quality. Light's with their Resolution set to High use this resolution for their shadows.
USet the resolution of shadows set to this quality. Light's with their Resolution set to Ultra use this resolution for their shadows.
Maximum Shadow ResolutionSet the maximum resolution of any shadow map of this Light type. If you set any shadow resolution to a value higher than this, HDRP clamps it to this value.

Filtering Qualities

Filtering QualityAlgorithm
Low• Point/Spot Lights: Percentage Closer Filtering (PCF) 3x3 (4 taps).
• Directional Lights: PCF Tent 5x5 (9 taps).
• Area Lights: EVSM.
Medium• Point/Spot Lights: PCF 5x5 (9 taps).
• Directional Lights: PCF Tent 5x5 (9 taps).
• Area Lights: EVSM.
HighPoint/Spot/Directional Lights: Percentage Closer Soft Shadow (PCSS). You can change the sample count to decrease the quality of these shadows. This decreases the resource intensity of this algorithm. To change the sample count for shadows cast by that Light, set the Filter Sample Count in the Inspector of each Light component.
• Area Lights: EVSM.

The PCF algorithm applies a fixed size blur. PCSS applies a different blur size depending on the distance between the shadowed pixel and the shadow caster. This results in a more realistic shadow, that is also more resource intensive to compute.

Light Loop

Use these settings to enable or disable settings relating to lighting in HDRP.

PropertyDescription
Maximum Directional On ScreenThe maximum number of Directional Lights HDRP can manage on screen at once.
Maximum Punctual On ScreenThe maximum number of Point and Spot Lights HDRP can manage on screen at once.
Maximum Area On ScreenThe maximum number of area Lights HDRP can manage on screen at once.

Material

PropertyDescription
DistortionEnable the checkbox to make HDRP support distortion. If your Unity Project does not use distortion, disable this checkbox to reduce build time.
Subsurface ScatteringEnable the checkbox to make HDRP support subsurface scattering (SSS). SSS describes light penetration of the surface of a translucent object
- High QualityEnable the checkbox to increase the SSS Sample Count and enable high quality subsurface scattering. Increasing the sample count greatly increases the performance cost of the Subsurface Scattering effect.
Fabric BSDF ConvolutionBy default, Fabric Materials reuse the Reflection Probes that HDRP calculates for the Lit Shader (GGX BRDF). Enable the checkbox to make HDRP calculate another version of each Reflection Probe for the Fabric Shader, creating more accurate lighting effects. This increases the resource intensity because HDRP must condition two Reflection Probes instead of one. It also reduces the number of visible Reflection Probes in the current view by half because the size of the cache that store Reflection Probe data does not change and now must store both versions of each Reflection Probe.
Diffusion Profile ListAssign Diffusion Profiles to this list to store Subsurface Scattering and Transmission profiles for your Project. To create a Diffusion Profile Asset, navigate to Assets > Create > Rendering and click Diffusion Profile.

Post-processing

PropertyDescription
Grading LUT SizeThe size of the internal and external color grading lookup textures (LUTs). This size is fixed for the Project. You can not mix and match LUT sizes, so decide on a size before you start the color grading process. The default value, 32, provides a good balance of speed and quality.
Grading LUT FormatUse the drop-down to select the format to encode the color grading LUTs with. Lower precision formats are faster and use less memory at the expense of color precision. These formats directly map to their equivalent in the built-in GraphicsFormat enum value.

-转自
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/HDRP-Asset.html

创建HDRP项目

从模板中创建

Unity提供了一个HDRP模板项目,您可以使用它来快速设置HDRP。

Unity创建一个项目并自动安装HDRP软件包及其所有依赖项。

一个简单的项目

先前准备

前期准备

把所有物品删除,重新自己设置一下

导入一下自己做的一个3D Model(模型太小可以把Scale设置成 99-99-99)

认识(volume/ 体积 )

体积是一个重要的组件

PropertyDescription
ModeUse the drop-down to select the method that HDRP uses to calculate whether this Volume can affect a Camera:
• Global: Makes the Volume have no boundaries and allow it to affect every Camera in the Scene.
• Local: Allows you to specify boundaries for the Volume so that the Volume only affects Cameras inside the boundaries. Add a Collider to the Volume's GameObject and use that to set the boundaries.
Blend DistanceThe furthest distance from the Volume’s Collider that HDRP starts blending from. A value of 0 means HDRP applies this Volume’s overrides immediately upon entry.
This property only appears when you select Local from the Mode drop-down.
WeightThe amount of influence the Volume has on the Scene. HDRP applies this multiplier to the value it calculates using the Camera position and Blend Distance.
PriorityHDRP uses this value to determine which Volume it uses when Volumes have an equal amount of influence on the Scene. HDRP uses Volumes with higher priorities first.
ProfileA Volume Profile Asset that contains the Volume overrides that store the properties HDRP uses to handle this Volume.

-转自
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@7.1/manual/Volumes.html

当你没有选择全局应用你需要添加一个“触发器”!否则你无法使用

(volume/ 体积 ) 配置文件

官方给了两个配置文件
DefaultRenderingSettings(默认配置文件)
DefaultPostprocessingSettings(默认的后处理)

-还有待补充

创建天空

虽然可以放在同一配置文件,但并不推荐

添加摄像机

看图设置- -

2019年11月30日补充

新项目的Volume应该包含的配置文件

2条回应:“Unity HDRP高清渲染管/1/学习笔记”

  1. WeiMiao WeiMiao说道:

    这次的文章只是很基础的东西,其实还有好多的内容。Volume Profile 还没写出来 -。-学无止境!

  2. 头像 沐曦说道:

    没有编程基础的我,表示一点都不会

发表评论

电子邮件地址不会被公开。 必填项已用*标注