7 Advanced feature¶
7.1 Configure EyeBuffer size¶
SDK supports responding to Unreal’s “vr.pixeldensity” command. Developers can use this command to configure the size of EyeBuffer (RenderTexture).
Method 1: Open the file Project / Config / DefaultEngine.ini, and then add the string “vr.pixeldensity = 1” under the “[/Script/Engine.RendererSettings]” tag. If the value is equal to one or there is no value set, EyeBuffer size is set to Pico’s default size. If the value is not equal to one, it will be scaled based on Pico’s default EyeBuffer size. As shown below:
Figure 7.1 Configure Eyebuffer size
Method 2: This setup can also be done by execute console command through the blueprint. Using the node “Execute Console Command” node, invoke the “vr.pixeldensity 1” command (there is a space between the string and the number in the command). The same number part is a multiple of EyeBuffer. However, to ensure that the execution of this command must be early enough, it is recommended to place it behind EventBeginPlay, which concerns the blueprint.
Figure 7.2 Configure Eyebuffer size
The function of configuring the EyeBuffer size through the “Multiples of RT size” parameter in Project Settings> Plugins> PicoMobile has been deprecated.
It is recommended that developers do not make changes, and only use custom RenderTexture sizes for special needs occasions. For this option, the developer must understand the following two points:
If the RT setting is too small, it will improve the performance and reduce the delay, but it will also reduce the resolution.
If the RT setting is too large, it will reduce performance and increase latency. Therefore, it is not recommended that the RT setting exceed the hardware recommended texture size;yeBuffer size can be scaled by tuning “multiples of RT size” attribute in “Project Settings” -> “Plugins” -> “PicoMobile”. (Note: minimum value is 1024, maximum value is 2048)
7.2 Eye tracking¶
Pico Neo2 Eye devices support eye tracking functions. Eye tracking module can keep track of the position user is focusing. When using together with foveated rendering, this feature can help optimize rendering performance. This feature can be enabled by checking “Enable EyeTracking” option in “Project Settings” -> “Plugins” > “Pico Mobile” as shown in Pic7.2
Figure 7.3 Eye Tracking
The position and orientation of the eye can be obtained through the following stage.
7.3 Foveated Rendering¶
Foveated rendering can optimize rendering capability by displaying high resolution in the central part of the view and lower resolution in periphery part of the view.
There are two methods to enable foveated rendering:
Method 1: 1)Before packaging, set “Foveation level” in “Project Settings” -> “Plugins” > “Pico Mobile” to a desired value.
Figure 7.4 Foveation Rendering Settings
Method 2: Foveation Rendering level can be configured dynamically by using Blueprint：
Foveation Gain：Vector2 Type，Resolution scale down ratio along X/Y axis, resolution drop more when this value is higher.
Foveation Area：float Type, An area defined with gazing point as center and Foveation Area as radius, in which resolution is not changed.
Foveation Minimum：float Type, Texture coordinate for texture filtering function
Foveation Level：Predefined Foveation setting with 3 levels as Low, Med, High
Note: If “Pico Set Foveation Parameter”is called, “Get Foveation Level”will return False.
7.4 Application Entitlement Protection¶
In order to cooperate with the developer platform and application store for copyright protection of developer applications, the SDK needs to perform license verification during the application development phase and after its official release to provide developers with application copyright protection mechanisms.
7.4.1 Simulation permission verification during development¶
Device SN from Edit—>Plugins—>PicoMobile—>Platform，for development device simulation verification.
Figure 7.5 entitlement verification simulation
Blueprint for verification results:
7.4.2 AppID and Public KeyEntitlement Check¶
Get whether the user has the permissions required by the application through AppID.
AppID Check Blueprint：
Use the key & private key generated by the public and private key tool provided by the developer platform to obtain whether the application has the required permissions.
Public key Check Blueprint：
Entitlerment Check Callback Blueprint：
If you want to enable MultiView, you need to go to Unreal Editor> Settings> Project Settings> Engine> Rendering> VR, then select Mobile Multi-View and Mobile Multi-View Direct. The above two items must be checked to take effect. Note: MultiView needs to be enabled under OpenGL ES3.1. OpenGL ES2 does not support MultiView.
Figure 7.6 Open MultiView
7.6 Pico VR Compositor Layers（StereoLayer）¶
StereoLayer is a Layer component provided by UE4, which allows you to send a separate Texture to the headset and have it re-projected in a separate rendering pass than the rest of the project.
Figure 7.7 Overlay in the scene
Figure 7.8 Stereo Layer Properties
Currently only the following properties of this component are supported：Texture、Stereo Layer Type、Stereo Layer Shape、Priority、Left Texture、Quad Size. Other properties will be implemented in successive versions.
How to create a StereoLayer：
1、 Create a Pawn actor. Drag it into level.
2、 Select Pawn or open the Pawn blueprint to add the Stereo Layer in Component.
3、 In Stereo Layer properties, the Stereo Layer Type can be selected as FaceLocked, WorldLocked, or TrackerLocked. The effects of FaceLocked and TrackerLocked are currently the same.
4、 Set Stereo Layer Shape to Quad Layer.
5、 Set Property to determine the hierarchy of multiple layers.
It is recommended not to add Stereo Layer under the camera component.
It is recommended to use the correct coordinate position relationship to place the models and layers, otherwise there will be depth of field conflicts that will cause visual discomfort.
7.7 Pico VR Splash Screen¶
The SDK provides a way to display a specified texture when switching scenes, which is called SplashScreen. There are two ways to enable SplashScreen: through Project Settings or using Blueprints.
Method 1: Use the project settings to enable SplashScreen.
Open project settings, go to: Plugins->PicoMobile->SplashScreen (the configuration interface is as follows):
Figure 7.9 SplashScreen properties
Table 7.1 Pico VRSplashScreen Property Interpretation
Method 2: Using blueprints to enable SplashScreen.