add topic: Optimizing Your Project for Higher FPS

This commit is contained in:
Mamadou Babaei
2024-08-15 16:22:01 +02:00
parent bb4d8669f0
commit 7d202ca0c0
14 changed files with 119 additions and 2 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ Welcom to the SenseGlove Unreal Engine Handbook!
- [SenseGlove Console Commands](misc/console-commands/README.md)
- [Deploying to Android (Standalone)](misc/android-standalone-deployment/README.md)
- [Upgrade Guide]()
- [Optimizing for More FPS]()
- [Optimizing for Higher FPS](misc/optimize-higher-fps/README.md)
# 🛠️ Advanced Topics
@@ -0,0 +1,84 @@
# Optimizing Your Project for Higher FPS
Enhancing the performance and framerate of Unreal Engine VR applications, whether running standalone or streaming from a PC, can sometimes be challenging depending on the nature of your project. This guide will walk you through generic strategies that can significantly boost your project's performance and framerate with minimal effort.
## Meta Quest Link Advanced Graphics Preferences
When streaming from a PC to Meta Quest devices, the default refresh rate is set at `72 Hz`. However, you can increase this to `120 Hz`, which not only enhances the refresh rate but also reduces the rendering resolution, potentially improving performance. Follow these steps to make the adjustment:
1. Open the Meta Quest Link app and navigate to the `Devices` tab.
![Meta Quest Link - Devices](meta-quest-link-devices.png "Meta Quest Link - Devices")
2. Choose the device for which you would like to tweak the refresh rate.
![Meta Quest Link - Selected device](meta-quest-link-device-selected.png "Meta Quest Link - Selected device")
3. In the device settings, scroll down to the `Advanced` section and select `Graphics Preferences`.
![Meta Quest Link - Device advanced graphics preferences](meta-quest-link-device-advanced-graphics-preferences.png "Meta Quest Link - Device advanced graphics preferences")
4. Choose your desired refresh rate. In this case select a refresh rate of `120 Hz`. After making your selection, click `OK`, and the Meta Quest Link app will restart to apply the changes.
![Meta Quest Link - Setting the device refresh rate](meta-quest-link-device-advanced-graphics-preferences-refresh-rate.png "Meta Quest Link - Setting the device refresh rate")
5. Once the Meta Quest Link app restarts, go back to the `Devices` tab, select your device, and confirm the refresh rate setting under `Advanced > Graphics Preferences`.
![Meta Quest Link - 120 Hz refresh rate](meta-quest-link-device-advanced-graphics-preferences-refresh-rate-120hz.png "Meta Quest Link - 120 Hz refresh rate")
6. Now, open your Unreal Engine project and navigate to `Project Settings`. Under `Engine > General Settings > Framerate`, you can fine-tune and experiment with the framerate settings to match your project's requirements.
![Meta Quest Link - Framerate settings for the Unreal project](project-settings-framerate.png "Meta Quest Link - Framerate settings for the Unreal project")
## Game User Settings and Engine Scalability Settings
Unreal Engine offers predefined graphics quality profiles known as Engine Scalability Settings, which can be easily adjusted to optimize performance. These settings can be modified directly within the Unreal Editor through the Settings menu on the toolbar or dynamically at runtime using code. Importantly, these settings are universal, meaning changes made in the Unreal Editor will apply to the game when run in PIE (Play In Editor) mode, and settings adjusted via code will also affect the editor itself.
![Game User Settings and Engine Scalability Settings - Unreal Editor Engine Scalability Settings](unreal-editor-engine-scalability-settings.png "Game User Settings and Engine Scalability Settings - Unreal Editor Engine Scalability Settings")
> [!NOTE]
> The SenseGlove Unreal Engine Plugin includes specialized
> [console commands](../../misc/console-commands/) that allow you to switch
> between different Engine Scalability Settings on the fly. Please note that
> these commands require you to set up
> [SGGameInstance](../../getting-started/setup-senseglove-default-classes/sggameinstance.md)
> and
> [`SGGameUserSettings`](../../getting-started/setup-senseglove-default-classes/sggameusersettings.md).
In order to switch between various Engine Scalability Settings, you can use the `Get Game User Settings` Blueprint function and then cast it to `SGGameInstance`.
![Game User Settings and Engine Scalability Settings - Get Engine Scalability Settings Blueprint Function](blueprint-function-get-game-user-settings.png "Game User Settings and Engine Scalability Settings - Get Engine Scalability Settings Blueprint Function")
> [!IMPORTANT]
> Unreal Engine's default Blueprint functions only allow you to set Engine
> Scalability Settings to `Low` or `Epic`. To access the full range of settings,
> `SGGameUserSettings` extends Blueprint access to all Engine Scalability
> Settings and includes hardware benchmarking to detect the optimal settings.
> Therefore, it's essential to make
> [`SGGameUserSettings`](../../getting-started/setup-senseglove-default-classes/sggameusersettings.md)
> or a subclass of it the default Game User Settings class to utilize all these
> features.
The following Blueprint code from the [SGBasicDemo-OpenXR](https://dev.azure.com/SenseGlove/_git/SenseGlove-Unreal-SGBasicDemo-OpenXR) example scene demonstrates how to bind numeric keys `1` to `5` to set various Engine Scalability Settings, and key `0` to utilize hardware benchmarking to determine the optimal Engine Scalability Settings:
- `0`: Use hardware-benchmarking to determine the optimal Engine Scalability Settings.
- `1`: Set Engine Scalability Settings to `Low`.
- `2`: Set Engine Scalability Settings to `Medium`.
- `3`: Set Engine Scalability Settings to `High`.
- `4`: Set Engine Scalability Settings to `Epic`.
- `5`: Set Engine Scalability Settings to `Cinematic`.
![Game User Settings and Engine Scalability Settings - Binding different Engine Scalability Settings to numeric keys 0, 1, 2 inside SGPawn Blueprint](sgpawn-bind-engine-scalability-settings-1.png "Game User Settings and Engine Scalability Settings - Binding different Engine Scalability Settings to numeric keys 0, 1, 2 inside SGPawn Blueprint")
![Game User Settings and Engine Scalability Settings - Binding different Engine Scalability Settings to numeric keys 3, 4, 5 inside SGPawn Blueprint](sgpawn-bind-engine-scalability-settings-2.png "Game User Settings and Engine Scalability Settings - Binding different Engine Scalability Settings to numeric keys 3, 4, 5 inside SGPawn Blueprint")
> [!TIP]
> The
> [SGBasicDemo-OpenXR](https://dev.azure.com/SenseGlove/_git/SenseGlove-Unreal-SGBasicDemo-OpenXR)
> includes an example 3D widget actor that displays the current FPS and Engine
> Scalability Settings. This widget can be placed within a VR scene and is
> located in `All > Content > Blueprints > UI > BP_FPS3DWidget`. The underlying
> UMG widget can be found at `All > Content > Blueprints > UI > WB_FPS` within
> the Content Browser for the SGBasicDemo-OpenXR example scene.
![Game User Settings and Engine Scalability Settings - SGBasicDemo-OpenXR UMG widget code for calculating the framerate and showing the current FPS and Engine Scalability Settings](sgbasicdemo-openxr-fps-engine-scalability-settings-umg-widget.png "Game User Settings and Engine Scalability Settings - SGBasicDemo-OpenXR UMG widget code for calculating the framerate and showing the current FPS and Engine Scalability Settings")
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -57,7 +57,7 @@ Toipcs that do not fall under any specific category:
- [SenseGlove Console Commands](../misc/console-commands/)
- [Deploying to Android (Standalone)](../misc/android-standalone-deployment/)
- [Upgrade Guide]()
- [Optimizing for More FPS]()
- [Optimizing for More FPS](../misc/optimize-more-fps/)
## 🛠️ Advanced Topics