How to overlay 3D models on a Vuforia Image Target.
This article assumes you have successfully followed the steps outlined in [permalink id=’3208′ text=’How To Integrate Vuforia’].
Create a Unity Asset Catalog
Navigate to your project space and create a new Catalog of type Unity Asset. This catalog represents the collection of 3D models available to assign to Vuforia image targets.
By Uploading Models
There are two ways to reference the actual 3D model you want to use. You can upload an asset bundle into the Motive system and reference that bundle here. If you would like to reference 3D models that way, you can follow this article for more information: [permalink id=’2963′ text=’Asset Bundle Management’].
By Referencing Unity Prefabs
The easier way is to not upload anything to the Motive servers. Create a Unity Asset item in Motive and give it the same name as a Game Object that lives directly under the Resources folder in your Unity project. My game object has the name “raydev_red_box” BOTH in Unity and in the Motive system.
Use a Visual Marker 3D Object Resource
Create a [permalink id=’1843′ text=’Script’] and navigate into that script. On the right hand side, drag and drop a Visual Marker Media resource into the center column. Beside Markers, click Add From Catalog. Now select 1 or more Vuforia image targets that you have already created. Next, choose an Audio or Video [permalink id=’2126′ text=’Media Item’] to assign to Media.
Now, when you run this script, the Visual Marker Media resource will assign your selected media to the selected image target. If you enter the camera-AR mode in your app you will see this media overlay the target.
Unassign Media to a Vuforia Target
Once this script runs, the media will stay assigned to the target indefinitely until the app shutdowns. To remove this assignment, use a [permalink id=’1856′ text=’Deactivate Resource’] resource and target the Visual Marker Media resource that is created earlier in the same script.