@wonderlandengine/mind-ar-tracking
v1.1.0
Published
Mind-AR tracking powered AR tracking in Wonderland Engine.
Downloads
6
Readme
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:
npm i --save @wonderlandengine/mind-ar-tracking
- Disable VR in
Views > Project Settings > VR & AR
Tracking Camera
Set up the camera to receive tracking results:
- Right-click "root",
Add Object > View (Camera)
, optionally renamed it toAR Camera
. - Attach a new component
image-tracking
to this object. - Set the
mindPath
parameter to the path of the compiled MindAR target file, i.e.targets.mind
file. For example, you can put thetargets.mind
file into astatic
folder under the root directory, and then set his parameter totargets.mind
.
Camera Feed
Setup the camera feed in the background:
- Find "Sky" in
Resources > Pipelines
. - Set the shader to "Background" and enabled
TEXTURED
. - Create a new material "VideoFeed" in
Resources > Materials
and make it use the Sky pipeline. - Go to
Project Settings > Rendering
, enable sky and drag-drop the new material into the material slot.
Tracking Targets
Right-Click > Add Object > Empty
onAR Camera
. Optionally rename it to "Tracking Target 0".- Attach a
image-tracking-target
component to this object, assign theAR Camera
object to thearCamera
parameter. targetIndex
is the index of the target images in thetargets.mind
file. If you only have one target, it should be0
. Add any content as child objects of theTracking Target
objects.
You can add as many targets as you want, and assign different targetIndex
to multiple image-tracking-target
components.
Demo
Examples
Minimal: /examples/image-tracking
Multiple Targets: /examples/image-tracking-multiple-targets
Roadmap
- Integration of mind-ar's face tracking feature