In the development process, repeatedly building APKs in Unreal is time-consuming. Direct Preview lets you skip the building process. You can preview in both Unreal Editor and your HMD device simultaneously.
The rendering path for Android applications differs substantially from the rendering path used for game previews, and you may notice important differences in the look-and-feel and performance.
Direct Preview is separated into three parts:
dpServer takes over the Unreal textures and the poses sent from wvr_plugins_directpreview.dll. And then, dpServer encodes these information and sends them to target device.
- wvr_plugins_directpreview_agent_unreal.apk on your target device
There are 2 major tasks in wvr_plugins_directpreview_agent_unreal.apk.
- wvr_plugins_directpreview_agent_unreal.apk gets all data like pose, event and state of the HMD/controllers and sends to wvr_plugins_directpreview.dll via USB/Wifi.
- wvr_plugins_directpreview_agent_unreal.apk also takes over the images sent from dpServer, decodes the images, and displays the images on your target device.
Unreal editor will load wvr_plugins_directpreview.dll once you start VR preview. After initialization and connection, it provides all data (pose, event and state of device) from wvr_plugins_directpreview_agent_unreal.apk to Unreal which operates all routines and draws images on texture. After drawing texture is completed, wvr_plugins_directpreview.dll will send texture images from Unreal with corresponding pose data to dpServer.
- Windows Only.
- DirectX 11 is needed.
- Minimum graphics card: Nvidia GTX-980. Nvidia GTX-1080 is suggested at rrServer side for better performance. It is recommended to update the graphics card driver to the latest version.
To successfully execute adb.exe, please make sure Path System Environmental Variable for Android SDK platform tools has been set.
To use Direct Preview, please ensure the P-sensor is covered to keep the HMD awake.
- WaveVR > Plugin Settings
Find Direct Preview settings through the menu item “WaveVR > Plugin Settings”, or you can find it in Project Settings as well.
- Direct Preview settings
- Connect Type
Get device information (pose, event, state) through USB. Instant preview can be seen in Unreal Editor, but not in the HMD.
Device Wi-Fi IP
Fill in the HMD’s Wi-Fi IP.
Enable preview image
Check “Enable preview image”:
Enable to present the corresponding effect according to the pose, event and state returned from the HMD, and enable to show the Unreal Game mode images in both Unreal Game mode and the HMD.
Uncheck “Enable preview image”:
Enable to present the corresponding effect according to the pose, event and state returned from the HMD, and only display in the Unreal Game mode.
Render target device
Developers need to assign which render target device is using.
Render target is incorrect will cause streaming abnormal.
Please re-install Device APK if you changed option of render target device.
Choose how many images per second are sent to the HMD based on network conditions. Choose from: Runtime defined, 15 FPS, 30 FPS, 45 FPS, 60 FPS, and 75 FPS. When “Runtime defined” is selected, the FPS will be set to the default refresh rate of the HMD. If the HMD default refresh rate is not supported or doesn’t exist, Update frequency will be set to 75 FPS.
FPS here means how many images dpServer sends to the APK, instead of the FPS shown in Unreal Editor.
Regularly save images
Check “Regularly save images” to regularly get images from Unreal, and save them ( dp_unreal_image_number.jpg ) in the path D:/ .
You can adjust the image size sent to the HMD by changing the window size in Editor Preference > Level Editor - Play in Unreal Editor.
- WaveVR > Install Device APK
Install wvr_plugins_directpreview_agent_unreal.apk to the HMD. Click on “Install Device APK” and it will automatically install the APK to the HMD and create a “config.json” in the path “/sdcard/DirectPreview” in the HMD.
- WaveVR > Start DPServer
Click on “Start DPServer” to start dpServer.
After you clicked, a new window will be shown as below:
- WaveVR > Start Device APK
Start wvr_plugins_directpreview_agent_unreal.apk in the HMD.
- After dpServer is connected with wvr_plugins_directpreview_agent_unreal.apk, click on the “VR Preview” button in Unreal Editor to preview instantly.
- WaveVR > Stop Device APK
Stop running the APK in the HMD.
- WaveVR > Stop DPServer
Before closing the Unreal Editor, please make sure “VR Preview” is turned off in Unreal.