1.1.0 • Published 2 years ago
@wonderlandengine/mind-ar-tracking v1.1.0
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-trackingto this object. - Set the
mindPathparameter to the path of the compiled MindAR target file, i.e.targets.mindfile. For example, you can put thetargets.mindfile into astaticfolder 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 > Materialsand 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 > EmptyonAR Camera. Optionally rename it to "Tracking Target 0".- Attach a
image-tracking-targetcomponent to this object, assign theAR Cameraobject to thearCameraparameter. targetIndexis the index of the target images in thetargets.mindfile. If you only have one target, it should be0. Add any content as child objects of theTracking Targetobjects.
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
