Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
633 views
in Technique[技术] by (71.8m points)

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

This is a horribly basic question I know (!) but how do I create and import an AR marker into Unity? I know I am meant to do it through the Vuforia Marker Manager page. I have created a Target Database and I have downloaded the database, but how do I get the marker to display in Unity?

Also: what exactly is a Target Database? Is that another name for 'marker'?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...