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
API
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.

Varjo Output with AppVarjo Plugin

The AppVarjo plugin is used to support the Varjo VR-2 / VR-2 Pro head-mounted displays. Varjo VR-2 Pro currently combines the use of Varjo Software for rendering and head pose tracking and SteamVR Tracking technology for controllers and input. It is supposed that you already have Varjo Base and SteamVR installed.

Notice
This plugin cannot be used in a Qt-based application.

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:

See Also

Implementing Unigine Application with Varjo Support#

To use the Varjo VR-2 / VR-2 Pro virtual display with Unigine, perform the following:

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

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

Launching AppVarjo#

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

Shell commands
main_x64.exe -extern_plugin "AppVarjo"

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

Console Commands#

The following console commands can be run for the AppVarjo plugin.

Name Description Arguments
varjo_set_focus_supersampling_factor
  • Command. Sets the additional supersampling factor for the Varjo focus viewport.
  • Variable. Print the value setting the additional supersampling factor for the Varjo focus viewport.

Additional supersampling factor, a float value greater than 0

(1.0 by default)

varjo_get_focus_supersampling_factor
  • Command. Returns the additional supersampling factor for the Varjo focus viewport.

Compiling AppVarjo#

Plugin compilation is required, if you change the plugin's source code (for example, add new API functions).

To recompile the AppVarjo plugin, do the following:

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