This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

HTC Vive Output with AppVive Plugin

The AppVive plugin is used to support both the HTC Vive and the HTC Vive Pro head-mounted displays. It is supposed that you already have HTC Vive/Vive Pro HMD installed. SteamVR will be set automatically on the HTC Vive (HTC Vive Pro HMD) installation.

Notice
This plugin cannot be used in a Qt-based application as well as with any other App* plugin or App application (WPF, winform, main_csharp, etc.).

Both the windowed and the full screen modes are supported. By default, on the PC display the image is rendered in mono mode (image from the left eye). Use setViewportMode to change the mode to stereo (both eyes) as follows:

All UNIGINE projects supporting SteamVR are compatible with both HTC Vive and HTC Vive Pro. However, please note that Vive Pro has a higher display resolution, and although no modifications are required, it is recommended to check your project's performance and optimize it accordingly.

See Also

  • engine.vive functions
  • <UnigineSDK>/data/samples/plugins/app_vive_00 sample

To run the plugin sample from the UNIGINE SDK Browser, go to the Samples tab, choose UnigineScript -> App and run the app_vive_00 sample.

Implementing Unigine Application with Vive Support#

To use the HTC Vive virtual display with Unigine, perform the following:

  1. Download Vive Setup and perform all required steps.
  2. Create a new project with AppVive support via UNIGINE SDK Browser: click Plugins, check the HTC Vive support (AppVive plugin) option in the form that opens and click OK.
    Notice
    To add Vive support to an existing project, in UNIGINE SDK Browser, click Other Actions -> Configure Project -> Plugins -> HTC Vive support (AppVive plugin) -> Ok.

  3. Implement the application logic by using functions of the AppVive plugin API. You can also change the plugin API functions or add new ones and then recompile the plugin.
  4. Plug in the HTC Vive virtual display.
  5. Launch the AppVive plugin on the application start-up.

Launching AppVive#

To launch the plugin, specify the extern_plugin command line option on the application start-up:

Shell commands
main_x64.exe -extern_plugin "AppVive"

If you run the application via UNIGINE SDK Browser, set the Stereo 3D option to HTC Vive in the Options tab and click Apply:

AppVive Options#

The following CLI options can be specified on the application start-up:

  • vive_render_width and vive_render_height - set a resolution for each eye. The default resolution for one eye is set equal to recommended value by SteamVR.

    Please note that by default SteamVR selects resolution based on your computer's performance. Therefore, for best image quality it is recommended to open the Video tab of the SteamVR settings window, enable Manual Override mode and set resolution to 100%.

    So the resolution will be set as follows:

    HTC Vive HTC Vive Pro
    Resolution per eye 1512 x 1680 2016 x 2240
    Notice
    The same resolution is set for both eyes.

Shell commands
main_x64d -extern_plugin "AppVive" -vive_render_width 1512 -vive_render_height 1680

Compiling AppVive#

Plugin compilation is required if you change its source code (for example, add new API functions).

To recompile the AppVive plugin, do the following:

  1. Get the OpenVR SDK.
    Notice
    The actual AppVive plugin is compiled using the OpenVR SDK 1.9.16.
  2. Set the path to the <OpenVR SDK> folder in the OPENVRROOT environment variable:
    Shell commands
    set OPENVRROOT=<OpenVR SDK>
  3. Compile the plugin in one of the following ways:
    • By using the build script:
      Shell commands
      C:\UnigineSDK\source>build.py --plugin AppVive
    • Via Microsoft Visual Studio: go to the <UnigineSDK>\source\plugins\App\AppVive, open the appvive_vs2015.vcxproj project and build it.
Last update: 2020-04-10
Build: ()