DirectPreview

Introduction

In the development process, building APKs repeatedly in Unreal is time-consuming. Direct Preview lets developers skip the build process by letting developers preview in both the Unreal Editor and their headset simultaneously.

Note

The rendering path for Android applications differs from the rendering path used for game previews. Therefore, there may be differences in the look-and-feel and performance.

Contents

Architecture

../_images/Architecture_unreal.png

Direct Preview is separated into three parts:

  1. VIVE Business Streaming app on your target device
This is the app on headset for Direct Preview. It leverages the streaming technology from VIVE Business Streaming to work over USB or wireless connection. It is the same app for VIVE Business Streaming on your headset.
  1. wvr_plugins_directpreview.dll on your Unreal Editor

Unreal Editor will load wvr_plugins_directpreview.dll when you start playing. After initialization and connection, it provides all data (pose, event and state of device) from your target device 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 Streaming server.

  1. Streaming server on PC
Streaming server takes over the Unreal textures and the poses sent from wvr_plugins_directpreview.dll. And then, Streaming server encodes these information and sends them to the target device.

How to Use

  1. You can navigate to the Game Viewport Settings page through the Edit > Editor Preferences > Level Editor > Play and set appropriate New Viewport Resolution.
../_images/unreal_editorpre.png ../_images/unreal_gameviewport.png
  1. You can navigate to DirectPreview menu through WaveVR > DirectPreview.
../_images/DP_WaveVR_Tab.png

Preview in Editor only with USB

Get device information (pose, event, state) through USB. Play with VR Preview mode images can be seen in Unreal Editor and in the headset.

Step 1. Make Sure HTC Device/VIVE RR Interface is installed on your PC.

Please download The HTC Driver and install it on you PC.
../_images/htcdevice1.png

Step 2. In menu WaveVR > DirectPreview, select Install Device APK. DirectPreview will automatically install the APK to the headset. Please reboot the headset after the apk installed.

../_images/usb_installapk.png

Note

Make sure there’s no white-space in your project path or else the apk installation process may fail. You can check your installation path in Unreal console window.

Step 3. In menu WaveVR > DirectPreview, select Start DPServer.

../_images/wifi_startserver.png
../_images/DP2_DPServerWindowStartServer.png

A command line window you will see after selecting Start Streaming Server.

Step 4. On your headset, need to start the app Vive Business Streaming. In menu WaveVR > DirectPreview, select Start Device APK.

Start VIVE Business Streaming app on your headset.

Note

  • Make sure the proximity sensor on the headset is covered/blocked to keep the headset awake.

Step 5. Click the “VR Preview” button to open the preview window.

Click Play Settings then choose VR Preview.

../_images/DP_VRPreview.png

Then here comes the preview.

../_images/DP2_VRPreviewScene.png

Note

Please ensure the P-sensor is covered during preview to keep the HMD awake or the tracking data will be lost.

Step 6. Stop Streaming server on PC & VIVE Business Streaming app on your headset. Please click WaveVR > Stop Device APK (with USB connected) and WaveVR > Stop DPServer to close the whole process completely.

../_images/usb_stopapk.png

Preview not only in Editor but also in HMD with Wi-Fi

Get device information (pose, event, state) through WIFI. Play Settings then choose VR Preview mode images can be seen in Unreal Editor and in the headset.

Step 1. Plug in the USB cable, tab to WaveVR > DirectPreview and select Install Device APK. DirectPreview will automatically install the APK to the headset. Please reboot the headset and unplugin the USB cable after the apk installed.

../_images/usb_installapk.png

Note

Make sure there’s no white-space in your project path or else the apk installation process may fail. You can check your installation path in Unreal console window.

Step 2. In menu WaveVR > DirectPreview, select Start DPServer.

../_images/wifi_startserver.png
../_images/step51.png

A command line window you will see after selecting Start Streaming Server.

../_images/firewall1.png
../_images/firewall21.png

Please enable the firewall for RR Server 2.0 for domain, private and public networks.

Step 3. On your headset, need to start the app Vive Business Streaming.

Start VIVE Business Streaming app on your headset.

Note

  • Make sure the proximity sensor on the headset is covered/blocked to keep the headset awake.

Step 4. After the connection is made, Click the “VR Preview” button to open the preview window.

Click Play Settings then choose VR Preview.

../_images/DP_VRPreview.png

Then here comes the preview.

../_images/DP2_VRPreviewScene.png

Note

Please ensure the P-sensor is covered during preview to keep the HMD awake or the tracking data will be lost.

Note

Before closing the Unreal Editor, make sure Play VR Preview mode is turned off in Unreal.

Step 5. Stop Streaming on PC & VIVE Business Streaming apk on your headset. Please click WaveVR > Stop Device APK (with USB connected) and WaveVR > Stop DPServer to close the whole process completely.

../_images/usb_stopapk.png

FAQs

  1. I can’t connect to the Streaming server with the device apk, what should I do?

For USB make sure USB is linked. Restart Streaming server and Vive Business Streaming app.

For WIFI make sure the firewall for RR Server 2.0 is enabled for domain, private and public networks.

  1. If Vive Business Streaming app experiences latency, what should I do?

please stop the DPServer and the Device APK and then restart both the DPServer and the Device APK by WaveVR menu.

../_images/usb_stopapk.png