Closed manojahuja11 closed 4 years ago
@manojahuja11 could be for different reason, but if it is tracked probably is in the scene. Some tips that will help you to sort it out:
// inside the GLTFloader
model = gltf.scene.children[0];
model.name = "testingModel";
var found = function(msg) {
if (!msg) {
world = null;
} else {
world = JSON.parse(msg.matrixGL_RH);
var o_view = scene.getObjectByName('testingModel');
console.log(o_view);
}
};
so in this way you will know if the model is effectively in the scene or not. If it is in the scene maybe the model is too large or too little or displaced. You have to make some essays, we have not found at the momente a standardized way for doing this. We are also working on this you can see our progress in this PR https://github.com/kalwalt/jsartoolkit5/pull/42 If you have a piece of code placed in a github repository, i can also take a look at.
Hi @kalwalt @nicolocarpignoli The model is getting loaded for sure. I have attached 2 images which shows the code and the log.
I am trying to change the position and scale of the model but its not getting reflected in the log. I think some code is over-riding it. Any ideas?
You should look into the MatrixWorld of the object, if too big probably will be outside of the view, the values should be in the range of -1.0 +1.0 (approx) .I hope that this will help you.
Hi @kalwalt Thanks for the quick reply. I think problem was the model itself. It was huge in size (16 MB)
Does it starts downloading the model once it tracks the image?
and also, most of the values in MatrixWorld are in the range of -1 to 1 except a few and it works fine. All the values should be in the range of -1 and 1?
Closing the issue
I think problem was the model itself. It was huge in size (16 MB)
i think that is good for kill the app! it depends also by the scale of the model, the range of matrixworld can be that but if the modell is too big the camera can be inside the model itself and so you can not see the model...
Hi @kalwalt By huge in size I meant the size of the model which is 16 MB. I tried decreasing the scale of the model to 0.1 but still cannot see it.
I have attached the model. Please have a look at it when you can Thanks
@manojahuja11 In this case you need to enlarge the scale of the model, test this gist the model seems incomplete but maybe the model is not exported correctly or maybe you missed some textures?
Hi @kalwalt @@nicolocarpignoli The tracking works fine now.
I had an another question, can we do multiple image detection in NFT?
I did not knew where to post this question so I am posting it here.
Thanks in advance.
Hi @kalwalt @@nicolocarpignoli The tracking works fine now.
I had an another question, can we do multiple image detection in NFT?
I did not knew where to post this question so I am posting it here.
Thanks in advance.
@manojahuja11 see this https://github.com/kalwalt/jsartoolkit5/issues/40
Hello @kalwalt @nicolocarpignoli
I am not able to replace the flamingo.glb model with some other model. I tried it with gltf and glb models, but no luck. In the console, I can see that the image is getting recognized but the model does not shows up.
Please help. Thanks in advance.