<AR GAME> Oxygen Poor
- Amelia Zhu
- Jun 17, 2021
- 2 min read
Development and design 3
Recognizing garbage to generate poisonous gas effects in AR

Part 1 --- 3d Object Tracking
Learning Reference
- Looking for a plug-in that can track 3d models in AR.
- Learn how to use model tracking in AR Foundation.
Tutorial
- Using Unity's AR Foundation with VisionLib's Model Tracking
- Unity3d LiDAR - How To Use LiDAR Scanner With AR Foundation?
- Create an AR Shopping Experience - Scan & Detect Real 3D Objects
Challenge
- For the first time, I chose the VisionLib plug-in to track 3d models. When I
checked the instructions on the plug-in's official website, I found that this plug-
in has two restrictions.
1. The 3D model it tracks needs to have enough detectable structure.
2. The real model needs to be completely suitable for the virtual model.
These two conditions do not match the scenario I want to apply.
- For the second time, I chose to use the LiDAR plug-in to track 3d models, but its
function is limited to tracking the entire space and identifying all objects in the
space. I hope to only identify and track garbage models in the AR space.

I found on the official Unity website that there is no function to recognize and track 3D models in AR scenes. Therefore, I chose to use 2d object tracking to achieve the effect of ‘garbage recognition’.
Part 2 --- 2d Object Tracking
Learning Reference
- The basics of image tracking: select prefabs for tracking images.
- Create an image library and add any images I want to track.
Tutorial
- AR Foundation Image Tracking - Unity Augmented Reality/AR
- AR Foundation Improved Image Tracking - Multiple Objects/Images
Object tracking
- During the experiment, it was found that it is very important that the added
image suffix is ‘jpg.’ Need to pay attention to whether the jpg is lowercase,
otherwise the program will report an error.
- Set the image in the image library to keep the texture size consistent at runtime.

I conducted a tracking test on single image.
Improve Image Tracking - Multiple Objects
- Test load multiple models.
- The name of the prefab needs to match the texture name.
- Take a picture of the object I want to track in advance and crop the picture to a
size of 1024*1024.
- Create image tracking scripts, call placeable prefabs.


- Set Placeable Prefabs size and element.
Toxic gas special effects

Test & Debug

After testing, it is found that the system can recognize and track multiple images in the AR scene, but cannot load multiple prefab models at the same time.
Comments