# Eye-Tracking in Interactive Virtual Environments: Implementation and Evaluation
## 4 Discussion and Conclusions
### Contributions to Eye-Tracking in VR  
The paper provided an overview of working with eye-tracking data for experiments or applied scenarios built around the theory and proposed algorithms--all the processes and data flow related to eye-tracking in virtual environments are proposed to be regarded as a software architecture and a structured approach (Section 3.2, Figure 3). Specifics of designing and building 3D virtual environments optimized for eye-tracking research are covered (Section 3.4). During data collection, a raw eye-tracking data stream (Section 3.3) is projected against the virtual environment and saved into a CSV file (Section 3.5). The raw data are then processed through an external script and cleaned of noise. The data can then be further processed externally to obtain basic statistical metrics, or the data can be imported back into the 3D engine for the 3D/in-engine algorithms to execute spatial corrective processing (Section 3.6). The reloaded or reprocessed data can be visualized and interpreted in-engine, over the experimental environment (Section 3.7). Given the breadth of the subject, the paper is not exhaustive. Future research will address the paper's shortcomings and extend its potential--mainly by extending the provided algorithm examples into polished solutions that are applicable in experimental settings and verifiable for their algorithm and interpretation efficacy. While the linked GitHub repository is documented in both its readme file and source code comments, future work predetermines the repository to become a living text with updates and additions. Regardless, the GitHub algorithm source code examples published along with this paper will serve as a basis for future implementations. The algorithms were implemented as complements to the algorithm proposals described in Sections 3.5-3.7. The included algorithms are listed and described as follows:  
* **experiment\PathScript.cs** is our custom-built logger. On its own, it implements generic logging functionality (i.e., user movement, user interface usage, and user collision with other objects (e.g., spatial polygons depicted in Figure 5)). Moreover, custom logs to be passed to it, to be written into CSV files. Eye-tracking data can be one of such custom inputs. * **experiment\DualRaycaster.cs** is an extended implementation of the raycaster function provided by the SRanipal API [62]. The second raycaster can be specified to pass through some virtual environment object layer(s) (Section 3.5, _Dual Raycaster_). It utilizes the PathScript logger to produce eye-tracking CSV logs. The logged variables are derived from the variable listing needed for further eye-tracking data processing (Section 3.3). * **experiment\MultiLevelColliderClient.cs** and **experiment\MultiLevelColliderServer.cs** is a server-client solution for segmenting eye-tracking colliders (AoI) according to the user-object distance (Section 3.5, _Multi-level collider segmentation_). The server-client separation is intended so that the collider switching logic can be customized regardless of the collider-switchable objects present in a 3D scene--meaning that multiple clients subscribe to one server. Depending on server implementation and set-up (performance and evaluation heuristics), multi-level eye-tracking colliders are switched through the experimental runtime. * **verification\CSVReader.cs** is an auxiliary script that loads CSV files back into the evaluation runtime (Section 3.2), to be converted into a List\Dictionary\(<>>\) data structure. Such data structures can be processed further by data cleaning (Section 3.6) and data visualization (Section 3.7) algorithms. * **verification\Recaster.cs** is a re-raycasting script intended to reprocess existing eye-tracking data onto a scene with post-hoc altered 3D object and 3D object collider naming/structuring (Section 3.6, _Recaster_).