Skip to content

FarmasiaVR is a virtual way of practicing laboratory work in the Viikki Pharmaceutical laboratory.

License

Notifications You must be signed in to change notification settings

FarmasiaVR/farmasia-vr

Repository files navigation

Pharmacy VR Game for Faculty of Pharmacy, University of Helsinki

Software engineering project, University of Helsinki 2019-2025

Youtube playlist of Demo videos

Group 1 Mid Demo fall 2019
Group 1 End Demo fall 2019
Group 2 End Demo spring 2022
Group 3 End Demo summer 2022
Group 4 Mid Demo spring 2023
Group 4 End Demo spring 2023
Group 5 Mid Demo fall 2023
Group 5 End Demo fall 2023
Group 6 Mid Demo fall 2024
Group 6 End Demo fall 2024
Group 7 Mid Demo spring 2025
Group 7 End Demo spring 2025

Description

Pharmacy VR Game is a virtual way of practicing laboratory work in Viikki Pharmaceutical laboratory.

The following scenarios are implemented in the game at this point in time:

  • Controls tutorial
  • Fire safety (Including multiple scenarios)
  • Changing room (Washing hands and gearing up for aseptic work)
  • Membrane Filtration (Preparation room and aseptic work)

There is also a scene for plate count method in the aseptic room that is started and under construction. Also there is an abandoned scenario for medicine preparation.

This project was started in 2019 in a University of Helsinki software engineering project. The first team laid the groundwork for VR gameplay and progression, and created the medicine preparation scene. In spring 2022, the second team expanded the game to include the membrane filtration procedure and made multiple upgrades and improvements to the game's systems. In summer 2022, the third team created a new changing room scenario, improved the overall look of the game and fixed various game systems. In spring 2023 the fourth team focused on porting the game to use the Unity's XR Interaction toolkit, porting the game to Oculus Quest, creating a new fire safety scenario and improving the user experience. In fall 2023, the fifth team focused on the fire safety part of the game, creating new scenarios and improving the former one, and making the laboratory more realistic by decorating the interior as it is in real life. The sixth group worked on the project in the fall of 2024, focusing on bug fixes and quality improvements in old scenarios and implementing English and Swedish translations to the whole game. The sixth group also started work on the new plate count method scenario. In spring 2025, the seventh group completed the plate count method scenario that had been started by the previous group. They also fixed several bugs in the existing scenarios and implemented a certificate system, allowing players to receive certificates after completing scenarios. Additionally, they made performance improvements to the game by updating the occlusion culling system.

Pharmacy VR Game was built in collaboration with the Faculty of Pharmacy (University of Helsinki) as well as the animation and visualization students of Metropolia, University of Applied Sciences. The project is released under an open-source MIT License, see LICENSE.

Customer: Faculty of Pharmacy, University of Helsinki

Implementation environment: Online Course / VR, Faculty of Pharmacy

Getting started with development

Learning Tools
Tips, tricks & links from group 6
Guide to merge conflicts

Cloning

First install Unity using Unity's official guide. Make sure to install the version of Unity that the project was developed on. This can be done by first cloning the project to your local machine, opening the cloned directory by selecting Open in the Projects tab in Unity Hub. This will prompt you to install the correct version of Unity. The project will not open in any older version of Unity and opening the project in a newer version of Unity will upgrade the project, which may break things. Updating the engine is recommended, but make sure that everyone in the development team is on the same page about which version of Unity should be used.

Additionally, make sure to install Blender. Otherwise some models may be missing when the project is opened.

Development tools

The original project was created with Unity Version: 2019.2.3.f1 and for development version has been updated to Unity Version: 2022.3.56f1 .

Additional tools used for development:

  • Blender
  • Unity XR Interaction Toolkit
  • Probuilder
  • Github Desktop (highly recommended)
  • Meta Quest Link
  • Meta Quest Developer Hub
  • Sidequest

Project Architecture and Systems overview

You can read more about the architecture used in this project in the architecture documentation & architecture picture. Note that this architecture is only used in the newer scenes.

Poke interactor
Task List
Task Manager
Mistake
Task

Old architecture

Progress system
NOTE! This is used only in the legacy portions of the game (Changing Room, Membrane Filtration and Medicine Preparation). Please, please, PLEASE avoid using this implementation at all costs. Only refer to this document if you want to fix problems with the legacy scenarios.

Changing Room, Membrane Filtration and Medicine Preparation scenes use the older GObject architecture. Unfortunately there wasn't any documentation for the old architecture besides the progress system document that was mentioned above.

Systems overview

Conversion from SteamVR (This has already been implemented.)

Scenario Overview for Fire Safety
Fire Systems Overview

Connecting a scene to Main menu
Setting up teleportation

Localization

The older scenes including Membrane Filtration use an outdated localization system but they should be already translated to fin/eng/swe. Unity has a built-in localization system that is used on newer scenes.

Performance

The game runs smoothly while the VR headset is connected to a PC and the PC is casting Unity's game window to the headset. But there are significant issues with performance on the Quest 2 running a build of the game on its own. We have tried to fix the performance issues the best we could but there is still a lot of room for improvement. Here are some methods that can improve and measure performance.

Occlusion culling

Window -> Rendering -> Occlusion Culling This improves performance by rendering only the objects in the scene that are visible to the player camera.

Occlusion culling doc (works on all scenes)

Lighting

Window -> Rendering -> Lighting & Window -> Rendering -> Light Explorer

Real time lights use a lot of resources. In almost all the scenes (Membrane filtration excluded) the lights are baked and the real time lights are cut to a minimum.

There are a lot of different lighting systems in use in this project.

At least group 6 did not get a full understanding on the different light sources, reflection probes, light probes, rendering pipelines and emissive materials. So good luck :)

Performance metrics

Unity has a built in performance analyzer. Window -> Analysis -> Profiler
You can analyse the performance of the game when it is running on your Unity game window. This also works when the VR headset is connected with Meta Quest Link.

There should also be a way to connect the VR headset to the Unity profiler via ip or a cable and analyze the performance when the App is running just on the headset. But group 6 could not get this working. :(

There is also a OVRmetrics app on the Meta Store that should able real time analysis of a running app on the Quest 2 headset but the app is somehow f'd up and at least group 6 could not install it to the headset.

Build & deploy

If you want to make a build of the game, open Unity and select File -> Build Setting. Select the platform you want to build for, select Switch Platform if necessary and select Build.

There may be some prerequisites when building for a specific platform.

Android

When building for the Oculus Quest, make sure to install the following modules using Unity Hub:

- Android Build Support
- OpenJDK
- Android SDK & NDK Tools

Additionally, if you are using the IL2CPP scripting backend, then make sure to also install the Desktop development with C++ module using Visual Studio Installer.

Windows

The prerequisites depend on which scripting backend is used in the project. This can be changed by clicking Player Settings in the build window and selecting Other Settings -> Scripting backend. Mono does not require any extra installations. IL2CPP performs a bit better, but requires the following extra modules.

- Windows Build Support (IL2CPP) (Installed using Unity Hub)
- Desktop development with C++ (Installed using Visual Studio Installer)

AppLab release to Meta store (old documentation)
Making and publishing a build

Playtesting

Grab objects by pressing the Grab button. The position of this button depends on the controller, but usually this is about where your middle finger rests when you are holding a controller. This is a toggle, which means that to release the object from your hand you need to press the grab button again.

To grab onto objects from a distance, hold the joystick forward or hold your finger on the top part of the touchpad, point it at an object and release the finger.

The move around the scene, hold the joystick towards yourself or press the lower part of the touchpad, point at the part of the level where you want to move and release your finger to move there.

To use extra functionality of an object, like spraying with a cleaning bottle, press the trigger button while holding the object.

To transfer liquids between objects, move the joystick right or press the right side of the touchpad to transfer liquid into the object and move the joystick left or press the left side of the touchpad to move liquid from the object.

Screencasting the game from Quest to browser

Test controls

To play the game without a VR headset, select the XR player in the Unity scene hierarchy and enable XR Device Simulator in the inspector. The controls should be visible on the screen

Contributors

MatiasSinisalo
Matias Sinisalo
farmasia-vr
Farmasia-vr
Uxusino
Uxusino Uxusone
Cloudperry
Roni Hokkanen
porrasm
Eetu Ikonen
Mirex97
Kukkis
Veikkosuhonen
Veikmaster
NuiS4ncE
Teo Uosukainen
SirVeggie
Veikka
vrfarmasia
Vrfarmasia
doc97
Daniel Riissanen
jobatabs
Jonatan Noponen
sashausoskin
Sasha Usoskin
UncSald
Alingué Marc
aihyytiainen
Antti Hyytiäinen
opturtio
opturtio
VilhoHeikkinen
VilhoHeikkinen
jarkmaen
jarkmaen
heidihas
Heidi Hassinen
arolaeemil
arolaeemil
juhkure
juhkure
JuhoSiitonen
Juho Siitonen
MikkoHimanka
Mikko Himanka
Saukka
Saukka
Stenbras
Stenbras
Reksa97
Reko Kälkäjä
levomaaa
Aapo Levomäki
SamiP7
SamiP7
Colabres
Colabres
McIlola
McIlola
kivik-beep
Kivik-beep
smausquared
Samu Äyhynmäki
nicolaskivimaki
nicolaskivimaki
hepitk
Hepitk
Mahlamaki
Susanna Mahlamäki
tjvalkonen
tjvalkonen
TrollRoll2
TrollRoll2
BananaMayo
Niklas Nygård
tuovinenemma
tuovinenemma
selsama
Sonja Salmi
SPitkanen
SPitkanen

About

FarmasiaVR is a virtual way of practicing laboratory work in the Viikki Pharmaceutical laboratory.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 43