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
Учебные материалы

Вывод изображения на Oculus Rift с плагином Oculus

The Oculus plugin is used to support the Oculus Rift head-mounted display. For the correct work of the plugin Oculus Rift PC Runtime is required. Note that your customers must have runtime installed as well. The plugin supports all HMD types supported by the latest Oculus Rift PC Runtime (including Oculus Rift CV1 (Consumer Version).Плагин Oculus используется для поддержки шлема Oculus Rift. Для корректной работы плагина требуется Oculus Rift PC Runtime . Обратите внимание, что у ваших клиентов также должна быть установлена ​​среда выполнения. Плагин поддерживает все типы HMD, поддерживаемые последней версией Oculus Rift PC Runtime (включая Oculus Rift CV1 (потребительская версия).

Примечание
Since Oculus VR has stopped supporting Linux, the plugin is available only for Windows.Поскольку Oculus VR больше не поддерживает Linux, плагин доступен только для Windows.

The Oculus plugin provides the VR mode that allows for rendering to both the Oculus Rift head-mounted display and the PC display. When the VR mode is disabled, the image is rendered only to the PC display. The mode can be toggled by using the engine.oculus.setEnabled() function. Плагин Oculus предоставляет режим VR , который позволяет выполнять рендеринг как на головной дисплей Oculus Rift, так и на дисплей ПК. Когда режим VR отключен, изображение отображается только на дисплее ПК. Режим можно переключить с помощью функции engine.oculus.setEnabled() .

Both the windowed and the full screen modes are supported. On the PC display the image is rendered as follows: Поддерживаются как оконный, так и полноэкранный режимы. На дисплее ПК изображение отображается следующим образом:

Valley benchmark rendered on PC display with OculusТест Valley отображается на экране ПК с помощью Oculus

See AlsoСмотрите также#

To run the plugin sample from the UNIGINE SDK Browser, go to the Samples tab, choose UnigineScript -> App and run the app_oculus_00 sample.Чтобы запустить образец плагина из браузера UNIGINE SDK, перейдите на вкладку Samples, выберите UnigineScript -> App и запустите образец app_oculus_00.

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

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

  1. Get and set up the latest Oculus Rift PC Runtime.Получите и установите последнюю версию Oculus Rift PC Runtime .
  2. Create a new project with Oculus support via UNIGINE SDK Browser: click Video Output Options, check the Oculus support (Oculus plugin) option in the form that opens and click OK.
    Примечание
    To add Oculus support to an existing project, in UNIGINE SDK Browser, click Other Actions -> Configure Project -> Video Output Options -> Oculus support (Oculus plugin) -> Ok. To add Oculus support to an existing project, in UNIGINE SDK Browser, click Other Actions -> Configure Project -> Video Output Options -> Oculus support (Oculus plugin) -> Ok.

    To add Oculus support to an existing project, in UNIGINE SDK Browser, click Other Actions -> Configure Project -> Video Output Options -> Oculus support (Oculus plugin) -> Ok.
    Создайте новый проект с поддержкой Oculus через браузер UNIGINE SDK: нажмите Параметры вывода видео , отметьте опцию Поддержка Oculus (плагин Oculus) в форме который откроется, и нажмите ОК .
    Примечание
    To add Oculus support to an existing project, in UNIGINE SDK Browser, click Other Actions -> Configure Project -> Video Output Options -> Oculus support (Oculus plugin) -> Ok. Чтобы добавить поддержку Oculus в существующий проект, в браузере UNIGINE SDK нажмите Other Actions -> Configure Project -> Video Output Options -> Oculus support (Oculus plugin) -> Ok.

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

Launching OculusЗапуск Oculus#

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

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

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

Примечание
Head-tracking support is available by default.Поддержка отслеживания головы доступна по умолчанию.

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

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

  • oculus_density - the render target pixel density. In other words, this is the ratio of the number of render target pixels to display pixels at the center of distortion. The default value is 1.0 (the render target pixel density matches the display surface at the point on the display). oculus_de density - плотность пикселей цели рендеринга. Другими словами, это отношение количества целевых пикселей рендеринга к отображаемым пикселям в центре искажения. Значение по умолчанию - 1.0 (плотность пикселей целевой рендеринга соответствует поверхности дисплея в точке на дисплее).
  • oculus_scale - the world scale. The default value is 1.0. oculus_scale - мировой масштаб. Значение по умолчанию - 1.0.
Shell-команды
main_x64d -extern_plugin "UnigineOculus" -oculus_density 1.0 -oculus_scale 8.0

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

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

Имя Описание Аргументы
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 (images sent to VR device)
3 — stereo final (images with additional VR device distortions, etc.)
0 — черный экран
1 — моно (по умолчанию)
2 — стерео (изображения, отправляемые на VR-устройство)
3 — финальное стерео (изображения с доп. искажениями, отображаемые VR устройством)
Последнее обновление: 11.01.2024
Build: ()