|
| 1 | +--- |
| 2 | +title: Using Arm ASR in Unreal Engine |
| 3 | +weight: 3 |
| 4 | + |
| 5 | +### FIXED, DO NOT MODIFY |
| 6 | +layout: learningpathall |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | +## Introduction |
| 11 | + |
| 12 | +This guide describes how to get started with Arm® Accuracy Super Resolution™ (Arm ASR) through an example project in Unreal Engine. It is for Unreal Engine developers who want to apply upscaling techniques to their projects. You will walk through the processes of installing Arm ASR and some of the common tasks that you might encounter when setting up Arm ASR for the first time. |
| 13 | + |
| 14 | +## Before you begin |
| 15 | + |
| 16 | +We recommend using Unreal Engine versions 5.3-5.5 through this tutorial. Please get in contact with us at [email protected] if you have any questions. |
| 17 | + |
| 18 | +## Installing the Arm ASR plugin |
| 19 | + |
| 20 | +The following steps describe how to install the Arm ASR plugin in Unreal Engine: |
| 21 | + |
| 22 | +1. Open the Unreal Engine project you intend to use with Arm ASR. The Third Person pack is available as an example. |
| 23 | + |
| 24 | +  |
| 25 | + |
| 26 | +2. Download the plugin by cloning the repository. |
| 27 | + |
| 28 | + ``` |
| 29 | + git clone https://github.com/arm/accuracy-super-resolution-for-unreal |
| 30 | + ``` |
| 31 | +
|
| 32 | +3. Navigate to the `UE` directory in the cloned repository. This contains directories containing the plugin for each supported version of Unreal Engine. |
| 33 | +
|
| 34 | +4. From the directory for your version of Unreal Engine, copy the Arm ASR plugin into the `Plugins` folder in the game directory. |
| 35 | +
|
| 36 | +  |
| 37 | +
|
| 38 | +  |
| 39 | +
|
| 40 | +5. Navigate back to your Unreal Engine project. |
| 41 | +
|
| 42 | +6. When the pop-up window opens asking to build Arm ASR, select **Yes**. |
| 43 | +
|
| 44 | +  |
| 45 | +
|
| 46 | +## Enable and configure Arm ASR |
| 47 | +
|
| 48 | +After reopening the Unreal Engine project, the Arm ASR plugin should be enabled. |
| 49 | +
|
| 50 | +1. Go to **Edit > Plugins**, and search for Arm ASR. Make sure Arm ASR is checked. |
| 51 | +
|
| 52 | +  |
| 53 | +
|
| 54 | +  |
| 55 | +
|
| 56 | +1. To enable Arm ASR upscaling, open **Project Settings** and change the Anti-Aliasing Method to **Temporal Anti-Aliasing**. |
| 57 | +
|
| 58 | + {{% notice %}} |
| 59 | + **Mobile Anti-Aliasing Method** is used for the mobile renderer, however this tutorial describes the desktop renderer. You can learn about other available renderers by studying the `README.md` of the `accuracy-super-resolution-for-unreal` repository. |
| 60 | + {{% /notice %}} |
| 61 | +
|
| 62 | +  |
| 63 | +
|
| 64 | +1. To check that Arm ASR is enabled and working, use the `ShowFlag.VisualizeTemporalUpscaler 1` console command. If Arm ASR is working, you will see Arm ASR listed as the **ThirdParty TemporalUpscaler** in the command window. |
| 65 | +
|
| 66 | + {{% notice %}} |
| 67 | + When you use the `ShowFlag.VisualizeTemporalUpscaler 1` console command, the debug views are not generated from Arm ASR but from Unreal Engines TAA. |
| 68 | + {{% /notice %}} |
| 69 | +
|
| 70 | +  |
| 71 | +
|
| 72 | +1. If Arm ASR is not shown here, use the `r.ArmASR.Enable 1` console command to enable upscaling. |
| 73 | +
|
| 74 | +  |
| 75 | +
|
| 76 | +## Further configuration {.section} |
| 77 | +
|
| 78 | +There are two ways to configure further settings. |
| 79 | +
|
| 80 | +Option 1 is using the UI. Go to **Edit > Project Settings > Plugins > Arm ASR**. |
| 81 | +
|
| 82 | + |
| 83 | +
|
| 84 | +Option 2 is through the console. By typing `r.ArmASR.` into the console window, you can see the configuration options. |
| 85 | +
|
| 86 | + |
| 87 | +
|
| 88 | +For example, you can change the upscaling ratio by modifying the **ScreenPercentage**, via the command option `r.ScreenPercentage`. A value of `50.0` will mean that the plugin upscales frames by a factor of 2. |
| 89 | +
|
| 90 | +Arm ASR's behavior can be configured via the following plugin-specific console variables: |
| 91 | +
|
| 92 | +|Console Variable | Default Value | Value Range | Details | |
| 93 | +|:------------------------------------------------- | :------------ | :---------- | :----------------------------------------------------------------------------------------------------- | |
| 94 | +|`r.ArmASR.Enable` | 1 | 0, 1 | Enable / disable Arm ASR. | |
| 95 | +|`r.ArmASR.AutoExposure` | 0 | 0, 1 | Set to 1 to use Arm ASR’s own auto-exposure, otherwise the engine’s auto-exposure value is used. | |
| 96 | +|`r.ArmASR.Sharpness` | 0 | 0-1 | If greater than 0 this enables Robust Contrast Adaptive Sharpening Filter to sharpen the output image. | |
| 97 | +|`r.ArmASR.ShaderQuality` | 1 | 1, 2, 3 | Select shader quality preset: 1 - Quality, 2 - Balanced, 3 - Performance. | |
| 98 | +|`r.ArmASR.CreateReactiveMask` | 1 | 0-1 | Create the reactive mask. | |
| 99 | +|`r.ArmASR.ReactiveMaskReflectionScale` | 0.4 | 0-1 | Range from 0.0 to 1.0, scales the Unreal Engine reflection contribution to the reactive mask, which can be used to control the amount of aliasing on reflective surfaces. | |
| 100 | +|`r.ArmASR.ReactiveMaskRoughnessScale` | 0.15 | 0-1 | Range from 0.0 to 1.0, scales the GBuffer roughness to provide a fallback value for the reactive mask when screenspace & planar reflections are disabled or don't affect a pixel. | |
| 101 | +|`r.ArmASR.ReactiveMaskRoughnessBias` | 0.25 | 0-1 | Range from 0.0 to 1.0, biases the reactive mask value when screenspace/planar reflections are weak with the GBuffer roughness to account for reflection environment captures. | |
| 102 | +|`r.ArmASR.ReactiveMaskRoughnessMaxDistance` | 6000 | - | Maximum distance in world units for using material roughness to contribute to the reactive mask, the maximum of this value and View.FurthestReflectionCaptureDistance will be used. | |
| 103 | +|`r.ArmASR.ReactiveMaskRoughnessForceMaxDistance` | 0 | - | Enable to force the maximum distance in world units for using material roughness to contribute to the reactive mask rather than using View.FurthestReflectionCaptureDistance. | |
| 104 | +|`r.ArmASR.ReactiveMaskReflectionLumaBias` | 0 | 0-1 | Range from 0.0 to 1.0, biases the reactive mask by the luminance of the reflection. Use to balance aliasing against ghosting on brightly lit reflective surfaces. | |
| 105 | +|`r.ArmASR.ReactiveHistoryTranslucencyBias` | 0.5 | 0-1 | Range from 0.0 to 1.0, scales how much translucency suppresses history via the reactive mask. Higher values will make translucent materials more reactive which can reduce smearing. | |
| 106 | +|`r.ArmASR.ReactiveHistoryTranslucencyLumaBias` | 0 | 0-1 | Range from 0.0 to 1.0, biases how much the translucency suppresses history via the reactive mask by the luminance of the transparency. Higher values will make bright translucent materials more reactive which can reduce smearing. | |
| 107 | +|`r.ArmASR.ReactiveMaskTranslucencyBias` | 1 | 0-1 | Range from 0.0 to 1.0, scales how much contribution translucency makes to the reactive mask. Higher values will make translucent materials more reactive which can reduce smearing. | |
| 108 | +|`r.ArmASR.ReactiveMaskTranslucencyLumaBias` | 0 | 0-1 | Range from 0.0 to 1.0, biases the translucency contribution to the reactive mask by the luminance of the transparency. Higher values will make bright translucent materials more reactive which can reduce smearing. | |
| 109 | +|`r.ArmASR.ReactiveMaskTranslucencyMaxDistance` | 500000 | - | Maximum distance in world units for using translucency to contribute to the reactive mask. This is a way to remove sky-boxes and other back-planes from the reactive mask, at the expense of nearer translucency not being reactive. | |
| 110 | +|`r.ArmASR.ReactiveMaskForceReactiveMaterialValue` | 0 | 0, 1 | Force the reactive mask value for Reactive Shading Model materials, when > 0 this value can be used to override the value supplied in the Material Graph. | |
| 111 | +|`r.ArmASR.ReactiveMaskReactiveShadingModelID` | MSM_NUM | - | Treat the specified shading model as reactive, taking the CustomData0.x value as the reactive value to write into the mask. | |
| 112 | +
|
| 113 | +
|
| 114 | +You are now ready to use Arm ASR in your Unreal Engine projects. You can use [Arm Performance Studio](https://developer.arm.com/Tools%20and%20Software/Arm%20Performance%20Studio) tools to measure the performance of your game as it runs on a mobile device, allowing you to monitor the effect of Arm ASR. |
0 commit comments