Quality Settings
质量设置
切换到脚本
Unity allows you to set the level of graphical quality it will attempt to render. Generally speaking, quality comes at the expense of framerate and so it may be best not to aim for the highest quality on mobile devices or older hardware since it will have a detrimental effect on gameplay. The Quality Settings inspector (menu: Edit > Project Settings > Quality) is used to select the quality level in the editor for the chosen device. It is split into two main areas - at the top, there is the following matrix:
Unity允许你设置它将要着色的图像的质量级别.通常来说,质量是以帧速率为代价的,因此最好不要把高质量用于手机设备或老旧硬件设备,因为这将对游戏产生不利影响.”质量设置”检视面板(菜单:编辑>项目设置>质量)用于编辑给定设备的质量级别.它分为两个主要区域--上部分是个矩阵,如下图:
Unity lets you assign a name to a given combination of quality options for easy reference. The rows of the matrix let you choose which of the different platforms each quality level will apply to. The Default row at the bottom of the matrix is not a quality level in itself but rather sets the default quality level used for each platform (a green checkbox in a column denotes the level currently chosen for that platform). Unity comes with six quality levels pre-enabled but you can add your own levels using the button below the matrix. You can use the trashcan icon (the rightmost column) to delete an unwanted quality level.
Unity让你指定一个名称给一个给定的质量选项组合以便于引用.矩阵的行让你选择每个质量级别在哪个平台会应用到.矩阵底部的默认行用于每个平台(列中的绿色复选框表示该平台当前选定的级别).Unity预先提供6个质量级别,但你可以使用矩阵下面按钮添加你自己的级别.你可以使用垃圾桶图标(最右边的一列)来删除一个不需要的质量级别.
You can click on the name of a quality level to select it for editing, which is done in the panel below the settings matrix:
你可以点击一个质量级别名称来选定编辑它,这将在设置矩阵下方出现如下面板:
The quality options you can choose for a quality level are as follows:
你可以选为一个重量级别的质量选项,如下:
Property: 属性: | Function: 功能: |
Name 名称 | The name that will be used to refer to this quality level 用于指代此质量级别的名称 |
Rendering 渲染 |
|
Pixel Light Count 像素光源数量 | The maximum number of pixel lights when Forward Rendering is used. 当使用正向渲染时像素光源的最大数量. |
Texture Quality 贴图质量 | This lets you choose whether to display textures at maximum resolution or at a fraction of this (lower resolution has less processing overhead). The options are Full Res, Half Res, Quarter Res and Eighth Res. 这让你选择贴图是否按最大分辨率或它的一部分来显示(低分辨率开销更少).这些选项是:完全分辨率,半分辨率,四分之一分辨率和八分之一分辨率. |
Anisotropic Textures 各向异性贴图 | This enables if and how anisotropic textures will be used. The options are Disabled, Per Texture and Forced On (ie, always enabled). 如果使用各向异性贴图这将选项将激活.此选项包括:禁用,每张贴图和强制(即,总是激活) |
AntiAliasing 反锯齿 | This sets the level of antialiasing that will be used. The options are 2x, 4x and8x multi-sampling. 这设置反锯齿的级别,包括:2倍,4倍和8倍多重采样. |
Soft Particles 软粒子 | Should soft blending be used for particles? 粒子是否使用软融合? |
Realtime Reflection Probes 实时反射探头 | Should reflection probes be updated during gameplay? 在游戏期间是否更新反射探头? |
Shadows 阴影 |
|
Shadows 阴影 | This determines which type of shadows should be used. The available options are Hard and Soft Shadows, Hard Shadows Only and Disable Shadows. 这决定哪种类型的阴影可以使用.可用选项是硬和软阴影,仅硬阴影和禁用阴影. |
Shadow resolution 阴影分辨率 | Shadows can be rendered at several different resolutions: Low, Medium, Highand Very High. The higher the resolution, the greater the processing overhead. 阴影可被渲染为几个不同分辨率:低,中,高和非常高.更高分辨率更高处理开销. |
Shadow Projection 阴影投射 | There are two different methods for projecting shadows from a directional light. Close Fit renders higher resolution shadows but they can sometimes wobble slightly if the camera moves. Stable Fit renders lower resolution shadows but they don’t wobble with camera movements. 这里有两种不同的方法用于投射来自一个平行光的阴影.紧密配合:渲染高分辨率阴影但当摄像机移动时它们有时会有轻微的晃动.稳定配合:渲染低分辨率阴影但它们不会随着摄像机移动而出现晃动. |
Shadow Cascades 阴影串连 | The number of shadow cascades can be set to zero, two or four. A higher number of cascades gives better quality but at the expense of processing overhead (see the Directional Shadows page for further details). 阴影串联数量可设置为0,2或4.一个更高数量的串联提供更好的质量但以处理开销为代价(参考”平行阴影”页面). |
Shadow Distance 阴影距离 | The maximum distance from camera at which shadows will be visible. Shadows that fall beyond this distance will not be rendered. 离摄像机多远内的阴影为可见的.超过此距离的阴影将不会被渲染. |
Shadow Near Plane Offset 阴影靠近平面抵消 | Offset shadow near plane to account for large triangles being distorted by shadow pancaking. 抵消阴影靠近平面以解释大三角形在阴影着陆时存在扭曲. |
Other 其他 |
|
Blend Weights 混合权重 | The number of bones that can affect a given vertex during an animation. The available options are one, two or four bones. 动画中骨骼数量可影响一个给定的顶点.适合的数量是1,2或4. |
VSync Count 垂直同步计数 | Rendering can be synchronised with the refresh rate of the display device to avoid “tearing” artifacts (see below). You can choose to synchronise with every vertical blank (VBlank), every second vertical blank or not to synchronise at all. 渲染可和显示设备刷新率同步以避免出现”画面撕裂” |
LOD Bias 细节级别偏移 | LOD levels are chosen based on the onscreen size of an object. When the size is between two LOD levels, the choice can be biased toward the less detailed or more detailed of the two models available. This is set as a fraction from 0 to +infinity. When it is set between 0 and 1 it favors less detail. A setting of more than 1 favors greater detail. For example, setting LOD Bias to 2 and having it change at 50% distance, LOD actually only changes on 25%. 细节级别的选择基于一个对象在屏幕上的大小.当大小在两个细节级别之间时,选择偏向更少细节或更多细节这两种模式都可以.当它设为0到1之间时它倾向于更少细节.设置高于1倾向于更多细节.例如,设置层次偏移为2并把它的距离改为50%,当前细节仅改变25%. |
Maximum LOD Level 最大细节级别 | The highest LOD that will be used by the game. See note below for more Information. 用于游戏的最高细节级别.查看下面注释获取更多信息. |
Particle Raycast Budget 粒子光线投射预算 | The maximum number of raycasts to use for approximate particle system collisions (those with Medium or Low quality). See Particle System Collision Module. 用于粒子系统碰撞的最大光线投射数量(这些跟随中或低质量).参考”粒子系统碰撞模型”. |
Async Upload Time Slice 异步上传时间片 | The amount of CPU time in milliseconds per frame to spend uploading buffered textures to the GPU. See Async Texture Upload. Cpu时间要多少毫秒每帧缓冲贴图可上传到GPU.参考”异步贴图上传”. |
Async Upload Buffer Size 异步上传缓冲区大小 | The size in MB for the Async Upload buffer. See Async Texture Upload. 异步上传缓冲区的大小,以MB为单位.参考”异步贴图上传” |
Maximum LOD level
最大细节级别
Models which have a LOD below the Maximum LOD level will not be used and omitted from the build (which will save storage and memory space). Unity will use the smallest LOD value from all the MaximumLOD values linked with the quality settings for the target platform. If an LOD level is included then models from that LODGroup will be included in the build and always loaded at runtime for that LODGroup, regardless of the quality setting being used. As an example, if LOD level 0 is used in any quality setting then all the LOD levels will be included in the build and all the referenced models loaded at runtime.
模型有一个细节级别,低于最大细节级别将不被使用且从构建中忽略掉(这将保存在存储器和内存空间中).Unity将使用来自所有最大细节级别值的最小细节级别值关联的质量设置给目标平台.如果一个细节级别被包含则来自这个细节级别组的模型将被包含到构建内且总是随此细节级别组实时加载,不管质量设置是否使用.例如,如果细节级别0被用于任何质量设置则所有细节级别将被包含在构建内且所有引用的模型都实时加载.
Tearing
撕裂
The picture on the display device is not continuously updated but rather the updates happen at regular intervals much like frame updates in Unity. However, Unity’s updates are not necessarily synchronised with those of the display, so it is possible for Unity to issue a new frame while the display is still rendering the previous one. This will result in a visual artifact called “tearing” at the position onscreen where the frame change occurs.
图片在显示设备上不能连续的更新反而更新经常发生间隔,就像Unity中的帧更新.不过,Unity的更新不一定与显示设备同步,因此这可能会造成Unity发布了一个新的帧而显示依旧在渲染以前的帧.这将导致一种被称为”撕裂”的视觉效果出现在帧变化的位置.
Simulated example of tearing. The shift in the picture is clearly visible in the magnified portion.
撕裂的模拟例子.图片偏移可清晰的在放大部分看到
It is possible to set Unity to switch frames only during the period where the display device is not updating, the so-called “vertical blank”. The VSync option on the Quality Settings synchronises frame switches with the device’s vertical blank or optionally with every other vertical blank. The latter may be useful if the game requires more than one device update to complete the rendering of a frame.
只有在显示设备未更新期间(即所谓的”垂直空白”)才可能设置Unity去切换帧.在质量设置中的垂直同步选项使帧切换和设备的垂直空白期同步或随便与其他垂直空白期同步.如果游戏需要多个设备来完成一个帧的渲染,后者将是有用的.
Anti-aliasing
抗锯齿
Anti aliasing improves the appearance of polygon edges, so they are not “jagged”, but smoothed out on the screen. However, it incurs a performance cost for the graphics card and uses more video memory (there’s no cost on the CPU though). The level of anti-aliasing determines how smooth polygon edges are (and how much video memory does it consume).
抗锯齿改善了多边形边缘的外观,使它们没有锯齿状.然而,这导致显卡性能消耗和需要更多显存(尽管没有CPU的代价).抗锯齿的级别决定了多边形边缘的平滑度(和多大显存消耗).
Without anti-aliasing, polygon edges are “jagged”.
没有抗锯齿,多边形边缘是”锯齿状的”
With 4x anti-aliasing, polygon edges are smoothed out.
使用4倍抗锯齿,多边形边缘被平滑了.
However, built-in hardware anti-aliasing does not work with Deferred Shading or HDR rendering; for these cases you’ll need to use Antialiasing Image Effect.
然而,内置的硬件抗锯齿不能工作在延迟着色或高动态光照渲染;对于这些问题你将需要使用”抗锯齿图像效果”
Soft Particles
软粒子
Soft Particles fade out near intersections with other scene geometry. This looks much nicer, however it’s more expensive to compute (more complex pixel shaders), and only works on platforms that support depth textures. Furthermore, you have to use Deferred Shading or Legacy Deferred Lighting rendering path, or make the camera render depth textures from scripts.
软粒子在靠近另一个场景几何学结构时逐渐淡出.这看起来好得多,然而需要更多的计算(更复杂的像素着色),且仅工作在支持深度纹理的平台上.此外,你可以使用”延迟渲染”或”遗留延迟光照”渲染通道,或者通过脚本使得摄像机渲染”深度纹理”.
Without Soft Particles - visible intersections with the scene.
未使用软粒子-可见和其他场景的交叉点.
With Soft Particles - intersections fade out smoothly.
使用软粒子-交叉点平滑地淡出.