6

Is it possible to use occlusion for 3D Model AR.GeoLocation in AR GeoObject ?

We are working on an app that would display advertisement banners at a certain height on a building when you enter a predefined geofenced area.

Now, at the current stage, using wikitude we are able to place the AR object model onto the building. But the issue is that, are able to see the model beyond walls and building between the target building. We want to avoid this and show the ad only when there is no hindrance between the target building and the camera.

The confusion I have is that we want the occluder to be dynamic in its behaviour. So whether its a building, a tree, hand or anything else, the effect should be applied and model not be displayed for that portion that is being blocked.

Also, I have attached a couple of URLs for your reference to showcase what we are looking for

  1. https://www.youtube.com/watch?v=a5NLRMEnu2U
  2. https://www.youtube.com/watch?v=CQFkTvEcfpk

var World = {
  loaded: false,
  rotating: false,

  init: function initFn() {
    this.createModelAtLocation();
  },


  createModelAtLocation: function createModelAtLocationFn() {

    /*
        First a location where the model should be displayed will be defined. This location will be relativ to the user.    
    */
    //var location = new AR.RelativeLocation(null, 5, 0, 2);

    var geoLoc = new AR.GeoLocation(23.027390, 72.558721, 320.);//National Handloom
    //var geoLoc = new AR.GeoLocation(23.028350, 72.506674, 320.);//Iscon
    //var geoLoc = new AR.GeoLocation(26.206274, 73.048096, 320.);//Jodhpur
    //var geoLoc = new AR.GeoLocation(40.319421, -74.631490, 320.);//client

    var location = new AR.RelativeLocation(geoLoc, 10, 10, 10);

    /*
        Next the model object is loaded.
    */
    var modelEarth = new AR.Model("assets/earth.wt3", {
      onLoaded: this.worldLoaded,
      scale: {
        x: 10,
        y: 10,
        z: 10
      }
    });

    var indicatorImage = new AR.ImageResource("assets/indi.png");

    var indicatorDrawable = new AR.ImageDrawable(indicatorImage, 0.1, {
      verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP
    });

    /*
        Putting it all together the location and 3D model is added to an AR.GeoObject.
    */
    var obj = new AR.GeoObject(location, {
      drawables: {
        cam: [modelEarth],
        indicator: [indicatorDrawable]
      }
    });
  },

  worldLoaded: function worldLoadedFn() {
    World.loaded = true;
    var e = document.getElementById('loadingMessage');
    e.parentElement.removeChild(e);
  }
};

World.init();

Please let me know

Thanks Umesh.

n1stre
  • 5,856
  • 4
  • 20
  • 41
Umesh AHIR
  • 738
  • 6
  • 20
  • FYI: The first video from 2Sens is using their extra hardware camera to get occlusion data. The second video with ARKit has the user placing invisible objects to match the walls to create the occlusion. Right now object detection requires special cameras (like Project Tango) or equipment used in self driving cars. – Morrison Chang Jan 20 '18 at 05:36
  • @MorrisonChang, Hello, URL is for only reference, i want that effect on Wikitude AR SDK.. – Umesh AHIR Jan 20 '18 at 10:48
  • 1
    You could model each building/tree/sign in your geofenced area however that won't prevent vehicles & people from interrupting the field of view and making your sign float in-front. That is implied by the firetruck example in https://www.wikitude.com/external/doc/documentation/7.0/android/objecttracking.html#basic-object-tracking `An occluder is a 3D-Model that is not rendered, but rather keeps the elements behind it from being rendered.` If you are asking about dynamic occlusion well I don't believe that is possible without special hardware and generally works for only limited distances. – Morrison Chang Jan 22 '18 at 02:38

0 Answers0