**1. Introduction**

Exposure to immersive environments creates different sensations with different intensities in participants. The participant's responses to the stimuli sent by the virtual environment reflect the effect it causes. During exposure, the participant's brain activity is stimulated and changes in this activity can be measured by electroencephalography. The analysis of the results of the registered signals reflects the effect provoked on the participant [1,2].

Since the changes in brain activity are a participant's response, usually involuntary, to the stimuli sent by the system, the interest in using them as an element of interaction becomes relevant. If the system can detect and interpret these values, it can use them to become more interactive, adapting its behavior to the participant's reactions. Stimuli trigger emotions and emotions generate reactions. The inclusion of interactivity during the experience by real-time Biofeedback mechanisms increases the feeling of presence in the virtual environment [3].

The real-time data obtained on the user's physiological aspects allows for determining how the stimuli affect him. On the other hand, when the user receives information in real time about a certain aspect of his physiology, he can determine how his mental changes can influence his state [4].

The introduction of biofeedback systems in the design of a simple immersive environment transform it into an Emotionally Adaptive Immersive Environment, where the user experience can be optimized through the continuously adaptation of stimuli to the user emotional state. The quantity and intensity of the stimuli are determined through an

**Citation:** Costa, R.; Gomes, P.V.; Correia, A.; Marques, A.; Pereira, J. The Influence of Brain Activity on the Interactive Process through Biofeedback Mechanisms in Virtual Reality Environments. *Eng. Proc.* **2021**, *7*, 15. https://doi.org/10.3390/ engproc2021007015


Academic Editors: Joaquim de Moura, Marco A. González, Javier Pereira and Manuel G. Penedo

Published: 7 October 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

adaptive affective algorithm, which collect, interpret, and convert the user's physiological data [5].

The main objective of this project is to develop a software tool that incorporates a dynamic and parameterizable algorithm to be used as a core engine in the real-time Biofeedback process, this software tool is the element responsible for making the connection between the Looxid Link device coupled to VR HeadSet and the unity platform that manages the immersive environment.

#### **2. Materials and Methods**

#### *2.1. Materials*

Table 1 describes the hardware and software used to develop the project. For a non-evasive electroencephalogram device (Looxid LinkTM Mask for VIVE) coupled with VR Headsets HTC Vive ProTM, the software was developed using the C# programming language.


**Table 1.** Hardware and software used to develop and implement the project.

#### *2.2. Methods*

Unity3D software was used as a development and interconnection platform between the Looxid Link device coupled to VR HeadSet and the VR application. Using the C# programming language, an algorithm was developed to create a real-time Bio-feedback core-engine generator.

The algorithm recognizes the values of the biological signals registered in each of the EEG channels of the Looxid Link device; these values reflect the participant's states of relaxation and attention, allowing the definition of value intervals, with the attribution to each one of interactive variables that can be used in the Biofeedback process.

The development of the algorithm included five aspects. Access the values of the EEG signals detected by the Looxid Link device through sensors AF3, AF4, AF7 AF8, Fp1, and Fp2, and Fpz. Group the values detected by each of the sensors into frequency ranges aggregating these values into two indicators, relaxation and attention. Assign an interaction variable to each frequency range. Assign the desired functions to each interaction variable.

Parameterize the period between readings of the values of the interaction variables allows for determining the desired degree of interactivity.

#### **3. Results**

The software incorporates a dynamic and parameterizable algorithm to be used as a core-engine in the real-time biofeedback process. The algorithm recognizes the values of the biological signals registered in each of the EEG channels of the Looxid Link device, identifying the participant's states of relaxation and attention and allowing the definition of value intervals, with an interaction variable attributed to each one that can be used in the Biofeedback process by VR applications.

#### **4. Discussion and Conclusions**

One of the applications of the developed core-engine can focus on the participant's states of relaxation and attention. The Looxid Link device determines these two states in real time during exposure, allowing them to be used as an interactive element. The algorithm uses these values and, according to predefined intervals, readjusts the intensity of the stimuli generated by the system or triggers new stimuli.

This feature has two important advantages. It increases the level of interactivity generated by the application, as this results from the real-time reading of the participant's brain activity that was generated by the emitted stimuli, with the new stimuli generated adapting to the participant's real reactions. The other advantage is the interoperability of the algorithm, which can be adapted to different virtual reality applications, simply by parameterizing the intervals according to the desired amount and sensitivity of the system. After this parameterization, it is possible to assign which stimuli are intended for each interaction variable.

**Author Contributions:** Conceptualization, R.C., P.V.G.; methodology, R.C., P.V.G.; validation, P.V.G.; investigation, R.C.; writing—original draft preparation, R.C.; writing—review and editing, R.C., P.V.G.; visualization, R.C., P.V.G.; supervision, A.M., J.P.; project administration, R.C. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Acknowledgments:** This research was carried out and used the equipment of the Psychosocial Rehabilitation Laboratory (LabRP) of the Research Center in Rehabilitation of the School of Allied Health Technologies, Polytechnic Institute of Porto.

