VR Subway Simulator

Roles

  • Texturing
  • Level Design
  • Lighting
  • Modelling
  • Scripting

Tools Used

  • Unity
  • C#
  • Substance Painter
  • Substance Designer
  • Blender
  • Git
  • GitLab Issue Tracker

Project Description

Agoraphobia is a specific form of anxiety disorder in which fear is triggered by different places or situations, such as open spaces or crowds. The goal of the simulation is to reduce or remove the patients fear of a phobic situation as part of exposure therapy through an immersive experience. In cooperation with the vfkv – Bildungsinstitut München gGmbH a prototype for a VR exposure in the form of a virtual reality subway simulator was developed.

VR offers the possibility to create an immersive and realistic environment that allows the presentation of complex and dynamic 3D stimuli. In this context, a subway ride is virtually simulated, which can be controlled and monitored by the therapist during the VR exposure. This means that the simulation can be modified at any time and adapted to the individual course of therapy. This type of exposure avoids unpredictable and potentially dangerous situations, which could benefit patients who are not prepared to undergo in vivo exposure.

The simulation was developed by a team of 7 students and was awarded the special prize of the jury for the best serious game 2020 by the Computerspielakademie Bayern.

My Role

During the development of this project my main tasks were texturing and level design. Most 3D models of the project were textured by me using Substance Painter. Procedural textures of the subway stations, e.g. the floor or walls, were created by me with Substance Designer. 3D models that were modeled by other students from the team were further detailed and optimized in Blender.

The three subway stations consist of modular pieces and were put together by me. Another task I was assigned to was the lighting and baking of the train, subway stations and tunnels (see project difficulties for more info on the baking process).

Since the travel time between stations can be configured by the therapist, the tunnel was procedurally generated. Therefore, I created a script for the spawning of the different tunnel sections, which lets the level designer configure the probability of a model being spawned (weighted random algorithm). I also assisted another student with coding problems and bugfixing.

The simulation was developed by a team of 7 students, as version control system we used a private GitLab server with the GitLab Issue Tracker to define issues, sprints and milestones.

Notable Features

  • Virtual Reality simulation developed with Unity, using the Dell Visor as VR device.
  • The simulation can be controlled and monitored by a therapist during the exposure therapy session. The simulation can be modified at any point and adapted to individual therapy progress. Parameters are, for example, the position of the patient, the number of train passengers and the duration of the train ride.
  • Simple procedural generation of subway tunnels and train stations (varying models and textures).
  • Realistic (low poly) 3D models and textures.
  • Custom sound design of the trains.
  • Baked lighting of movable objects.

Project Difficulties & Solutions

  • When working with multiple texture sets, Substance Painter exports each texture set individually. Therefore, UV space is unused and multiple redundant textures are created. Since there is (strangely enough) no option to merge these texture sets when exporting, I created a small tool with Substance Designer to merge up to 5 texture sets.
  • Unity Engines HDRP shaders requires a mask map with Metallic, AO, Detail Mask and smoothness textures packed into one map. Since a few individual data textures were already exported, I created a small tool to pack the individual texture maps into one texture map.
  • Because of technical reasons the VR pawn should be in the same position of the coordinate system while riding the train, the entire environment, i.e. the subway stations and the tunnel, was moved to simulate the train ride. Therefore, the light of the level could not be baked with ordinary means. Since the tunnel consists of randomly selected models, the lighting could not be baked in advance in the usual way either. The solution to this problem was the Prefab Lightmap Baker script  (GitHub Version), which allows the baking of individual prefabs instead of the entire level.
  • To make the NPC passengers behave more believable when entering the arrived train and choosing a position to sit/ stand the standard unity NavMesh wasn’t enough to achieve this. Therefore, the extended version of the NavMesh from the Unity GitHub had to be implemented to get access to functions like weighted areas. Some of these functions also were bugged in the Unity version we were using so the version had to be updated.
  • When the Unity project was created, the SRP was selected as render pipeline. Since later on we wanted advanced features like decals and the Unity Shader Graph, we upgraded to the HDRP. This led to a time-consuming upgrade of the shaders and textures.