artoolkitx / jsartoolkit5

Javascript ARToolKit v5.x
https://artoolkitx.github.io/jsartoolkit5/examples/
Other
292 stars 69 forks source link

Cannot replace the flamingo.glb with some other model in threejs_worker_gltf example #91

Closed manojahuja11 closed 4 years ago

manojahuja11 commented 4 years ago

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.

kalwalt commented 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";
manojahuja11 commented 4 years ago

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? Capture1 Capture

kalwalt commented 4 years ago

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.

manojahuja11 commented 4 years ago

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?

manojahuja11 commented 4 years ago

Closing the issue

kalwalt commented 4 years ago

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

manojahuja11 commented 4 years ago

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.

ball.zip

I have attached the model. Please have a look at it when you can Thanks

kalwalt commented 4 years ago

@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?

manojahuja11 commented 4 years ago

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.

kalwalt commented 4 years ago

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