DecoAR is an App for exdended the decoration at home, office or any place. It is aimed to track different images from home and provide overlayed content on top of that, when we see them thru the smart glasses.
Aim of this project is to easily configure the images from the environemnt you want to extend, and see in the smart glasses like ThinkReality A3 or similar. It usage Qualcomm Snapdragon SDK's image tracking feature.
Here are steps user need to do.
- Import this project in Unity and import Spaces SDK
- Take some pictures from the environent your want to extend.
- Define actions for those pictures, following actions are available
- 3D model - a 3D model will pop out of the image.
- Video - a video will play on top of the tracked image
- Animation - a gif animation will play on top of the tracked image
- Audio - an audio will play on top of the tracked image
- Text - a formatted text will be shown on the tracked image.
- Once data is setup, build the project and run in the smart glass.
- Open https://spaces.qualcomm.com/download-sdk/
- Login to your account or create a account if you don't have.
- Click on "Download SDK" button for unity
- Unzip the Downloaded file
- Clone the repo
- Navigate the file that we unzipped and Copy the
SnapdragonSpaces_Package_0_11_1.tgztoPackagesfolder in the project. - Open the project with Unity editor
- Wait until import and compilation are done.
- After importing click on the Snapdragon Spaces in Package Manager.
NOTE: If you want to upgrade the spaces SDK, then download the latest version of the SDK from https://spaces.qualcomm.com/download-sdk/ and the import the .tgz file from Package Manager.
- Get the images(JPG/JPEG/PNG) that you want to track.
- Take printout and stick it to the wall.
- Drag and drop the image files under
Resourcesfolder.
- Click on the Image to view it on Inspector window
- Check the checkbox for
Alpha is transparencyandRead/Writeboth - Choose the
Wrap modeasClamp - Click on Apply to apply all the changes we made.
- Apply same settings for all the images you want to track.
- Check
Image LibrariesFolder. There you will findReferenceImageLibrary. - Click on it to view it on Inspector window.
- To add a Image, click on
Add Imagebutton on the bottom. It will add a new row to add image. - Drag and drop the image from Texture folder into the newly added row.
- Check the box
Specify Sizeoption and add the height width of the physical image. Note that the values should be inMeters. - Then check the option for
Keep texture at Runtime. - Update the total count of images in Image Reference Library in
AR Session Origingame objectMax Number of moving imagesfield underAR Tracked Image ManagerScript. - Repeat the same if you want to add multiple images.
- Open the
PrefabInstatiaterprefab fromResources > Prefabsfolder. - Set the minimum distance between same images.
- Add images with Action
- Click on plus icon to define an action to a image.
- Add the image name(Should be same as in ReferenceImageLibrary)
- Add the type of action
- Add the source path of the action(Should be same as in Resources).
- Source path should be relative from
Resourcesfolder without any extension.
- Open the
Build settingsin unity. - Change the build target to android.
- Do a clean build and install in the phone to run it.
Check the demo video of image tracking here