Multiple users on shared MR environment
Niemi, Arttu (2024)
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2024121535943
https://urn.fi/URN:NBN:fi:amk-2024121535943
Tiivistelmä
Tavoitteena oli kehittä yhdistetyn todellisuuden sovellus, jota voitiin käyttää itsenäisesti käytettävillä virtuaalitodellisuuslaseilla. Sovelluksen tuli tukea useiden käyttäjien yhdistämistä samaan ympäristöön ja käyttää heidän suhteellista sijaintiansa toisiinsa. Suhteellinen sijainti on tässä tapauksessa tärkeää, koska sovellusta on tarkoitus käyttää samassa huoneessa muiden kanssa, joten sijaintien ja suuntauksien on vastattava reaalimaailmassa ja virtuaalimaailmassa.
Projekti kehitettiin Unity-pelimoottorilla. Projektin verkkotoiminta toteutettiin Mirror-verkostointikehyksen avulla, joka on yksi tunnetuimmista Unityn verkostointikehyksistä. Mirrorin avulla on mahdollista rakentaa verkostointi asiakas-palvelin-mallilla, jossa yksi asiakkaista toimii myös palvelimena, joten ulkoista palvelinta ei tarvita.
Käyttäjien sijaintien synkronointi toteutettiin trilateraatio-menetelmällä ja katseiden suuntien synkronointi trigonometrian avulla.
Lopputuloksena saatiin synkronointiskripti, jota voidaan käyttää useissa projekteissa. Osana lopputulosta tehtiin esimerkkisovellus, joka käyttää kyseistä sijainnin ja suuntauksen synkronointimenetelmää. The objective of this thesis was of mixed reality (MR) application for stand-alone virtual reality (VR) glasses. It needed to be able to support multiple users connecting to same environment and use their relative position. The relative position is important in this case as the application is supposed to be used in the same room with others, so the positions and orientations need to match between the real world and virtual world.
The project was developed in Unity. The networking for the project is done using Mirror networking, which is one of the most well know networking libraries for Unity. With Mirror, it is possible to build networking in client-server model where one of the clients also act as server, so there is no need for external server.
The synchronization of users’ positions is done using trilateration and orientations is done using trigonometry. This thesis goes through the mathematics for trilateration and trigonometry that was used, and their implementation in Unity.
The end product is that synchronization script that can be used in multiple projects. Part of the end product is example application using that method of synchronizing position and orientation.
Projekti kehitettiin Unity-pelimoottorilla. Projektin verkkotoiminta toteutettiin Mirror-verkostointikehyksen avulla, joka on yksi tunnetuimmista Unityn verkostointikehyksistä. Mirrorin avulla on mahdollista rakentaa verkostointi asiakas-palvelin-mallilla, jossa yksi asiakkaista toimii myös palvelimena, joten ulkoista palvelinta ei tarvita.
Käyttäjien sijaintien synkronointi toteutettiin trilateraatio-menetelmällä ja katseiden suuntien synkronointi trigonometrian avulla.
Lopputuloksena saatiin synkronointiskripti, jota voidaan käyttää useissa projekteissa. Osana lopputulosta tehtiin esimerkkisovellus, joka käyttää kyseistä sijainnin ja suuntauksen synkronointimenetelmää.
The project was developed in Unity. The networking for the project is done using Mirror networking, which is one of the most well know networking libraries for Unity. With Mirror, it is possible to build networking in client-server model where one of the clients also act as server, so there is no need for external server.
The synchronization of users’ positions is done using trilateration and orientations is done using trigonometry. This thesis goes through the mathematics for trilateration and trigonometry that was used, and their implementation in Unity.
The end product is that synchronization script that can be used in multiple projects. Part of the end product is example application using that method of synchronizing position and orientation.