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
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.