A note for the pros and intermediately skilled. Since this is a basic tutorial, I will be very detailed to help those in need of a step by step nature of explaination. It may be boring a bit for the ones in the know, so skim through the whole tutorial and pick out what you need yeah.
In order for you to follow this tutorial, you would need:
- Unity 2019.1.5 (and above), with Android deployment module
- XZIMG Augmented Vision for Unity. Download from here
- A marker image. Use this one here
- A 3d model to use. You can use your own or use this
- A webcam or laptop with camera
Download and Unzip the XZIMG Augmented Vision SDK
Go to the download link provided in the prerequisite, login and download Augmented Vision 2.0.2 Free Version
The next thing you need to do is to extract or unzip the XZIMG Augmented Vision SDK. At the end of this step you should have a folder like so:
Open the sample scene
Inside the folder, go to Assets>Scenes> and double click on sample-AugmentedVision unity scene.
Unity will start and load the project. Your screen should look something like below.
Creating your own marker
In the Project window, Go to Assets > Resources. Then, Drag and Drop the marker image into the project window.
Right click the marker image, go to Create, and click XZIMG Natural Image Classifier
It will start generating the marker. You can see the progress from the notification bar.
Once done.. the marker will appear in your project window.
Marker creation process done.
Using your own marker
Select the imageDetector prefab
In the inspector window, drag and drop the newly generated marker to the Classifier slot of the Xmg Augmented Image.
Test Your Marker
Press the play button to test
Your marker should now works!
Changing the model
Drag and drop the model folder into Assets
Go to the Assets > Character_Cactus > Mesh
Drag and drop the mesh under Pivot 1
Press play to preview the model
It is upside down. So the next thing we need to do is to rotate the model and retest.
Delete the cube, and we are done.