Differentstudy protocols about perception, attention, cognition and memory can be constructed using the toolbox. VREX provides a procedural generation of (interconnected) rooms that can be automatically furnished with a click of a button. VREX includes a menu system for creating and storing experiments with different stages. Researchers can combine different rooms and environments to perform end-to-end experiments including different testing situations and data collection. For fine-tuned control VREX also comes with an editor where all the objects in the virtual room can be manually placed and adjusted in the 3D world.
Conducting both ecologically valid and at the same time highly controlled psychological and neuroscientific experiments is a notoriously difficult task, preventing it from widespread use [1]. Controlling or manipulating every variable in real life is often not possible (e.g. making a couch silently disappear in an instance), too expensive (constructing a special building just for an experiment) or even dangerous (confronting someone with a hungry lion). Hence, researchers commonly settle to present 2D images on a computer screen. Obviously such conditions lack many real-life features and make it questionable how much of the cognition happening in the natural world can be captured in these simplified model environments [2].
Recently launched consumer grade VR headsets such as the Oculus Rift and HTC Vive allow 360 optical tracking and up to 16 square meters of movement space, while at the same time being affordable. These hardware breakthroughs in the last few years have made VR technology available for almost any lab studying experimental psychology. Also, major game engines such as Unity (Unity Technologies) and Unreal Engine (Epic Games, Inc) now have built-in VR support straight out of the box. However, this new research paradigm requires specialized knowledge in software and hardware technology in order to create immersive and presence-inducing virtual realities. In particular, knowledge of 3D modeling and texturing, game engine logic and scripting are all needed.
Many psychology labs still lack these competences. The primary aim of the Virtual Reality Experiments (VREX) Toolbox is to help psychology researchers easily create experiments for virtual reality setups by providing an open-source software suites as an Unity add-on and standalone version (see additional files 1 and 2), documentation and a web platform. Next we present related works, detailed descriptions of toolbox features and two possible use cases.
There are a wide variety of Unity add-ons assisting the generation of interactive virtual worlds, such as Playmaker [10], Adventure Creator [11] and ProBuilder [12] to name a few. Yet these toolboxes are very general-purpose. There also exists some software applications similar to VREX in terms of simplifying the creation of VR experiments for psychological research, e.g. MazeSuite [13] and WorldViz Vizard [14]. The list of compared software is not comprehensive and here we briefly describe only two of them with key differences to VREX.
MazeSuite is a free toolbox that allows easy creation of connected 3D corridors. It enables researchers to perform spatial and navigational behavior experiments within interactive and extendable 3D virtual environments [13]. Although the user can design mazes by hand and fill them with objects, it is difficult to achieve the look and feel of a regular apartment. This is where VREX differs, having been designed for indoor experiments in mind from the beginning. Another noticeable difference is that MazeSuite runs as a standalone program, while VREX can be embedded inside Unity Game Engine, allowing for more powerful features, higher visual quality and faster code iterations in our experience.
WorldViz Vizard gives researchers the tools to create and conduct complex VR-based experiments. Researchers of any background can rapidly develop their own virtual environments and author complex interactions between environment, devices, and participants [14]. Although Vizard is visually advanced, this comes at a price of the licence fee to remove time restrictions and prominent watermarks. VREX matches the graphical quality of Vizard with the power of Unity 5 game engine, while staying open source and free of charge (Unity license fees may apply for publishing).
As any software matures, more features tend to be added by the developers. This in term means more complex interfaces that might confuse the novice user. The advantage of VREX is the narrow focus to specific types of experiments, allowing for clear design and simple workflow.
The basic elements of the toolbox are environments consisting of single or multiple rooms. Environments can be sequenced to create experiments. Special pre-made environments can be added for displaying instructions to the participant or administering tests. Environments can be grouped together as ordered or randomized trial blocks. Thus an experiment can start with a text environment as instructions for the participant, then present procedurally generated rooms in a random order and end with a test block to gather responses. A typical pipeline for an experiment can be seen on Fig. 1.
Reading through and modifying C# code can be a taunting task. While Unity natively displays public variables in the inspector window, navigating a long array of options quickly gets overwhelming. Also, when building a standalone version, access to variables via user interface is lost. For these reasons VREX provides a separate graphical user interface inside the toolbox to give the user intuitive access to common operations within the program (Fig. 2). The simple menus allow creating and modifying environments and build experimental plans with different stages.
An environment is used as the main building block for experiments. Each environment consists of one or more rooms and may be populated with objects. The user can either create an environment from scratch or duplicate or modify an already existing environment. Starting from a blank scene, it is possible to either autogenerate the environment or combine rooms one-by-one manually (Fig. 3). The default option is autogeneration, as this feature saves time and provides an unique environment layout every time. For automatic generation of connected rooms it is mandatory to specify the number of desired rooms (up to 10). The user can also choose the dimensions of the rooms. Due to the algorithms employed, the rooms are either square (11), or rectangular (11.5 or 12). Autogeneration combines the rooms in a way that doorways connect and the geometry avoids overlapping. Currently VREX is confined to generating indoors environments.
After an environment is created either procedurally or by hand, it can then be populated with available 3D objects either automatically or manually. For automatic furnishing there can be a set number of objects in each room. The objects have pre-defined properties that place them according to a general logic - tables and chairs are placed on the ground, small object lay on the tables and shelves are attached to the wall etc. Automatic furnishing of objects saves time and produces a novel room layout on every instance. Figure 4 shows different autogenerated layouts for the same environment.
There are a number of openly licenced objects available in the toolbox (Fig. 5). With random placement some objects may end up in illogical positions from an interior design point of view. This can be easily corrected in the 3D editor.
For fine-tuned control VREX comes with an editor where all the objects in the room can be manually adjusted in the 3D world or new objects added (Fig. 6). Navigating the 3D editor is achieved with the mouse and keyboard. All objects in the scene can be moved, rotated and scaled, and the diffuse colour can be changed. Here the user can also define experiment-specific behaviours when an object is selected.
In false memory related experiments VREX supports logging all the objects seen by the participant during a trial and later modifying their position in a room or presenting them for cued recall. Recall only contains items seen by the participant and optionally distractor items chosen by the experimenter. Recall can also have a set time limit. VREX currently supports two modes of recall - objects are either placed in an empty field or shown one by one. The participant must select all previously seen objects by moving close to the object and pressing the response key or answering yes/no in the case of one by one presentations.
After the environments have been finalized, experiment creation can begin. A new experiment must have a type, either change blindness or false memory. Each type has a specific set of options available regarding the time limits and test levels. Next the researcher can sequence all necessary environments in an ordered or randomized groups, add instructions to the participant and set appropriate test conditions.
Some experiments call for specific 2D or 3D objects that are not available in the standard VREX project library. Bringing in custom models involves using the standard Unity import pipeline and creating prefabs with specific properties outlined in the user manual. Prefab objects must have a tagged interconnector component attached and an origin point at the base of the geometry. For optimal performance, objects should not have an excessive polygon count. There is also a tutorial video detailing the whole process here:
Spatial audio improves immersion in virtual reality [6]. The toolbox allows for easy placement of 3D sounds within the environments through the 3D editor, without using the standard Unity menus (Fig. 6, upper right). The implementation uses Unity built-in spatial audio algorithms and head-related transfer functions to create realistic sound transformations. For performance reasons it is advised to keep the total number of 3D sounds low.
Every time an experiment is run through VREX, a data log is created in the VREX system folder under Results. The following is logged by default: Participant ID, start time of the experiment, current environment, environment order, test type, score (correct or false answer) and elapsed time. In case of change blindness and memory experiments additional parameters are stored, such as change count, changed object(s) and participants answer(s). Time is measured with millisecond precision.
3a8082e126