Start a new topic

GeoObjects not shown in AR, while correctly present and enabled in AR.om-array

I'm currently testing an AR-game (https://www.utropico.com) with 100 testers.

During these tests we find out that once in a while, GeoObjects are not correctly shown in AR. GeoObjects that are correctly created using new AR.GeoObject do not appear in AR.

This isn't consistent behaviour and hard to replicate, when loading a world, it happens around 10% of the time, with exactly the same code.


As I'm logging the AR-object, I've compared the AR.om-array in situations when the object is correctly shown with situations when it isn't shown, but there are no differences.


Please find attached JSON-file of the AR.om-array. In this case the Model with id 115 is not visible/shown in AR.
I've also attached the wt3-file. However, we face this problem with other, completely different wt3-files as well.

Are you aware of any bugs or glitches that can cause this behaviour? This is currently blocking the development of my game and I'm very keen to solve this issue. But at the moment I'm stuck, so I hope you can shine some light on this dark matter :)


Details:

- I'm using Wikitude v9.5 for Cordova, with cordova version 10.0.0

- Described problem appears both in the iOS and the Android-builds, but it seems to happen more frequently in Android. It might be more frequently in older devices, but that needs more research.

- If necessary, I can provide a step-by-step approach to 'replicate' this by mail

wt3
json
(120 KB)

Good morning Jasper,


We were not aware of the issue you mentioned. Could you reproduce it only in your application or did you also check our sample app?


It may be an issue with the location you are sending to our SDK. Did you check if the location values you send are correct when the GeoObjects are not shown? Are those values similar to when the GeoObjects are shown?


Regards,


Aitor.

I can reproduce it in my application only. I've checked the sample app, but because of the way my application works, I can't easily port this scene to the sample app.


All GeoObjects have relative locations, and like I've said, all settings in the logged AR.om-array are identical in the situations when the object is shown or not shown: 


(..)

{

   "destroyed": false,

   "__id": 114,

   "location": null,

   "northing": 8,

   "easting": 0,

   "altitudeDelta": 0

  }, {

   "__id": 115,

   "destroyed": false,

   "enabled": true,

   "mirrored": true,

   "rotatesToCamera": false,

   "rotate": {

    "x": 0,

    "y": 360,

    "z": 0,

    "global": {

     "x": 0,

     "y": 0,

     "z": 0

    }

   },

   "translate": {

    "x": 0,

    "y": 0,

    "z": 0,

    "global": {

     "x": 0,

     "y": 0,

     "z": 0

    }

   },

   "scale": {

    "x": 0.4,

    "y": 0.4,

    "z": 0.4

   },

   "uri": "assets/hexbox-rio.wt3",

   "originalScale": 0.4

  }, {

   "destroyed": false,

   "drawables": {

    "cam": [{

     "__id": 115,

     "destroyed": false,

     "enabled": true,

     "mirrored": true,

     "rotatesToCamera": false,

     "rotate": {

      "x": 0,

      "y": 360,

      "z": 0,

      "global": {

       "x": 0,

       "y": 0,

       "z": 0

      }

     },

     "translate": {

      "x": 0,

      "y": 0,

      "z": 0,

      "global": {

       "x": 0,

       "y": 0,

       "z": 0

      }

     },

     "scale": {

      "x": 0.4,

      "y": 0.4,

      "z": 0.4

     },

     "uri": "assets/hexbox-rio.wt3",

     "originalScale": 0.4

    }],

    "radar": [],

    "indicator": [],

    "initialization": []

   },

   "enabled": true,

   "renderingOrder": 0,

   "__id": 116,

   "locations": [{

    "destroyed": false,

    "__id": 114,

    "location": null,

    "northing": 8,

    "easting": 0,

    "altitudeDelta": 0

   }]

  }

Hello,


I did check, but couldn't find anything that could lead to this issue. If there is no problem, could you send me the javascript file/piece of code where you are using the Wikitude SDK to try to find a clue on what's going on?


Regards,


Aitor.

Thanks for checking! I'll try to replicate the issue in the Wikitude sample app. That will give me an opportunity to pinpoint the exact problem and minimize the code to check for you. I'll let you know!

I can replicate this issue using the Wikitude sample app.

Please test this world: https://www.utropico.com/sample/test


It is using this tracker image: https://www.utropico.com/spelbord.pdf


If you launch this world, you'll see 16 hexagons. As soon as the tracker image is recognized, they will all rotate 180 degrees. This works fine!


But... If you launch this world with the camera targeted on the tracker image (which is often the case in the way my app is used), so that the image is immediately recognized on launch, you'll notice that in some cases not all hexagons appear. You may need to launch it multiple times before this will happen. In my case it happened around 5% of the times I loaded the world. From my test group I suspect this happens most often on older Android devices.


In this example, the tracker is added to AR first, followed by the GeoObjects. The issue seems solved if you add the GeoObjects first and then the tracker. My educated guess is that in this example the ' imageRecognized' is triggered before AR has asynchronously handled all work on the geoobjects, leading to unexpected results.


So I have solved my issue by changing the order of building my world and adding some time-outs, but still this is an interesting issue I'd like to know more about to prevent this in the future. 


Source code can be found on https://www.utropico.com/sample/test/js/game.js

From what I understood, you are combining our ImageTracker to, once the image is recognized, show the GeoObjects. Is this correct?


I had a look at the code you sent and it makes sense that changing the order of the calls fixes the issue you are having as it may happen that, while the ImageTracker is totally loaded, the GeoObjects are not.


Nevertheless, I'll create an internal ticket to investigate why the GeoObjects sometimes are taking its time to load properly.


Regards,


Aitor.

In addition to the previous info, we are already providing a working sample in our app combining ImageTracking + GeoObjects which is called 2dTrackingAndGeo.

Login or Signup to post a comment