Start a new topic

Load tracker duration

Load tracker duration


 

 

Hi,

 

 

 

On iOS and Android, I observe 30 seconds to load the tracker (wifi or 3G). I think this is very long. The tracker is composed by 20 tracktables, the html use one different image overlay for each tractable (the overlays are less than 100kb), the zip file and the html file are downloaded from url. Does this duration is normal ?

 

Thanks.

Olivier.

Hi Olivier,

the loading time of an AR World is dependent on the type and number of AR elements you are using. Generally, the raw initialization of the Tracker should only take a couple of seconds plus the time needed to load the assets.

Of course, all the assets like the pattern set file, images etc have to be loaded over the network if you are storing them on a server. Typically each target image in the pattern set file will require roughly 50-100kb, adding to that 20 overlays with 100kb each amounts to 3-4 MB of data that need to be transferred. In case you are creating a lot of assets up front, this may lead to longer loading times as you observed (depending on network connectivity).

To reduce loading times you could only setup the tracker at startup and load the overlays in a lazy fashion once a particular target has been recognized.

Best regards,

Nicolas

 

Hi Nicolas,

 

>>To reduce loading times you could only setup the tracker at startup and load the overlays in a lazy fashion once a particular target has been recognized.

How is it possible ? We need to load the overlay before creating the Trackable2DObject:

 

 

var tel = new AR.ImageResource(imagesPath + "tel.jpg", {onError: function(){error("callUs")}, onLoaded: function(){loaded("callUs")}});

var telCallUsOverlay = new AR.ImageDrawable(SOtel, 1.0, {zOrder: 0, onClick: function() {makeACall("1234567890")}});

 

 

myTrackable2DObjects = new AR.Trackable2DObject(logoTracker, "tel", { drawables: { cam: telCallUsOverlay }});

 

How can I load the telCallUsOverlay after that the target "tel" has been recognized ?

 

thanks,

Olivier.

 

Hi Olivier,

 

you could do the lazy loading the following way: 

 

var tracker = new AR.Tracker("http://www.myserver.com/targets.zip");

var loading_image = new AR.ImageResource("http://www.myserver.com/loading_image.jpg");


// trackable 1

var trackable1_image = null;

var trackable1_drawable = new AR.ImageDrawable(loading_image, 1.0);


var trackable1 = new AR.Trackable2DObject(tracker, "target_id",{

drawables: { cam: trackable1_drawable },

onEnterFieldOfVision : function() {

if( trackable1_image == null ) {

trackable1_image = new AR.ImageResource("http://www.myserver.com/trackable1_image.jpg");

trackable1_drawable.imageResource = trackable1_image;

}

}

});


// trackable 2

var trackable2_image = null;

var trackable2_drawable = new AR.ImageDrawable(loading_image, 1.0);

...

 

Best regards,

Nicolas
Login or Signup to post a comment