1

I'm trying to use Kudan AR in a project, and I have a couple questions:

1) The marker size relation to the scene seems pretty weird to me. For example, I'm using a 150x150 px image as a marker, and when I use it in the scene it occupies 150 unities! It requires all my objects to be extremely huge, sometimes even extending further than the camera far plane, which breaks the augmentation. Is it correct, or am I missing something?

2) I'm trying to use a marker to define the starter position of the augmentation, and then switch to the markerless tracking to have a broader experience. They have a sample code using the native iOS lib (https://wiki.kudan.eu/Marker_to_Markerless), but no reference on how to do it in Unity. That's what I'm trying:

markerlessDriver.localScale = new Vector3(markerDriver.localScale.x, markerDriver.localScale.x, markerDriver.localScale.z);
markerlessDriver.localPosition = markerDriver.localPosition;
markerlessDriver.localRotation = markerDriver.localRotation;

target.SetParent(markerlessDriver);
tracker.ChangeTrackingMethod(markerlessTracking);

// from the floor placer.
Vector3 floorPosition;          // The current position in 3D space of the floor
Quaternion floorOrientation;    // The current orientation of the floor in 3D space, relative to the device

tracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); 
tracker.ArbiTrackStart(floorPosition, floorOrientation);

It switches, but the position/rotation of the model goes off. Any idea on how that can be done?

Thanks in advance!

cvelenosi
  • 93
  • 7
  • 1
    Markers are directly translated from pixel size to Unity units, so yeah, that's correct. You can increase the far clipping plane of the camera to keep stuff in view. Markerless tracking has its projection matrix changed depending on orientation of the device because it uses the Gyroscope, which is why the rotation changes, and it is of course no longer tracking the marker but the environment around the marker, which is why the position can change. You'll have to account for this when making the switch. – DisturbedNeo Nov 01 '16 at 12:30

0 Answers0