How to create a Custom Image Target Demo

This section will discuss how to create your own Image target demo with the given scene in Easy AR

Step 1: Go to Assets-> Easy AR -> Scenes folder and double click on Image Target scene to load the scene

Step 2: Select AR Session Origin Game object. There you can see the AR Tracked Image Manager component which includes our image reference library and tracked image prefab. Tracked image prefab which is a prefab that appears after tracking the image.

Step 3: To change image reference go to Assets -> Easy AR -> Library folder. There is an XR reference image library called ReferenceImageLibrary. You can create this kind of XR reference image library by right-clicking on the project window, Create -> XR -> Reference Image Library.

Step 4: If you create a new Reference Image Library, rename it or edit a given Reference Image Library by selecting and checking the inspector

Step 5: In this component the first element is texture that you need to track. Drag and drop your image (tracking image) to this element. Set name as you prefer in the Name field. Check specify size and set image real physical size in meters. Our image's real physical size is 15 cm so set as 0.15 to X and Y values. Also Check Keep texture at runtime field.

Step 6: Then select AR Session origin, drag and drop our reference image library to the Serialize Library field in AR Tracked Image Manger script. Max number of moving images refers how many images need to track at same run time.

Step 7: Then it needs to set the Tracked image prefab. If you have prefab drag and drop into that field or you can create your own. Put your mesh into the hierarchy window.

I took the RI_Humvee_Vehicle vehicle from the Meshes folder. Set its scale to smaller like 0.3 all xyz.

Step 8: Next convert this game object to prefab by dragging and dropping your game object from the hierarchy window to the prefabs folder. Then delete the game object from the hierarchy.

Step 9: Select back AR Session Origin. Set the newly created prefab into the Tracked Image Prefab field.

Step 10: Now you can build the scene by going to File -> Build Settings. In the Build settings window check whether the Image Target scene available on the scenes in build. Click the build button to build the app.

Last updated