Aller au contenu

Display video in VR

This page shows how to display a non 360 video (not intended for virtual reality headset) in VR.

VR license required

In order to use virtual reality headsets, a VRmaze VR license is required.

Protocol preparation

The first step is to create a VR protocol. Indeed, a conventional protocol does not work with virtual reality headsets.

Image2

Creating a VR protocol.

Creating the environment

The problem is that we should not play a non-360 video directly in a virtual reality headset. The display would be very degraded and would cause big problems for the subjects. VRmaze proposes a virtual environment dedicated to the display of flat video in VR, by proposing a virtual cinema room.

So we have to start by adding the environment allowing the playback of the video. We add the video projection bundle asset allowing to display the 3D cinema. This projection environment is available in the data proposed for download by InMInd-VR.

The file to load is in the data folder, PackDownloadX.X.X\Bundles\Cinema and its name is projection_v3_2019_281_13_17_21.export

This file contains several asset bundles, and we load the asset bundle named test_vision. When loading this asset bundle, the 3D environment is displayed in the viewer.

!

The added environment as seen from the outside.

!

The addition of the environment seen from the inside.

Adding the trial and playing video

In our case, only one video will be played, in a single trial, so we will add a simple generic trial in our experimentation. By default, the 3D cinema cannot be moved, and the starting point of the subject is not in the right place. We therefore configure the position of the subject so that it is close to the middle of the cinema (this position can be adapted to take another place in the cinema):

  • Position: -0.92;-3.32;2.86
  • Rotation: 0;180;0

It is also possible to make virtual movement impossible by specifying movement speeds of 0.

image2

The addition of the environment seen from the inside.

Creating the cinema screen and playing video

Our environment is complete, the starting position of the subject is set, all that remains is to project a video onto the screen. To do this we add a new 3D object (not an asset bundle, but an object in .obj format) and we go and get the geometry ecran5.obj in the PackDownloadX.X.X\Objects\Cinema folder. The screen is not really displayed at the right place and needs some adjustments of position and size:

  • Position: 0;-0.78;0.01
  • Scale: 0.9;0.9;0.98

image2

The configured screen

Unlike the cinema asset bundle, the screen object can be scripted and have video player behavior added. So we add a Video Player script that allows us to choose any video from the data folder. Choose the video (in .mp4 format) you want to see the result of the projection.

!

The configured video playback script

Launching the protocol

A simple click on the Test Protocol button will launch the protocol and start the dependencies needed to run the headset, first and foremost, SteamVR which must be installed first.