Start a new topic

Xamarin 3D Model not works

Xamarin 3D Model not works


50.000 vertices and 1 MB file size is quite light-weight and should be renderable on all devices.

Before further investigating this problem I would ask you check again what does work and what doesn't. Please test the 3D models and the devices again, so that we can be sure on the following:

Does the 3D model which doesn't render on the Huawei P8 Lite show up on other devices?

Do other 3D models render correctly on the Huawei P8 Lite?

Hello,

sorry for the late answer,

the Huawei model is the P8 Lite, and the SDK Examples work fine on it.

The log doesn't show up any useful information about the status of the recognition, but i think i've found the problem: my 3D model il slow to be loaded in devices like Samsung S5 and S6 that are great performance smartphone, and it's impossible to be loaded in low cost smartphone.

So i think that the model is the problem, my model is generated starting from a FBX model created in Blender.

The model technical specs are:

Verts 55,806 - Faces 28.949 - Tris 28,949 - Mem 26,28M

When i convert it into wt3 model using your 3D Encoder the final weight of it is 1.09 MB

Are there any limits about verts, faces, ecc.. in the render engine?

I'm using SDK 5.1.4

Which Huawei model?

The camera image is visible?

Do the SDK samples work on this device? That is, are the samples working, which do not use 3D model augmentations, but image or video drawables? 

Is there any error message or does the app's log give a hint what's going wrong?

Thank you, with this sample i have solved the issue.

Now all works fine. But i still have a question, why on my Huawei phone the augmented reality don't show up? It's a 2015 device

I tested your use case with the following code sample, which worked out fine, toggling between the models when clicking them while keeping the same target: 

    

    this.model1 = new AR.Model("assets/model1.wt3");

    this.model1.enabled = false;

    

    this.model2 = new AR.Model("assets/model2.wt3");

    this.model2.enabled = true;

 

    this.model1.onClick = function( drawable, model_part ) {

                                World.model1.enabled = false;

                                World.model2.enabled = true;

                            }

    

    this.model2.onClick = function( drawable, model_part ) {

                            World.model2.enabled = false;

                                World.model1.enabled = true;

                            }

    

    var trackable = new AR.Trackable2DObject(this.tracker, "*", {

                                                 drawables: { cam:  }

                                             });

I tested the file you had attached and they work as the revious, good on Samsung devices and they not renders on Huawei devices. (but in this moment it is passable)

Now i have an other question, how can i switch between different models?

My code is the same, but i have always the previous model drawed on screen, when i switch (for switching i'm calling init function with different parameters).

And i had to move the phone and then target again the marker to show the selected model, how can render different 3d model without moving phone from the target?

var pageOne = null;
var tracker = null;
var modelsArray = null;
var World = {
loaded: false,
init: function initFn(toShow) {
this.createOverlays(toShow);
},

createOverlays: function createOverlaysFn(toShow) {

var variant = jQuery("#variant").val();
var colorType = jQuery("#color_type").val();

tracker = new AR.ClientTracker("assets/magazine.wtc");

modelsArray = ;

jQuery("#tk_door").empty();
jQuery("#tk_door").append(toShow);

for(var k = 0; k < modelsGlobal.length; k++)
{
var tmpModel = new AR.Model("assets/"+modelsGlobal+".wt3", {
scale: {
x: 0.2,
y: 0.2,
z: 0.2
},
translate: {
x: 0.0,
y: 0.05,
z: 0.0
},
rotate: {
roll: 180
}
});

modelsArray.push(tmpModel);

if(k == toShow)
modelsArray.enabled = true;
else
modelsArray.enabled = false;
}



pageOne = new AR.Trackable2DObject(tracker, "*", {
drawables: {
cam: modelsArray
}
});
},

worldLoaded: function worldLoadedFn() {

}
};

World.init(0);

 

Glad to hear that.

Can you give these two wt3 files a trial?

I tested the 2 models,

They render perfectly on Samsung S6Edge (Android 5.1) and S4mini (Android 4.4.2), but with Huawei P8Lite (Android 5.1) still don't work. In that phone i can see only the car.wt3 provided by the example.

I'm working with SDK 5.1.1 version and in console logs there aren't errors.

I converted your FBX with the Wikitude3dEncoder 1.2 (see attachments) and tested it with the SDK 5.1.0 on Xamarin with iPhone 5 and it rendered correctly.

Which device are you using?

Is there any error message on the console?

Any news??

Hello,

I've attached an archive with 2 fbx models for testing them. In the application there will be about 20 different models.

 

Unfortunately there is not yet a date set for releasing SDK 5.1.3 for Xamarin.

Please send us your model (fbx). Maybe there is a workaround.

I've tryied with other versions of SDK (5.0.0 and 4) and the model still not render.

Is there a specific encoder for the 5.1.1? I'm really in trouble with this issue...

Thank you,

When this version of the SDK will be released for Xamarin?

And how can i render my model with the 5.1.1? There is any kind of walkaround?

I tested your wt3. It renders fine in the newest version of the WikitudeSDK (5.1.3) which will be released shortly. 
Login or Signup to post a comment