Closed ghost closed 5 years ago
Hi, are you referring to QR Code or Marker?
@kingov Shouldn't you just be setting the scale of the model to fit your needs? @nicolocarpignoli Is the marker a certain size like 1m2 when it is recognised or does it depend on the physical size of the marker?
because the model are not the same , so i can't scale model to fit qrcode .
i mean Marker
I try to summerize:
you cannot set (or at least, easily) the model to be great as the QR Code. This because the qr code recognization occur before the launch of the arjs web app.
If you want to make the model great as the marker, you can scale the model. You have to try and see how much to scale, it depends on initial size of the model.
@droid001 it depends on physical size of the marker, that is recognized from the camera: of course if the marker is 10x10cm but you are 10meters far, from the camera perspective the marker is tiny.
I'm thinking in terms of units. Take for example the basic AR.js demo, the box has size of 1 on all sides var geometry = new THREE.CubeGeometry(1,1,1);
. That would mean if you have a model which came out of a 3D rendering programme like Blender which base unit i 1m, then you could calculate the desired size of your model, which you know from the rendering programme, and the physical size of your marker.
If you wanted a 1m3 cube to be represented in AR as it's physical size then for a 10cm marker you would have to increase the size of your cube by 10.
When the mobile phone recognizes the QR code, the loaded model does not match the size of the QR code.
Can the model be set to the size of the QR code after successful recognition?
Is there any api I can use?