@wonderlandengine/mind-ar-tracking

1.1.0 • Public • Published

Integration of mind-ar-js, an open-source image tracking framework, for Wonderland Engine.

Try it!

Examples are live here.

Setup

The fastest setup can be achieved by copying one of the examples and adjusting it for you use case.

Create a Marker

Prepare target images and compile them into .mind file using the mind-ar-js compiler tool.

Project Setup

With a new Wonderland Engine project, follow these steps for setup:

  1. npm i --save @wonderlandengine/mind-ar-tracking
  2. Disable VR in Views > Project Settings > VR & AR

Tracking Camera

Set up the camera to receive tracking results:

  1. Right-click "root", Add Object > View (Camera), optionally renamed it to AR Camera.
  2. Attach a new component image-tracking to this object.
  3. Set the mindPath parameter to the path of the compiled MindAR target file, i.e. targets.mind file. For example, you can put the targets.mind file into a static folder under the root directory, and then set his parameter to targets.mind.

Camera Feed

Setup the camera feed in the background:

  1. Find "Sky" in Resources > Pipelines.
  2. Set the shader to "Background" and enabled TEXTURED.
  3. Create a new material "VideoFeed" in Resources > Materials and make it use the Sky pipeline.
  4. Go to Project Settings > Rendering, enable sky and drag-drop the new material into the material slot.

Tracking Targets

  1. Right-Click > Add Object > Empty on AR Camera. Optionally rename it to "Tracking Target 0".
  2. Attach a image-tracking-target component to this object, assign the AR Camera object to the arCamera parameter.
  3. targetIndex is the index of the target images in the targets.mind file. If you only have one target, it should be 0. Add any content as child objects of the Tracking Target objects.

You can add as many targets as you want, and assign different targetIndex to multiple image-tracking-target components.

Demo

Demo Video on YouTube

Examples

Minimal: /examples/image-tracking

Multiple Targets: /examples/image-tracking-multiple-targets

Roadmap

  • Integration of mind-ar's face tracking feature

Dependencies (1)

Dev Dependencies (2)

Package Sidebar

Install

npm i @wonderlandengine/mind-ar-tracking

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

3.35 MB

Total Files

4

Last publish

Collaborators

  • sorskoot
  • davidpeicho
  • squareys