Can we add a 3D model of AR.GeoLocation with occlusion in the Wikitude JAVASCRIPT API

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

We are working on an application that will display advertising banners at a certain height in the building when you enter a predefined area with geo-photos.

Now, at the current stage, using wikitude, we can place the AR object model in the building. But the problem is that they are able to see the model behind the walls and build between the target building. We want to avoid this and show the ad only when there are no obstacles between the target building and the camera.

The confusion that I have is that we want the occluder to be dynamic in its behavior. So, whether it be a building, a tree, a hand or something else, the effect must be applied, and the model is not displayed for the part that is blocked.

In addition, I have attached a couple URLs for your link to demonstrate 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.

+5
source share

Source: https://habr.com/ru/post/1274829/


All Articles