2017.
Welcome to VOID AR
VOID AR is devoted to the continuous development of new AR technology in order to fulfill the AR developers with ultimate imaginaries, creativities and more high quality AR contents.
You can learn to use our products from here if you are trying VOID AR for the first time.
SDK APIs
VOID AR SDK API provide three methods:
first method: call the API directly, e.g.:
VoidAR.GetInstance().startMarkerlessTracking(); |
second method: override base class methods or implement interface, e.g.:
protected override IMarker SetCloudVideoComponent(GameObject markerTarget, GameObject videoPlayTarget, string markerName, string videoPath){ |
third methed: VoidAREvent mechanism, e.g.:
AddEventListener(VoidAREvent.FIND, OnFind); |
VoidAREvent properties are as follows:
name: event name.
currentTarget: event target, you can get target object for event dispatch.
data: event data, e.g.: when cloud resources are loading, data indicates loading process.
The main functional interfaces for VoidAR SDK are as follows:
1. Local Recognization
- recognize and lose interface:
The script component ImageTargetBehaviour provides the event dispatch mechanism on the ImageTarget object.
void Awake() { |
Dispatch FIND event when target recognition is successful, and dispatch LOST event when target is lost.
2. Cloud Recognization
Cloud recognition requires adding CloudController script components to the ARCamera, CloudController provides cloud recognition status, Cloud resources download, cloud custom data processing interfaces.
- Cloud recognization success response: means the cloud server has recognize the target successfully and returns the result.
/// <summary> |
Custom data added to the cloud platform is acquired by this method.
- Set cloud video component: you can expand the player and handling play event when cloud video playing.
/// <summary> |
- Message class event:
//Cloud recognition targets are created locally (start tracking) |
3. Void SLAM
- Start and stop interfaces: you need to add the ITricking interface to the GameObject of tracking, the implementation of ITricking in SDK is MarkerlessTracking in default. ITricking API is used for getting the SLAM status, including abnormal status.
public interface ITricking |
SLAM exception status code:
1099:network error;
501:developer account is abnormal, account is not filled or account data is incorrect;
101:account use exceed the uselimit
SLAM using interfaces :
//start tracking |
4. Other
- Record screen interface: In runtime, to record the AR scene into MP4 file, and save it to your photo album. Yoou need add VideoRecordBehaviour script to ARCamera.
VideoRecordBehaviour script offers the switcher of recording function with easy built-in GUI.
Enable GUI: Whether to open built-in GUI. If you do not open, you need to call REC to start or stop recording:
//Call it first time for starting recording |
The recorded video file from Android will be stored in memory card with directory DCIM folder, and The recorded video file from iOS will be stored in photo album.
- Video play interface: VoidVideoPlayer script is for video playback.
In the video play process, the following interface can obtain video play status:
//When the video resource is ready |
VideoPlayBehaviour script is for AR video playback controller, it is used with ImageTargetBehaviour script together. When the ImageTargetBehaviour assign FIND event and LOST event, ImageTargetBehaviour will call VideoPlayBehaviour automatically.
FIND event: Run VideoPlay() automatically. When the video is playing, it will call VideoPlay(0) to replay from beginning of the video each time the recognition is made;
LOST event: Automatically execute VideoPause (), pause video play.