Dagaz
Public version (0.7.1) is compatible with ConjureKit only up to 0.6.69. With the introduction of Domains, a follow up version of Dagaz will be released, with new features and Domains support.
The Dagaz module enables devices to work with Volumetric Features
A Volumetric Feature (VF) represents a volume that is occupied in the real world.
Dagaz will detect occupied space during a ConjureKit session and try to piece together large clusters of matter.
Once a large enough cluster is reconstructed, it will be added to a Session as a new Entity with an auki.dagaz.volumetric_feature
component attached to it.
Dagaz will track the new VF and update its shape and pose as it detects more information from the real world.
The current alpha version includes an Oriented Bounding Box (OBB) representing the shape approximation and the general pose estimation for real-world objects. They are shared in the session but they are not yet collaboratively assembled. This means, all participants will be able to access VFs in the session, even if they have never scanned the object, but they will not be able to contribute to a particular VFs detection and reconstruction.
The ability to create a VF collaboratively, and more, are coming in future releases of Dagaz.
The current Alpha version of Dagaz has only iOS support. Android support will be added soon.
Basic Usage
Import the Dagaz module
using Auki.ConjureKit.Dagaz;
Initialize the Dagaz module
public class Demo : MonoBehaviour
{
public Transform cameraTransform;
private ConjureKit _conjureKit;
private Dagaz _dagaz;
private void Start()
{
var config = ConjureKitConfiguration.Get();
_conjureKit = new ConjureKit(arCamera.transform, "app_key", "app_secret");
_dagaz = new Dagaz(_conjureKit, arCamera, arSession);
}
}
Volumetric Features
Get reference to the IVolumetricFeatureManager
var volumetricFeatureSystem = _dagaz.GetVolumetricFeatureManager();
Subscribe to Volumetric Feature Add, Update, and Delete events
volumetricFeatureSystem.onNewFeature += this.AddVF;
volumetricFeatureSystem.onUpdateFeature += this.UpdateVF;
volumetricFeatureSystem.onDeleteFeature += this.DeleteVF;
Show a primative box to represent the detected Volumetric Feature and store them in a dictionary
private Dictionary<uint, GameObject> _mapVF = new Dictionary<uint, GameObject>();
private void AddVF(UnityVolumetricFeature vf)
{
if (_mapVF.ContainsKey(vf._id))
return;
var obj = GameObject.CreatePrimitive(PrimitiveType.Cube);
obj.transform.position = vf._pos;
obj.transform.localScale = vf._extents*2;
obj.transform.rotation = vf._rotation;
_mapVF.Add(vf._id, obj); // Store the primative box with the Volumetric Feature id
}
Update Volumetric Features
private void UpdateVF(UnityVolumetricFeature vf)
{
if (!_mapVF.ContainsKey(vf._id))
return;
var obj = _mapVF[vf._id];
obj.transform.position = vf._pos;
obj.transform.localScale = vf._extents*2;
obj.transform.rotation = vf._rotation;
}
Delete Volumetric Features
private void DeleteVF(uint id)
{
if (!_mapVF.ContainsKey(id))
return;
GameObject.Destroy(_mapVF[id]);
_mapVF.Remove(id);
}