Get Started with Improved World Tracking and the Universal AR SDKs

Hi everyone!

If you’ve seen Simon’s ‘First Look’ post, you will know that we’ve been working hard to deliver our new and improved World Tracking for WebAR implementation for some time now. Today, we’re pleased to announce that new and improved World Tracking for WebAR is available on the beta branches for our Universal AR SDKs! :tada:

With the warnings out of the way, here’s how you can get started!


Click the drop downs below to learn how to either develop a new project or convert an existing one.

:sparkle: Developing New Projects

Web-based Universal AR SDKs (A-Frame, Three.js, Babylon.js, React Three.js)

To create a new improved World Tracking for WebAR experience with the web-based Universal AR SDKs, simply follow the usual installation steps for your chosen library, then add ‘@beta’ to the end of your NPM installation command. For example:

npm install --save @zappar/zappar-threejs@beta

For now, new and improved World Tracking for WebAR is only available via NPM.

:warning: The beta branches of the npm modules no longer support Webpack 4, Webpack 5 is required. One advantage of this switch is that it is no longer necessary to add the specific rule for zcv.wasm to your project’s webpack.config file.

Universal AR for Unity SDK

To create a new improved World Tracking experience for WebAR with Unity, simply follow the usual installation steps, then add ‘#beta’ to the end of your imported Git URL. For example:

    https://github.com/zappar-xr/universal-ar-unity.git#beta
Universal AR for PlayCanvas SDK

To create a new improved World Tracking experience for WebAR with PlayCanvas, simply fork the beta branch project, found here.

:arrow_heading_up: Converting Existing Projects

Web-based SDKs (A-Frame, Three.js, Babylon.js, React Three.js)

To update existing web-based projects, you can simply run the same installation command as above to update your project’s Universal AR SDK dependency to the beta branch.

For example for projects using the Universal AR SDK for Three.js:

npm install --save @zappar/zappar-threejs@beta

:warning: The beta branches of the npm modules no longer support Webpack 4, Webpack 5 is required. If your project is currently using Webpack 4 you may want to upgrade to webpack 5 first and ensure the build still works before updating the Universal AR SDK.

One additional required change for existing projects is to remove the specific zcv.wasm webpack rule from your project’s webpack config. This rule is no longer required and needs to be removed for bundling to work correctly with the beta branch:

      {
        test: /zcv\.wasm$/,
        type: "javascript/auto",
        loader: "file-loader"
      }
Universal AR for Unity SDK

To use the Unity Package Manager to update your existing project, simply follow the usual steps to import the package, then add ‘#beta’ to the git import URL. Unity should automatically fetch and update the package for you.

Otherwise, you may want to edit your project’s manifest.json file instead. Simply add ‘#beta’ to the end of the Zappar dependency entry. For example:

"com.zappar.uar": "https://github.com/zappar-xr/universal-ar-unity.git#beta"

Then save manifest.json. The next time that you enter your project, Unity should automatically resolve the package for you.

Universal AR for PlayCanvas SDK

To update an existing PlayCanvas project, simply click on your Zappar Universal AR scene settings in the PlayCanvas Editor, then find ‘External Scripts’ in the right sidebar:

You should then replace the following script URL:

https://libs.zappar.com/zappar-js/0.3/zappar.js

With the new script URL:

https://libs.zappar.com/zappar-js/0.4.0-beta.5/zappar.js

We really hope you enjoy experimenting with this new functionality, happy creating!

All the best and have a wonderful day,

Team ZapWorks :zap:

2 Likes

Nice works guys. Tracking works fine fine for us on Android using Playcanvas. we where using https://libs.zappar.com/zappar-js/0.4.0-beta.5/zappar.js
But we are running intro issues on the two iPads we where testing. iPad with iOS 14.8. The screen goes dark and the question for the camera does not appear. Then nothing else happens.
Maybe this is the same issue we ran into when running our playcanvas apps with zappworks on the same ipads we got a black sceen there as well but your programmers sorted this thing out with an update. Francesca you might remember that issue.

Cheers Clarence

Hi Zapworks team, this new implementation looks really great, cant wait to start using it! Is it possible to download a template to start using new functionalities of this upgrade?

Thanks.

How’s the update for Studio coming along?

Hey everybody!

Just thought I’d pop on here to add some helpful bits of news -

:new: Improved World Tracking for WebAR - Updates for ZapWorks Studio

You’ll be happy to know that you can also develop improved World Tracking for WebAR experiences with ZapWorks Studio! :tada:

Here’s a post with the information you’ll need to get started.

:open_book: Improved World Tracking for WebAR - Universal AR Examples

We’ve also updated a few Universal AR SDK examples to include the beta branch:

This should provide some insight as to how you can use the package - as you can see, we use the instant tracker as usual, we’re just including a different branch of the SDK in our project!

Have a great day!
Francesca :blush:

1 Like

I am trying the new World Tracking with Unity using the #beta on the git url, but I am not seeing new performance compared to using the #beta. Also, if I try scanning using wtbeta.arweb.app url it wants to launch the scan URL not open in that site.

What am I doing wrong?

Thanks,
-Eric

Hi Eric,

Sounds like there’s a bit of confusion going on here. If you’re using the Unity package for development then you won’t need to use wtbet.arweb.app, that site is purely for ZapWorks Studio made experiences. For Unity, you’ll be creating your own build, which you can either host with ZapWorks or self host. You can also host this locally for testing.

I’d recommend having a watch over these two videos to help understand how to get setup with instant tracking and how to host your Unity build:

hth

George

Hello everybody!

I just wanted to add a quick update to this post to let you know that this implementation is now in the main branch of our Universal AR SDKs! :tada:

Therefore, going forward, to use Improved World Tracking and the Universal AR SDKs, you can simply use the main branch of your chosen SDK as you normally would - just make sure that you are using version 2.0.0 or above.

:warning: The beta branch is now fully experimental and should be used at your own risk.

We will of course continue developing our New and Improved World Tracking; but for now, we’re so happy to include this significant improvement on our previous implementation as standard.

Happy creating!
Francesca :blush:

1 Like