UE4 Scalability Reference

1649 篇文章 11 订阅
1623 篇文章 22 订阅


The Scalability settings allow you to adjust the quality of various features in order to maintain the best performance for your game on different platforms and hardware.

Scalability Settings

Accessing the Scalability settings in the editor is done through the Quick Settings menu in the toolbar icon_view_40x.png. The Engine Scalability Settingscontains short cuts to the most commonly used setting defined in the BaseScalability.ini file, while Material Quality Level sets the global material quality setting.

Resolution Scale

Unreal Engine 4 can render a scene in lower resolution and scale the image up to the target resolution. As 2D User interfaces usually costs less performance and suffers more from lower resolution, Unreal Engine 4 does not apply this technique to UI. There is a minor cost for the up-sampling pass, but usually it is worth the effort.

SC_00007.png

Left: 50% no AA, Middle: 50% with AA, Right: 100% (no resolution scale) with AA

Having a softer input image helps the up-sampling step. This means this scalability options benefits from another scalability option: the anti-aliasing quality.

This setting can be access with the r.ScreenPercentage console variable. It takes in a value from 10-100 with -1 also equaling 100%.

View Distance

Objects can be culled based on their distance to the viewer. By default, all objects are not distance culled (Desired max draw distance of 0). On top of the designer specified value, there is a global scalability setting working like a multiplier (r.ViewDistanceScale). Here you can see some grass objects (Desired max draw distance of 1000):

SC_00006.png

left: r.ViewDistanceScale 0.4, middle: r.ViewDistanceScale 0.7, right: r.ViewDistanceScale 1.0 (default)

Anti-Aliasing

From the left: r.PostProcessAAQuality 0 to 6. The first 3 equal the LowMediumHigh/Epic settings in the View -> Scalability Options -> AA settings.

Adjusting the Anti-Aliasing quality level using the r.PostProcessAAQuality console command will adjust the quality of which ever Anti-Aliasing method you are using (FXAA or Temporal AA). For either Anti-Aliasing method, a value of 0 used with r.PostProcessAAQuality will disable the effect. For FXAA, the effect of values 2, 4, and 6, can be seen in the above image; the smoothing of jagged edges becomes better and better. Values above 6 have no effect.

For Temporal AA, there is a trade off between fill speed of the effect and quality, the higher the value you use. r.PostProcessAAQuality 2 with Temporal AA is fast to settle but jitter caused by the effect will be more pronounced. r.PostProcessAAQuality 4 will settle slower but will not jitter.

Post Processing - sg.PostProcessQuality

sg.PostProcessQuality set from 0 on the left to 3 on the right.

The View -> Engine Scalability Settings -> Post Processing option adjusts the quality of the Post Processing effects in accordance with the settings found in the BaseScalaiblity.ini file located in [UE4_InstallPath]/Engine/Config folder. With the Low setting equating to sg.PostProcessQuality 0 and Epic to sg.PostProcessQuality 3.

sg.PostProcessQuality 0 sg.PostProcessQuality 1
r.MotionBlurQuality=0
r.BlurGBuffer=0
r.AmbientOcclusionLevels=0
r.AmbientOcclusionRadiusScale=1.7
r.DepthOfFieldQuality=0
r.RenderTargetPoolMin=300
r.LensFlareQuality=0
r.SceneColorFringeQuality=0
r.EyeAdaptationQuality=0
r.BloomQuality=4
r.FastBlurThreshold=0
r.Upscale.Quality=1
r.TonemapperQuality=0
r.MotionBlurQuality=3
r.BlurGBuffer=0
r.AmbientOcclusionLevels=1
r.AmbientOcclusionRadiusScale=1.7
r.DepthOfFieldQuality=1
r.RenderTargetPoolMin=350
r.LensFlareQuality=0
r.SceneColorFringeQuality=0
r.EyeAdaptationQuality=0
r.BloomQuality=4
r.FastBlurThreshold=2
r.Upscale.Quality=2
r.TonemapperQuality=0
sg.PostProcessQuality 2 sg.PostProcessQuality 3
r.MotionBlurQuality=3
r.BlurGBuffer=-1
r.AmbientOcclusionLevels=2
r.AmbientOcclusionRadiusScale=1.5
r.DepthOfFieldQuality=2
r.RenderTargetPoolMin=400
r.LensFlareQuality=2
r.SceneColorFringeQuality=1
r.EyeAdaptationQuality=2
r.BloomQuality=5
r.FastBlurThreshold=3
r.Upscale.Quality=2
r.TonemapperQuality=1
r.MotionBlurQuality=4
r.BlurGBuffer=-1
r.AmbientOcclusionLevels=3
r.AmbientOcclusionRadiusScale=1.0
r.DepthOfFieldQuality=2
r.RenderTargetPoolMin=400
r.LensFlareQuality=2
r.SceneColorFringeQuality=1
r.EyeAdaptationQuality=2
r.BloomQuality=5
r.FastBlurThreshold=7
r.Upscale.Quality=3
r.TonemapperQuality=1

Shadows - sg.ShadowQuality

sg.ShadowQuality set from 0 on the left to 3 on the right.

The View -> Engine Scalability Settings -> Shadows option adjusts the quality of dynamic shadows in accordance with the settings found in the BaseScalaiblity.ini file located in [UE4_InstallPath]/Engine/Config folder. With the Low setting equating to sg.ShadowQuality 0 and Epic to sg.ShadowQuality 3.

sg.ShadowQuality 0 sg.ShadowQuality 1
r.LightFunctionQuality=0
r.ShadowQuality=0
r.Shadow.CSM.MaxCascades=1
r.Shadow.MaxResolution=512
r.Shadow.RadiusThreshold=0.06
r.Shadow.DistanceScale=0.6
r.Shadow.CSM.TransitionScale=0
r.LightFunctionQuality=1
r.ShadowQuality=2
r.Shadow.CSM.MaxCascades=1
r.Shadow.MaxResolution=1024
r.Shadow.RadiusThreshold=0.05
r.Shadow.DistanceScale=0.7
r.Shadow.CSM.TransitionScale=0.25
sg.ShadowQuality 2 sg.ShadowQuality 3
r.LightFunctionQuality=1
r.ShadowQuality=5
r.Shadow.CSM.MaxCascades=2
r.Shadow.MaxResolution=1024
r.Shadow.RadiusThreshold=0.04
r.Shadow.DistanceScale=0.85
r.Shadow.CSM.TransitionScale=0.8
r.LightFunctionQuality=1
r.ShadowQuality=5
r.Shadow.CSM.MaxCascades=4
r.Shadow.MaxResolution=1024
r.Shadow.RadiusThreshold=0.03
r.Shadow.DistanceScale=1.0
r.Shadow.CSM.TransitionScale=1.0

Textures - sg.TextureQuality

A modern rendering engine requires a lot more GPU memory (textures, meshes, GBuffer, Depth Buffer, Shadow maps). Some of those scale with the screen resolution (e.g. GBuffer), others with specific quality settings (e.g. Shadow maps). Another large amount comes from the used textures (usually compressed and streamed). You can instruct the streaming system to be more aggressive in management (smaller pool size, culling unused textures) or to have less or more detail in the mip level computation. This can have effects on the image quality, how much you can notice texture streaming artifacts and how smooth the game runs (updates require expensive memory transfers). The results can vary, depending on the media (e.g. faster/lower hard drive /SSD). Streaming from a DVD/Blu-Ray adds much more latency so you should try to avoid that.

The texture quality also affects the texture filtering mode (r.MaxAnisotropy). Limiting the anisotropic sample count reduces texture bandwidth, but does not save texture memory.

sg.TextureQuality 0 sg.TextureQuality 1
r.Streaming.MipBias=2.5
r.MaxAnisotropy=0
r.Streaming.PoolSize=200
r.Streaming.MipBias=1
r.MaxAnisotropy=2
r.Streaming.PoolSize=400
sg.TextureQuality 2 sg.TextureQuality 3
r.Streaming.MipBias=0
r.MaxAnisotropy=4
r.Streaming.PoolSize=700
r.Streaming.MipBias=0
r.MaxAnisotropy=8
r.Streaming.PoolSize=1000

The effect of this feature is heavily dependent on your game and hardware. If you do not have many textures, to the point where loading and using the full resolution mip maps does not use all of the memory pool Unreal Engine 4 has devoted to textures, you will not actually see a difference between high and low settings (outside of the change to the Anisotropy settings).

Effects - sg.EffectsQuality

The View -> Engine Scalability Settings -> Effects option adjusts the quality of many different types of effects in accordance with the settings found in the BaseScalaiblity.ini file located in [UE4_InstallPath]/Engine/Config folder. With the Low setting equating to sg.EffectsQuality 0 andEpic to sg.EffectsQuality 3.

sg.EffectsQuality 0 sg.EffectsQuality 1
r.TranslucencyLightingVolumeDim=24
r.RefractionQuality=0
r.SSR=0
r.SceneColorFormat=3
r.DetailMode=0
r.TranslucencyVolumeBlur=0
r.MaterialQualityLevel=0
r.TranslucencyLightingVolumeDim=32
r.RefractionQuality=0
r.SSR=0
r.SceneColorFormat=3
r.DetailMode=1
r.TranslucencyVolumeBlur=0
r.MaterialQualityLevel=1
sg.EffectsQuality 2 sg.EffectsQuality 3
r.TranslucencyLightingVolumeDim=48
r.RefractionQuality=2
r.SSR=0
r.SceneColorFormat=3
r.DetailMode=1
r.TranslucencyVolumeBlur=1
r.MaterialQualityLevel=1
r.TranslucencyLightingVolumeDim=64
r.RefractionQuality=2
r.SSR=1
r.SceneColorFormat=4
r.DetailMode=2
r.TranslucencyVolumeBlur=1
r.MaterialQualityLevel=1

Detail Mode

Each placed Actor has a Detail Mode property in the Rendering category. Essentially this setting defines the minimum detail level for an Actor to render.

SC_00008.png

The scalability mode can be changed from the console:

r.DetailMode 1

With r.DetailMode 0 = low, r.DetailMode 1 = medium and, r.DetailMode 2 = high detail modes.

SC_00005.png

It is easy to use this to disable decals, detail objects, lights or individual particle effects. Make sure to only use this on objects that have no effect on gameplay, otherwise you will run into problems with network gameplay, save games, or consistency.

Material Quality Level

ScaleR_ViewMatQual.png

Material can use the "Quality Switch" material expression to disable some expensive material parts that have minor effect on the final look. To see the effect of this, you need to toggle to the low quality mode.

Whatever the Material Quality Level is set to, low or high, will determine which expressions get evaluated for this material (the low or high pin). The default pin will fill in either high or low (or both) if they have no inputs. This material contains 2 reasonably high cost Perlin noise operations when set to high:

This example is to simply show off the Material Switch Node. The Noise nodes are really expensive making them really good for this example, but they should be used sparingly as there are cheaper ways to get this effect.

Material Quality Level -> Low

Material Quality Level -> High

SC_Closeup.png

SC_MirrorComplexity.png

Above, Shader Complexity mode shows us that our high quality material is more costly than other shaders, with darker greens meaning more costly shaders.

Using the quality switch causes more shaders to be compiled (shader permutation).

This feature is not for distance LOD as you cannot have two quality levels at the same time. The feature can be used to reduce:

  • Shader computations (e.g. disable fuzz layer).

    • Use Shader Complexity (Alt+8 in the editor) mode and instruction count to verify your optimization.

  • Texture lookups (e.g. no detail bump map).

  • Memory bandwidth (e.g. using less textures).

    • You would need to profile on actual hardware to verify this.

Most material editor outputs only affect the pixel shader. World position offset and all tessellation outputs affect the other shader types. Pixels shaders only cost a lot if they occupy large portions of the screen (skybox for example), while other shaders only matter if the object is not culled (inside the view, not hidden behind opaque objects).

Skeletal Mesh LOD Bias

SC_Skeletal.png

Skeletal meshes can have static Level of Details models. With the console variable r.SkeletalMeshLODBias, it is possible to globally bias the LOD level. Depending on the quality of your first or second LOD, it might be a good idea to have this option in the scalability settings. Here you can see the scalability setting on top if the distance dependent LOD.

The Scalability settings allow you to adjust the quality of various features in order to maintain the best performance for your game on different platforms and hardware.

Scalability Settings

Accessing the Scalability settings in the editor is done through the Quick Settings menu in the toolbar icon_view_40x.png. The Engine Scalability Settingscontains short cuts to the most commonly used setting defined in the BaseScalability.ini file, while Material Quality Level sets the global material quality setting.

Resolution Scale

Unreal Engine 4 can render a scene in lower resolution and scale the image up to the target resolution. As 2D User interfaces usually costs less performance and suffers more from lower resolution, Unreal Engine 4 does not apply this technique to UI. There is a minor cost for the up-sampling pass, but usually it is worth the effort.

SC_00007.png

Left: 50% no AA, Middle: 50% with AA, Right: 100% (no resolution scale) with AA

Having a softer input image helps the up-sampling step. This means this scalability options benefits from another scalability option: the anti-aliasing quality.

This setting can be access with the r.ScreenPercentage console variable. It takes in a value from 10-100 with -1 also equaling 100%.

View Distance

Objects can be culled based on their distance to the viewer. By default, all objects are not distance culled (Desired max draw distance of 0). On top of the designer specified value, there is a global scalability setting working like a multiplier (r.ViewDistanceScale). Here you can see some grass objects (Desired max draw distance of 1000):

SC_00006.png

left: r.ViewDistanceScale 0.4, middle: r.ViewDistanceScale 0.7, right: r.ViewDistanceScale 1.0 (default)

Anti-Aliasing

From the left: r.PostProcessAAQuality 0 to 6. The first 3 equal the LowMediumHigh/Epic settings in the View -> Scalability Options -> AA settings.

Adjusting the Anti-Aliasing quality level using the r.PostProcessAAQuality console command will adjust the quality of which ever Anti-Aliasing method you are using (FXAA or Temporal AA). For either Anti-Aliasing method, a value of 0 used with r.PostProcessAAQuality will disable the effect. For FXAA, the effect of values 2, 4, and 6, can be seen in the above image; the smoothing of jagged edges becomes better and better. Values above 6 have no effect.

For Temporal AA, there is a trade off between fill speed of the effect and quality, the higher the value you use. r.PostProcessAAQuality 2 with Temporal AA is fast to settle but jitter caused by the effect will be more pronounced. r.PostProcessAAQuality 4 will settle slower but will not jitter.

Post Processing - sg.PostProcessQuality

sg.PostProcessQuality set from 0 on the left to 3 on the right.

The View -> Engine Scalability Settings -> Post Processing option adjusts the quality of the Post Processing effects in accordance with the settings found in the BaseScalaiblity.ini file located in [UE4_InstallPath]/Engine/Config folder. With the Low setting equating to sg.PostProcessQuality 0 and Epic to sg.PostProcessQuality 3.

sg.PostProcessQuality 0 sg.PostProcessQuality 1
r.MotionBlurQuality=0
r.BlurGBuffer=0
r.AmbientOcclusionLevels=0
r.AmbientOcclusionRadiusScale=1.7
r.DepthOfFieldQuality=0
r.RenderTargetPoolMin=300
r.LensFlareQuality=0
r.SceneColorFringeQuality=0
r.EyeAdaptationQuality=0
r.BloomQuality=4
r.FastBlurThreshold=0
r.Upscale.Quality=1
r.TonemapperQuality=0
r.MotionBlurQuality=3
r.BlurGBuffer=0
r.AmbientOcclusionLevels=1
r.AmbientOcclusionRadiusScale=1.7
r.DepthOfFieldQuality=1
r.RenderTargetPoolMin=350
r.LensFlareQuality=0
r.SceneColorFringeQuality=0
r.EyeAdaptationQuality=0
r.BloomQuality=4
r.FastBlurThreshold=2
r.Upscale.Quality=2
r.TonemapperQuality=0
sg.PostProcessQuality 2 sg.PostProcessQuality 3
r.MotionBlurQuality=3
r.BlurGBuffer=-1
r.AmbientOcclusionLevels=2
r.AmbientOcclusionRadiusScale=1.5
r.DepthOfFieldQuality=2
r.RenderTargetPoolMin=400
r.LensFlareQuality=2
r.SceneColorFringeQuality=1
r.EyeAdaptationQuality=2
r.BloomQuality=5
r.FastBlurThreshold=3
r.Upscale.Quality=2
r.TonemapperQuality=1
r.MotionBlurQuality=4
r.BlurGBuffer=-1
r.AmbientOcclusionLevels=3
r.AmbientOcclusionRadiusScale=1.0
r.DepthOfFieldQuality=2
r.RenderTargetPoolMin=400
r.LensFlareQuality=2
r.SceneColorFringeQuality=1
r.EyeAdaptationQuality=2
r.BloomQuality=5
r.FastBlurThreshold=7
r.Upscale.Quality=3
r.TonemapperQuality=1

Shadows - sg.ShadowQuality

sg.ShadowQuality set from 0 on the left to 3 on the right.

The View -> Engine Scalability Settings -> Shadows option adjusts the quality of dynamic shadows in accordance with the settings found in the BaseScalaiblity.ini file located in [UE4_InstallPath]/Engine/Config folder. With the Low setting equating to sg.ShadowQuality 0 and Epic to sg.ShadowQuality 3.

sg.ShadowQuality 0 sg.ShadowQuality 1
r.LightFunctionQuality=0
r.ShadowQuality=0
r.Shadow.CSM.MaxCascades=1
r.Shadow.MaxResolution=512
r.Shadow.RadiusThreshold=0.06
r.Shadow.DistanceScale=0.6
r.Shadow.CSM.TransitionScale=0
r.LightFunctionQuality=1
r.ShadowQuality=2
r.Shadow.CSM.MaxCascades=1
r.Shadow.MaxResolution=1024
r.Shadow.RadiusThreshold=0.05
r.Shadow.DistanceScale=0.7
r.Shadow.CSM.TransitionScale=0.25
sg.ShadowQuality 2 sg.ShadowQuality 3
r.LightFunctionQuality=1
r.ShadowQuality=5
r.Shadow.CSM.MaxCascades=2
r.Shadow.MaxResolution=1024
r.Shadow.RadiusThreshold=0.04
r.Shadow.DistanceScale=0.85
r.Shadow.CSM.TransitionScale=0.8
r.LightFunctionQuality=1
r.ShadowQuality=5
r.Shadow.CSM.MaxCascades=4
r.Shadow.MaxResolution=1024
r.Shadow.RadiusThreshold=0.03
r.Shadow.DistanceScale=1.0
r.Shadow.CSM.TransitionScale=1.0

Textures - sg.TextureQuality

A modern rendering engine requires a lot more GPU memory (textures, meshes, GBuffer, Depth Buffer, Shadow maps). Some of those scale with the screen resolution (e.g. GBuffer), others with specific quality settings (e.g. Shadow maps). Another large amount comes from the used textures (usually compressed and streamed). You can instruct the streaming system to be more aggressive in management (smaller pool size, culling unused textures) or to have less or more detail in the mip level computation. This can have effects on the image quality, how much you can notice texture streaming artifacts and how smooth the game runs (updates require expensive memory transfers). The results can vary, depending on the media (e.g. faster/lower hard drive /SSD). Streaming from a DVD/Blu-Ray adds much more latency so you should try to avoid that.

The texture quality also affects the texture filtering mode (r.MaxAnisotropy). Limiting the anisotropic sample count reduces texture bandwidth, but does not save texture memory.

sg.TextureQuality 0 sg.TextureQuality 1
r.Streaming.MipBias=2.5
r.MaxAnisotropy=0
r.Streaming.PoolSize=200
r.Streaming.MipBias=1
r.MaxAnisotropy=2
r.Streaming.PoolSize=400
sg.TextureQuality 2 sg.TextureQuality 3
r.Streaming.MipBias=0
r.MaxAnisotropy=4
r.Streaming.PoolSize=700
r.Streaming.MipBias=0
r.MaxAnisotropy=8
r.Streaming.PoolSize=1000

The effect of this feature is heavily dependent on your game and hardware. If you do not have many textures, to the point where loading and using the full resolution mip maps does not use all of the memory pool Unreal Engine 4 has devoted to textures, you will not actually see a difference between high and low settings (outside of the change to the Anisotropy settings).

Effects - sg.EffectsQuality

The View -> Engine Scalability Settings -> Effects option adjusts the quality of many different types of effects in accordance with the settings found in the BaseScalaiblity.ini file located in [UE4_InstallPath]/Engine/Config folder. With the Low setting equating to sg.EffectsQuality 0 andEpic to sg.EffectsQuality 3.

sg.EffectsQuality 0 sg.EffectsQuality 1
r.TranslucencyLightingVolumeDim=24
r.RefractionQuality=0
r.SSR=0
r.SceneColorFormat=3
r.DetailMode=0
r.TranslucencyVolumeBlur=0
r.MaterialQualityLevel=0
r.TranslucencyLightingVolumeDim=32
r.RefractionQuality=0
r.SSR=0
r.SceneColorFormat=3
r.DetailMode=1
r.TranslucencyVolumeBlur=0
r.MaterialQualityLevel=1
sg.EffectsQuality 2 sg.EffectsQuality 3
r.TranslucencyLightingVolumeDim=48
r.RefractionQuality=2
r.SSR=0
r.SceneColorFormat=3
r.DetailMode=1
r.TranslucencyVolumeBlur=1
r.MaterialQualityLevel=1
r.TranslucencyLightingVolumeDim=64
r.RefractionQuality=2
r.SSR=1
r.SceneColorFormat=4
r.DetailMode=2
r.TranslucencyVolumeBlur=1
r.MaterialQualityLevel=1

Detail Mode

Each placed Actor has a Detail Mode property in the Rendering category. Essentially this setting defines the minimum detail level for an Actor to render.

SC_00008.png

The scalability mode can be changed from the console:

r.DetailMode 1

With r.DetailMode 0 = low, r.DetailMode 1 = medium and, r.DetailMode 2 = high detail modes.

SC_00005.png

It is easy to use this to disable decals, detail objects, lights or individual particle effects. Make sure to only use this on objects that have no effect on gameplay, otherwise you will run into problems with network gameplay, save games, or consistency.

Material Quality Level

ScaleR_ViewMatQual.png

Material can use the "Quality Switch" material expression to disable some expensive material parts that have minor effect on the final look. To see the effect of this, you need to toggle to the low quality mode.

Whatever the Material Quality Level is set to, low or high, will determine which expressions get evaluated for this material (the low or high pin). The default pin will fill in either high or low (or both) if they have no inputs. This material contains 2 reasonably high cost Perlin noise operations when set to high:

This example is to simply show off the Material Switch Node. The Noise nodes are really expensive making them really good for this example, but they should be used sparingly as there are cheaper ways to get this effect.

Material Quality Level -> Low

Material Quality Level -> High

SC_Closeup.png

SC_MirrorComplexity.png

Above, Shader Complexity mode shows us that our high quality material is more costly than other shaders, with darker greens meaning more costly shaders.

Using the quality switch causes more shaders to be compiled (shader permutation).

This feature is not for distance LOD as you cannot have two quality levels at the same time. The feature can be used to reduce:

  • Shader computations (e.g. disable fuzz layer).

    • Use Shader Complexity (Alt+8 in the editor) mode and instruction count to verify your optimization.

  • Texture lookups (e.g. no detail bump map).

  • Memory bandwidth (e.g. using less textures).

    • You would need to profile on actual hardware to verify this.

Most material editor outputs only affect the pixel shader. World position offset and all tessellation outputs affect the other shader types. Pixels shaders only cost a lot if they occupy large portions of the screen (skybox for example), while other shaders only matter if the object is not culled (inside the view, not hidden behind opaque objects).

Skeletal Mesh LOD Bias

SC_Skeletal.png

Skeletal meshes can have static Level of Details models. With the console variable r.SkeletalMeshLODBias, it is possible to globally bias the LOD level. Depending on the quality of your first or second LOD, it might be a good idea to have this option in the scalability settings. Here you can see the scalability setting on top if the distance dependent LOD.

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值