Target scale and object scale

If you recall, when we added the business card image to the Vuforia database it asked us to specify the real-world width of the object. We say it's 3.5 inches, but first we converted it into meters and entered 0.09 meters for the width. Then, when we used the image on the ImageTarget, it has the actual size in the scene.

The camera's position relative to the target is calculated at runtime by tracking the target. To track the target continuously we need to keep in mind the target's size and its distance from the device's camera. You can estimate the minimum size for a target by dividing the camera-to-target distance by 10. For instance, a 10 cm wide target would be detectable up to about 1 meter (10 cm x 10). In this example, we are using a business card (0.09 m), which is usually viewed at arm's length (0.81 m). Although this calculation doesn't consider lighting conditions, we can feel confident that our business card image is trackable.

We also want to make sure that our image has enough detail to be tracked at the calculated distance. To do this, we should take into account the image target resolution or dots per inch (dpi). Vuforia's target extracts the correct resolution automatically and recommends images that are 320 pixels.

In contrast, ARtoolkit is not so automated. It asks you to define the range of the extracted resolutions. This calculation depends on camera resolution. If you are using a variety of HD video feed, you might want to use 20 dpi as the minimum and the image target's dpi as a maximum. Since this might lead to excess data, you can also use the NFT Utilities for ARToolkit (found under the path: [downloaded ARToolkit Utilities root directory]/bin).

When we added our drone to the scene, we made it a child of ImageTarget. By default, objects under ImageTarget are disabled and not rendered. But at runtime when the AR software recognizes the target specified in ImageTarget, all its children are enabled and become visible.

How big should we make the drone or any other virtual object you want to augment your scene? One way to think about it is how big would it be in real life? If you want the drone to rest on the business card like a big bug, then envision a big bug on the card and measure it! Conversely, if you wanted to represent a real drone flying actual size in your room, you would make sure the drone model is scaled to actual size in Unity (for that scenario, you will probably use a bigger target image than a business card, or a different target type altogether).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.198.49