Developer can modify the value of RenderTexture, which depends on the scene's needs, the default value is 1 (Recommended). The value less, the resolution will be lower, but FPS will be enhanced and the power consumption will be reduced; On the contrary, if the value increased, the resolution will be enhanced, but FPS will be reduced and the power consumption will be increased. Moreover, the maximum value should not larger than 1. Developer can modify the "Pixel Density" by using the vr.pixelDensity from UE. We provide two ways to use the API:
Set by Blueprint
Use "Execute Console Command" node to modify the "vr.pixeldensity 1.0" command (Please note the Space). We recommend that call it after the blueprint "EventBeginPlay" .
3.1.1 Tracking Origin Blueprint
Set by ini
Open the Path: Project/Config/DefaultEngine.ini,and add "vr.pixeldensity=1" under “[/Script/Engine.RendererSettings]” tag, please refer to the picture below:
Foveated rendering can optimize the ability to render scenes by providing high resolution for the center of the field of view, and greatly reducing peripheral views the details of the scene. This reduces the GPU load as a result of the reduction in pixel shading requirements. FFR can dramatically increase performance, improving the image show in the headset.
Fig 3.2.1 Foveation Rendering Model and Parameters
There are three modes: Low, Med and High can be selected. The higher the Foveation Level, the higher the FPS, but the more the pixel loss, which will affect the clarity of the edge area, please choose the appropriate Level according to the rendering needs. Developers can also set the fixation rendering level and parameters through the configuration panel.
Fig3.2.2 FFR Setting
In addition, the Foveation Rendering Level and parameter can be set by the following blueprint API:
With Multi View, objects are rendered once to the left eye buffer, then duplicated to the right buffer automatically with appropriate modifications for vertex position and view-dependent variables such as reflection. It primarily reduces CPU usage, and the GPU performance is unchanged largely. If your application is CPU-bound or draw call bound, we strongly recommend using Single Pass Stereo rendering to improve performance.
Qiyu SDK supports the Mobile MultiView function of Unreal Engine,it can be enabled by check Mobile Multi-View, the path is Project Setting > Rendering > VR > Mobile Multi-View.
Fig3.3 Enable MultiView
Please note that after click or unclick this function, please restart the engine to adapt the settings. Moreover, before enable the Multi View, please turn off the Mobile HDR function.
Vulkan is a high performance and low CPU Utilization graphics APIs, which inherits OpenGL ES. It’s also important to remember that Vulkan, as well as graphics APIs in general, is a CPU API that controls the GPU, so any performance benefits that you might derive from Vulkan will only be of rendering CPU performance, not of GPU performance.
Because of the difference version of Unreal engines, there are different to enable the Vulkan. We suggest developers to use Unreal 4.27 to use Vulkan to develop the game.
Unreal Engine 4.26
Use the source code of Unreal engine, and change part of it.
Modify the function of IsStandaloneStereoOnlyDevice at EngineSourcePath\Engine\Source\Runtime\Core\Private\Android\AndroidPlatformMisc.cpp as the following below:
bool FAndroidMisc::IsStandaloneStereoOnlyDevice()
{
// Oculus HMDs are always in stereo mode
if (FAndroidMisc::GetDeviceMake() == FString("Oculus"))
{
return true;
}
#if USE_ANDROID_JNI
extern bool AndroidThunkCpp_HasMetaDataKey(const FString& Key);
if (AndroidThunkCpp_HasMetaDataKey(FString("android.device.bQiyuPlatform")))
{
return true;
}
#endif
return false;
}
The loading Screen of Unreal Engine is not in VR mode. To improve the user experience, QIYU provides a DIY VR loading Screen function. Please following the steps below:
Compress the loading picture to "loading.zip", replace the loading.zip file in Plugins\QIYUVR\Source\QIYUVRLib\Libs\Android\assets. The file requirements:
The name of zip file must be "loading.zip".
The format of loading pictures must be PNG.
The aspect ratio of loading pictures should be 1:1.
If compressing more than one picture, it can achieve animation effect.
Enable the Loading Screen in SDK.
Fig3.6.1 Enable Loading screen
Fig3.6.2 Switch Loading Screen
Uncheck the "Show Launch Image". The path to the function is Project Setting > Platform > Android > Launch Images.
QIYU SDK provides the controller models of QIYU 3 ,QIYU Dream and QIYU MIX (Dream and Dream Pro have same controller models), developers can find in Meshes folder, please refer to the screenshot below.
In order to improve the rendering clarity of text, pictures, videos and other resources, the graphics and image areas that need high-definition display can be rendered through stereolayer.
StereoLayer allows you to render certain forms of content such as text, video, or textures with higher quality than traditional eye-buffer rendering can achieve. Because this will increase the system load, using more than 5 overlay or underlay is NOT recommended.
Stereo Layer Settings
To use the stereo layer and VR Pawn together, please follow the steps below:
Open up the Pawn that you want to use Stereo Layers with and then go to the Viewport panel.
Click on the Add Components button from the drop-down list that is displayed and search for the Stereo Layer Component.
Now drag the Stereo Layer Component on top of the Pawn's camera to make it a child actor of the camera.
Select the Stereo Layer Component from the Components list and then in the Details Panel under the Transform section, set the X value of Location to 100 so that it is easy to see in QIYU device.
In Stereo Layer, setting Stereo Layer component corresponding properties
After completing the above steps, you can normally view the stereolayer component in the all-in-one machine, which is not displayed on the PC platform.
Stereo layer attribute description
The SDK supports the following attributes:
Name
Description
Support Depth
True if the stereo layer needs to support depth intersections with the scene geometry, if available on the platform.
Texture
Texture displayed on the stereo layer (if stereoscopic textures are supported on the platform, and more than one texture is provided, this will be the right eye).
Stereo Layer Type
Specifies how and where the quad is rendered to the screen.
StereoLayerShape
Specifies which type of layer it is. Note that some shapes will be supported only on certain platforms.
Priority
Render priority among all stereo layers, higher priority render on top of lower priority.
Description:
Stereo Layer Type: only support FaceLock and WorldLock in SDK at the moment, the effect of TrackerLock is same as FaceLock.
FaceLock: the relative position between Stereo layer and Camera is constant, and the stereo layer will be rendered in the fixed position.
WorldLock: Stereo layer in world is constant.
StereoLayerShape: SDK only supports Cylinder Layer and Quad Layer。
Cylinder Layer: This type is cylindrical surface. Developers can adjust the radius of the cylindrical surface through the Radius attribute, the arc length of the cylindrical surface through the Overlay Arc attribute, and the height of the cylindrical surface through the Height attribute.
Quad Layer: This type is Quad. Developers can adjust the length and width of the Quad through the Quad size property.
Note: SDK does not support the attributes are not listed in the table above.
QIYU SDK provides 3-Dof selection and blueprint APIs, which added "Neck model" and "Arm model", It can simulate the movement of head and hand naturally.
Developer can check the “TrackingRotationOnly” project settings->Plugin -> QIYU to enable 3Dof function before
If you need to dynamically switch the 3/6dof mode during operation, you can obtain the current tracking mode and set the tracking mode through the following two interfaces.
The display refresh rate stands for the VR device refreshing every second. The value of Display Refresh Rates higher the higher FPS and definition are supported and it will more stable for tracking. The default display Refresh Rates of QIYU devices is 72 Hz, in other words, the application will refreshing at 72 Hz if developers do not set or modify the value which can be set by using the following APIs.
It is worth to pay attention, higher display refresh rates requires less time for each frame, the application should make sure the performance is meet the QIYU Application review guidelines, otherwise, the application might be lived on QIYU store. Please refer to the Display refresh rates support by different types of QIYU devices:
Device
Display Refresh Rates
QIYU 3
72Hz
QIYU Dream
72Hz
QIYU Dream Pro
72Hz, 90Hz
QIYU MIX
72Hz, 90Hz
Get Available Display Refresh Rates List
Refresh Rates: Get available display refresh rates list.
bApplyToAllLayers: Whether to apply to all layers. (if true, the effect will be applied to all underlay and overlay. If false, the effect will only be applied to the scene, and underlayer and overlayer will not be affected).
Note:
Adjusting the alpha value may affect the display of underlay. It is recommended not to modify the alpha value when using underlay.
Adjusting the alpha value will increase rendering power consumption. It is recommended to modify it as needed.
To improve the porting efficiency and prevent to build the package many time during the developing, PC direct preview will provide a function running the scenes in Unity Editor, and you can also see the running views on the headset.
PC Configuration:
OS: Windows10 and above
Graphics: NVIDIA GeForce GTX 1060 / AMD 5700
CPU: Intel Core i7-6700 / AMD FX 8320 or above
Memory: 8G and above
Method:
Use USB cable to connect PC and headset.
install the QiyuPreviewAgent.apk to headset, please download at https://static-d.iqiyi.com/lequ/20220620/QiyuPreviewAgent_v1.0.0.rar.
Pressing Qiyu Tool - Open preview tool, open the configuration panel, please adjust settings as need, and refer to the following description.
Pressing "connect preview APP", write into configuration file and enable preview agent application.
Pressing "VR Preview" to PLAY the project in Unreal Editor.
The synchronous display of the scene will be shown both in PC and Headset.
Description for Settings
Connect Type: USB connection is only accepted at the moment.
IP Port: Data forwarding port of computer and all-in-one machine. If it is not necessary, this configuration item does not need to be modified.
Render Frame: The frequency of the computer sending data to the all-in-one machine controls the display frame rate of the all-in-one machine, so the rendering frame rate of the computer is not consistent with the display frame rate of the all-in-one machine.
Render Resolution: Rendering resolution, monocular size of eyebuffer used for engine rendering and all-in-one display. The higher the rendering resolution, the clearer the display effect and the lower the frame rate. Please balance the weight of frame rate and sharpness and choose the appropriate rendering resolution.
Default Aspect Ratio: Whether to apply the rendering resolution to the window size of VR preview.
Adb Path: In SDK, you can find the environment variable Android of PC_ Home to locate the ADB application. If the development machine is not configured with this environment variable, you can use this function to execute the native path of adb.exe.
Note: Each time the editor VR preview runs the scenario, please click the "connect preview app" button to ensure that the configuration takes effect normally and the all-in-one preview agent application starts normally.