This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
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
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Вывод изображения на HTC Vive с плагином OpenVR

The OpenVR 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.Плагин OpenVR используется для поддержки шлемов HTC Vive и HTC Vive Pro. Предполагается, что у вас уже установлен HTC Vive/Vive Pro HMD. SteamVR будет установлен автоматически при установке HTC Vive (HTC Vive Pro HMD).

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:Поддерживаются как оконный, так и полноэкранный режимы. По умолчанию на дисплее ПК изображение рендерится в монохромном режиме (изображение для левого глаза). Используйте setViewportMode(), чтобы изменить режим на стерео (оба глаза) следующим образом:

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.Все проекты UNIGINE, поддерживающие SteamVR, совместимы как с HTC Vive, так и с HTC Vive Pro. Однако обратите внимание, что Vive Pro имеет более высокое разрешение дисплея, и, хотя никаких изменений не требуется, рекомендуется проверить производительность вашего проекта и соответствующим образом оптимизировать его.

Смотрите также

  • Описание класса OpenVR в справочнике API
  • Пример <UnigineSDK>/data/samples/plugins/app_vive_00

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.Чтобы запустить сэмпл плагина из браузера UNIGINE SDK, перейдите на вкладку Samples, выберите UnigineScript -> App и запустите образец app_vive_00 .

Implementing Unigine Application with OpenVR SupportВнедрение приложения Unigine с поддержкой OpenVR#

To use the HTC Vive virtual display with Unigine, perform the following:Чтобы использовать виртуальный дисплей HTC Vive с Unigine, выполните следующие действия:

  1. Download Vive Setup and perform all required steps.Загрузите Vive Setup и выполните все необходимые действия.
  2. Создайте новый проект с поддержкой OpenVR через UNIGINE SDK Browser: нажмите Plugins, отметьте опцию OpenVR support (OpenVR plugin) в открывшейся форме и нажмите OK.

    Примечание
    To add OpenVR support to an existing project, in UNIGINE SDK Browser, click Other Actions -> Configure Project -> Plugins -> OpenVR support (OpenVR plugin) -> Ok. Чтобы добавить поддержку OpenVR в существующий проект, в браузере UNIGINE SDK нажмите Other Actions -> Configure Project -> Plugins -> OpenVR support (OpenVR plugin) -> Ok.

  3. Implement the application logic by using functions of the OpenVR plugin API.Реализуйте логику приложения с помощью функций API плагина OpenVR.
  4. Plug in the HTC Vive virtual display.Подключите виртуальный дисплей HTC Vive.
  5. Launch the OpenVR plugin on the application start-up. Запустите подключаемый модуль OpenVR при запуске приложения.

Launching OpenVRЗапуск OpenVR#

To launch the plugin, specify the extern_plugin command line option on the application start-up:Чтобы запустить плагин, укажите параметр командной строки extern_plugin при запуске приложения:

Shell-команды
main_x64.exe -extern_plugin "UnigineOpenVR"

If you run the application via UNIGINE SDK Browser, set the Stereo 3D option to HTC Vive in the Options tab and click Apply: Если вы запускаете приложение через браузер UNIGINE SDK, установите для параметра Stereo 3D значение HTC Vive на вкладке Options и нажмите Apply:

OpenVR OptionsПараметры OpenVR#

The following CLI options can be specified on the application start-up:При запуске приложения можно указать следующие параметры интерфейса командной строки:

  • openvr_render_width and openvr_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%. 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: So the resolution will be set as follows:

    HTC Vive HTC Vive Pro
    Resolution per eye 1512 x 1680 2016 x 2240
    Примечание
    The same resolution is set for both eyes.The same resolution is set for both eyes.
    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:The same resolution is set for both eyes.
    openvr_render_width и openvr_render_height - установите разрешение для каждого глаза. Разрешение по умолчанию для одного глаза установлено 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%. Обратите внимание, что по умолчанию SteamVR выбирает разрешение в зависимости от производительности вашего компьютера. Поэтому для обеспечения наилучшего качества изображения рекомендуется открыть вкладку «Видео» в окне настроек SteamVR, включить режим Ручное изменение и установить разрешение на 100%.

    So the resolution will be set as follows:Таким образом, разрешение будет следующим:

    HTC Vive HTC Vive Pro
    Resolution per eye 1512 x 1680 2016 x 2240
    Примечание
    The same resolution is set for both eyes.Для обоих глаз установлено одинаковое разрешение.
Shell-команды
main_x64d -extern_plugin "UnigineOpenVR" -openvr_render_width 1512 -openvr_render_height 1680

Console CommandsКонсольные команды#

The following console commands can be run for the OpenVR plugin.Для плагина OpenVR можно использовать следующие консольные команды.

Имя Описание Аргументы
vr_viewport_mode
  • Command. Sets the viewport mode.Команда. Устанавливает режим окна просмотра.
  • Variable. Prints the value specifying which viewport mode is set.Переменная. Выводит значение, указывающее установленный режим окна просмотра.
0 — black screen
1 — mono (default)
2 — stereo
0 — черный экран
1 — моно (по умолчанию)
2 — стерео
Последнее обновление: 11.01.2024
Build: ()