Aller au contenu

VRmaze setup

VRmaze configuration

VRmaze does not require any special configuration for the use of virtual reality headsets. However, the immersive headset functionality is subject to a specific license. It is necessary to obtain a VR license for VRmaze in order to use a SteamVR compatible virtual reality headset.

Image title 2

The addition of a VR license allows the creation of VR specific protocols.

Creating a VR Protocol

Creating a VR protocol follows the same rules for creating a conventional protocol, however, there are a few differences to note. A substantial number of paradigms are not available in VR. InMind-VR aims to allow the creation of a large number of paradigms but even so, some are only available in 2D.

The subject camera and interaction methods are different from a conventional protocol. Indeed, the user has two joysticks in VR against a keyboard in conventional paradigm.

Image title 2

The paradigm offering.

Paradigm Offerings.

The paradigms offered are different from those offered in conventional protocol.

2D testing in VR?

Some 2D paradigms are conceivable in VR. Indeed, questionnaires can be displayed in 3D space and interaction with VR controllers is allowed.

Compatibility of VR and non-VR protocols

As the protocols are different in nature, the analyzed results of two protocols of different types are not compatible.

Launching a VR protocol

Launching a VR protocol does not differ from a conventional protocol. It is a matter of launching it normally. However, there is a difference in software behavior between the conventional protocol and the VR protocol. The latter will try to launch SteamVR automatically and link with it in order to communicate with the virtual reality headset.

Image title 2

SteamVR launched with a VRMaze link.

VRmaze->SteamVR->Provider software.

VRmaze will attempt to launch SteamVR when the protocol is launched, however, neither VRmaze nor SteamVR will launch the provider application (Oculus for Oculus headsets, Vive for HTC headsets). It is therefore necessary to ensure the proper launch of these third-party applications depending on the headsets to be used.

VRmaze->SteamVR link failure

There is a non-zero probability that the VRmaze link to Steam VR will fail. In this case, the protocol launch fails and nothing happens, at most, the VRmaze launch window will appear and disappear almost immediately. In this case, you should simply restart the protocol run.

Automatic launch of SteamVR

VRmaze automatically launches SteamVR if it is not already launched. If not, VRmaze will link to the current SteamVR instance.

Special considerations for VR protocols

There are some constraints to consider when running in virtual reality. While it is possible to use the Built-In renderer in VRmaze, version 2023 of the software only supports the URP renderer.

Incompatibility VRMaze 2023 - Built-In renderer

The built-in renderer is not fully compatible when using VR protocols. Indeed, the interaction handles will appear pink. This is due to the application of shaders that are not compatible with the Built-In renderer.

An important consideration when using VR is the position in real space. Indeed, the calibration performed either in SteamVR or in the immersive headset control software involves the creation of a virtual reference frame.

In VRmaze, the subject's position is primarily a virtual position. When using a VR protocol, the subject's position is an addition of the virtual position and the physical position in the game space. In terms of data recording, VRmaze records the sum of both data (as well as the orientations) so that no information is lost.

The subject camera records both the physical and the virtual positioning. VRmaze will always consider that the subject's body is positioned vertically under the virtual camera. The only available data being the position of the helmet in the game space, VRmaze cannot make any other assumption than that the subject is standing upright. As a result, the integrated collision, which allows not to cross the obstacles will always be positioned vertically to the subject camera.

Collision in VR

The subject's collision zone is considered to be vertical to the subject camera (corresponding to the physical vertical of the helmet at any given time).

No virtual movement in VR?

It is quite possible to prohibit movement with the controller so that the subject can only move physically. To do this, you need to change the movement and orientation speeds by setting them to a value of 0.

Virtual rotation

Virtual space rotation is produced around the subject's head.

Case of mazes

In a maze type paradigm, the target detection will be done in relation to the position of the helmet, thus in height. An option on each target allows to ignore the vertical component when calculating the target-head distance in order to be agnostic about the height of the participant.

Data recording

The camera rendering system (subject node) in a VR trial is a little more complex than in a conventional trial. This is because the VR camera has options and child nodes for recording additional data. As with the conventional subject, the position and orientation of the camera is recorded. It is also possible to record other VR components:

  • Each of the differentiated controllers
  • Eye tracking data (requires a compatible headset)
  • A component declared among: Foot, Head, Shoulder, Waist, Chest (requires the addition of compatible trackers)

Recorded Data

Depending on the paradigm, it is possible that the recording of additional data is not activated. If necessary, the corresponding recording nodes should be added.

Eye tracker

The eye tracker recording component is only supported for the HTC Vive Pro Eye headset. It is necessary to install the SRAnipal program in order to make it work.

Launching the eye tracker calibration in VRmaze

When launching a protocol, it is possible to launch a calibration of the eye tracker via the special instruction SRAnipal Eye calibration instruction. This instruction will start the calibration and pause the run.

Specific entities

To meet certain specific needs, VRmaze integrates certain components specific to VR. It is, for example, impossible to display a 2D element in overlay of the virtual image. If this functionality is supported in a conventional protocol, it is not in a VR protocol.

Simple 2D element in VR

2D elements are not displayed in VR, they are displayed on the return screen, but not in the headset.

Display a 2D element in VR

To display a 2D element (text, or image) it is necessary to use a node of type World Space 2D Container. In this case, the display of the 2D element will be affected to a position, an orientation and a size in the 3D space.

The case of instructions is problematic since it is often a text or an image. As we have seen, it is possible to display a text in 3D space, but in the case of the instruction this is not enough. You have to display the text in front of the subject, and make it follow it.

VRmaze provides a VR Head Instruction 3D Bridge node that follows the subject. Coupled with a World space 2D container it allows the display of 2D data in front of the subject camera.

Image title 2

The `VR Head Instruction 3D Bridge` with a `World space 2D container` child and simple text.

VR Subject Setup.

The VRSSubject node has a finer parameterization than the conventional subject. It actually has an additional joystick configuration system that allows to:

  • Display a red laser pointer on 0,1 or both joysticks
  • Declare the joystick allowing the interaction (with an option to use the value declared for a subject)
  • Remove collision detection (be careful, gravity must be disabled, otherwise the subject will fall without ever stopping)

Image title 2

The subject control panel.

Behavior graphs

It is quite possible to access the information of the different VR components. However, some precautions should be taken into account. Behavior graphs propose a certain number of nodes which only give access to other entities of the protocol. It is therefore necessary that the entity exists in the protocol tree for the node to work.

Access to VR components

To access a VR component, the simplest method is to find the current trial, then access the "Subject" entity of the trial. The Subject entity will then suffice to access the VR components

Image title 2

Access to components via a chain of nodes.

In order for the behavior graph to work properly, it is necessary that the desired data exists in the protocol tree. Therefore, it must first be added to the VR components of the "VR Subject".

Image title 2

Example of existing components in a VR trial.

In the above case, access to the left hand, right hand and chest is possible. The other components (feet etc.) are inaccessible in the behavior graphs because they are missing in the protocol structure.

The list of accessible components is as follows:

  • LeftHand
  • RightHand
  • LeftFoot
  • RightFoot
  • Chest
  • LeftShoulder
  • RightShoulder

Image title 2

The available VR components.

The nodes described above only give access to the entities without any other information. It is possible to simply get the position and orientation of these components through the associated nodes:

  • Get Component Position (Returns a position vector 3 in world coordinates)
  • Get Component Rotation (Returns an orientation vector 3 in Euler angle)

Image title 2

The VR component position and rotation access nodes.

Joystick data access

Joystick data is contained in VR components of type "Hand" (Left Hand, Right Hand). Thus, if access to the left and right hands is possible, it is possible to obtain the joystick information for each of these hands.

Image title 2

The data of the joysticks is accessed by providing the VR component of type "Hand" as input.

The list of joystick data is as follows:

  • Trigger Analog (floating value)
  • Grip Analog (floating value)
  • TouchPad Button (Boolean value)
  • Button 0 (Boolean value)
  • Button 1 (Boolean value)
  • TouchPad (Vector 2)
  • Menu Button (Boolean value)

Image title 2

The list of nodes associated with VR controllers.