[Unity 3D] Use EasyAR to realize the AR augmented reality function of single image recognition (with implementation steps)

EasyAR plugin

Next use the AR plug-in to make a case

EasyAR is a free and easy-to-use full-platform AR engine that supports AR using flat targets. It supports smooth loading and recognition of more than 1,000 local targets, supports video playback based on hardware decoding, supports QR code recognition, and supports simultaneous tracking of multiple targets. For multiple platforms such as PC and mobile devices, EasyAR will not display watermarks, and there is no limit on the number of recognition times. After getting the EastAR package or EasyAR sample, readers need a Key to use it. Let’s get a Key below.

First use the email to register and enter the official website to register according to the guidelines

official website

Apply for Key after successful registration

Click I need a new Sense license key and fill in the package name and other necessary information

After confirming, you can see the Key interface as follows

The application name can be modified

Bundle ID can be modified

Package Name and Bundle ID are mainly used when packaging programs

After preparing the Key, you need to import the AR SDK

download url 

Unity 3D import

Create a new 3D template and select Window-Package Manager in the top editor to open the package manager, click the plus button in the upper left corner of the package manager and select the Add package from tarball command from the local to the plug-in package as shown in the figure

After importing, you can see the EastAR menu in the top command line, select the EasyAR-Sense-Configuration command, configure the plug-in parameters and fill in the applied Key

Find any picture as the identification picture, drag the picture into the StreamingAssets folder of the Project view, if there is no such folder, create a new one

Create a new scene and set the ClearFlags property of the Main Camera object to Solid Color Background property to pure black

In the Hierarchy view, click the plus button, select the EasyAR Sense-Image Tracking-AR Session command to add an AR Session object, and select the Target image Target command to add an Image Target command

After saving the scene, select the File-Build Settings command to pop up the Build Settings window, click the Add Open Scenes button to add the current scene, and select Android for Platform, if not, install it

Finally, click the Player Settings button in the lower left corner of the Build Settings window to open the Other Settings option and modify the Package name property to the field filled in when applying for the Key

Finally, click the Build button, install the generated Android package on the mobile phone and run it, then scan the picture model imported into Unity, and the model will come out

It's not easy to create and find it helpful, please like, follow and collect~~~ 

Guess you like

Origin blog.csdn.net/jiebaoshayebuhui/article/details/128676165