Technical Overview 







 











  • Multi-Image Tracking

I solved the AR Foundation’s issues of image tracking.
The default script can not track multiple images at the same time, and the generated model didn’t disappear after images moved out. In script PrefabImagePairManager.cs, I added function OnTrackedImagesChanged to solve these problems.




︎Our team consists of three people, responsible for the work of development, art and UI design.
I worked as a developer and tester in the team. So my report will focus on this part.


︎gitlab: https://gitlab.doc.gold.ac.uk/asang001/arpet-group15/-/tree/main/PetGame_7/Assets/Scripts




  •  Portal Shader 

In the first scenes, I used shader PortalDoorShader.shader,
script PortalDoorTrigger.cs, and added stencil tests in every
shaders of the virtual space to finish a portal. In these
shaders, I write the Stencil Test to limit the display of area-
Tests of stencil value are used to cull pixels. Only when people
pass the portal will the values of the stencil test become unequal,
the virtual space display.

 



  • Gesture Recognition

I used ManoMotion SDK to realized the gesture recognition.
Players can make a pinch gesture to clean poop. Script:CleanObjectOnPinch.cs






  • Testing & performance optimization

Due to the particularity of AR, I have to test the mobile terminal all the time during the development process. I tested both on Android and IOS to help me troubleshoot the possible cause of the error.The development of the mobile terminal needs to pay attention to the  performance consumption. So we used the most simplified model and relied on lightmaps instead of rendering realtime lights.




  • Plane Tracking

To implementing the summon funaction, I used the Plane Tracking in AR Foundation to make a ground-based setup. Here I refered to ALLinReality’s tutorial and completed the placement of the portal and the summon of the pet. Script: PlacePortalOnPlane.cs   
         PlancementIndicator.cs  PlaceOnPlane.cs
Reference: https://www.youtube.com/watch?v=lelX8GGh_S8&t=327s