How do I create an AR marker for Vuforia / Unity?

白昼怎懂夜的黑 提交于 2019-11-28 11:42:24

To answer your question specifically, yes your Marker is your Target.

So what you need to do is:

  • Go to License Manager. Add a License Key choosing None as your License plan.

  • Now go to Target Manager. Create a Database and add the license for it from the drop down.

  • Add Target, and select from your computer the Image that you want to be the Marker, and upload it.

  • Once the status of the Target changes to active you can click Download Database and make sure you click For UnityEditor. This downloads a .unitypackage

  • Now inside Unity, go to Assets>Import New Assets... and locate to the .unitypackage you downloaded

This is how you import your database.

If you haven't Imported the Vuforia package Unity Extension then you simply need to download it from the Downloads section and Import it through the Assets>Import Package> Custom Package

  • Now ideally to work with AR, you would use the AR Camera, which is located in your Assets Bar in Qualcomm Augmented Reality>Prefabs. Drag ARCamera onto your scene.

  • With the AR Camera selected in the Hierarchy look at the Inspector tab. You'll see Data Set Load Behavior. Under that you SHOULD see the name of the .unitypakage you imported ealier. Check the name as well as make it Active.

  • Now in Qualcomm Augmented Reality>Prefabs you should also see Image Target. Drag that onto the screen as well.

  • With the ImageTarget selected in Hierarchy look at the Inspectorthere should be Image Target Behaviour

Fill in as follows

Type: Predefined
Data Set: <Name of imported .unitypackage>
Image Target: <Name of Picture uploaded into the Database>

Now you may work around the Image Target as per your app requirement.

NOTE: In the License Manager, click on the Name of the License and you'll see a Alpha-numeric code. Copy that code, and within the Inspector of the AR Camera, under QCAR Behaviour>App License Key paste the code in. This must be done in order for your app to work on your > device.

Hope this helps you. Please feel free to ask me if anything.

Moshe Ben-Zacharia

There are a couple things that you need to do before getting this to work.

Firstly, I noticed you mentioned creating a Target Database on the Vuforia website, but have you actually added any markers to it? Markers are the actual AR images that will be scanned. A Target Database is a collection of markers that can be used simultaneously in your Unity application.

Once you have your markers uploaded they should have a 2-4 star rating as shown in the picture

After downloading the database as a UnityPackage you have to import it into Unity along with the Vuforia Unity SDK.

If you are still having trouble getting an example scene running within Unity you can download a sample scene at the previous link.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!