I got a problem with 3d model loading deformed (sticking the texture on screen/polygon points deformed) for some 3d models if the app sleeps/locks then resume when it is tracking..
Here's the code how i call it, as i want to save memory as for i have more than 20 models to load..
var marker1 = new AR.Trackable2DObject(this.tracker, "marker1", {
drawables: {
cam:
},
onEnterFieldOfVision: function onEnterFieldOfVisionFn() {
console.log('enter');
World.fish_minor = new AR.Model("assets/bone_fish/fish_minor.wt3",{
scale: {
x: 0.1,
y: 0.1,
z: 0.1
},
translate: {
x: 0,
y: -1,
z: -3
},
rotate: {
roll: 0,
tilt: 270,
heading: 0
},
onLoaded: function(){
setTimeout(function() {
World.fish_minor_anim_0 = new AR.ModelAnimation(World.fish_minor, "Animation_00");
World.fish_minor_anim_1 = new AR.ModelAnimation(World.fish_minor, "fish_Geo_GRP1_animation");
World.fish_minor_anim_2 = new AR.ModelAnimation(World.fish_minor, "fish_Geo_GRP2_animation");
World.fish_minor_anim_3 = new AR.ModelAnimation(World.fish_minor, "fish_Geo_GRP3_animation");
World.fish_minor_anim_4 = new AR.ModelAnimation(World.fish_minor, "fish_Geo_GRP4_animation");
World.fish_minor_anim_5 = new AR.ModelAnimation(World.fish_minor, "fish_Geo_GRP5_animation");
World.fish_minor_anim_6 = new AR.ModelAnimation(World.fish_minor, "fish_Geo_GRP6_animation");
World.fish_minor_anim_7 = new AR.ModelAnimation(World.fish_minor, "fish_Geo_GRP7_animation");
World.fish_minor_anim_8 = new AR.ModelAnimation(World.fish_minor, "fish_Geo_GRP8_animation");
World.fish_minor_anim_9 = new AR.ModelAnimation(World.fish_minor, "fish_Geo_GRP_animation");
actually there are some other wt3 which has the same habit in my project
Bascially if one crashed, it will affect the whole arworld and the only thing you can do is to kill the app and restart the app...
Thank you for your help
A
Andreas Fötschl
said
over 7 years ago
Please test with latest SDK version (an update was just released yesterday) and check if the issue still occurs.
Also ensure to optimize your 3D Models for mobile use, a 6.5MB wt3 file is not recommended as it will consume multiples of the compressed filesize in memory. Please try optimizing it so that it uses hald of the size approx. Besides that I recommend using a datastructure that holds all required information of an augmentation, that way you can easily loop through components that need to be paused or destroyed instead of hardcoding them.
Leo Tam