1. Home
  2. Docs
  3. Unity SDK
  4. Integrations
  5. How To Integrate Vuforia
  6. Assign a 3D Model to a Vuforia Image Target

Assign a 3D Model to a Vuforia Image Target

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

https://lh4.googleusercontent.com/KTOqoVDBPOCvw2-yGH_7BaqbyU_8fA-nxwg9MKNjeoHFnayQhegr1JNL0iDFeuV26GGhInfH55Y_zqaZjWKMh6a_0KC3k-0l75xX2uHcjFgaI5Nzh9pVAWgi9vDN-tMWIZdfesrW

https://lh4.googleusercontent.com/IGhNzatO-QMt2CDDSANrdTLrKp7oKwzfUaoUmF7MhEzjI_TyNx3sgZjQrZNuF8utcSCEDT0bz0KhKa7sLE9Q80Y5zOtgzUEu-D7gUhIqd6EhpWnakbJUParp3g6ypxMN9tMxywD7

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.

Was this article helpful to you? Yes No 1

How can we help?