Log in or register to post comments

Image Target Size Issues

February 1, 2013 - 6:03pm #1

I'm having problem trying to set the Image Target's scale 1 while maintaining the scene units of the Image Target as defined in the Image Target's xml file. I tried to use my own plane mesh with the units 11 x 8 as the Image Target and defined that size in the Image Target's xml file. But the Editor will always change my mesh to a 1 x 1 unit mesh and set its scale to 11 instead.

Apparently, the Image Target's scene units will always be set at 1 x 1 unit while its scale will be set according to the width defined in the Image Target's xml file. It's like using Unity's scale as scene units. I figured the rationale for this behavior is to allow for dynamic resizing of Image Target in Unity since Unity doesn't allow you to set scene units. But scale is not the same as units and this behavior is confusing and problematic. I wanted to keep my Image Target's scale to 1 so that my 3d objects can maintain their scale under the Image Target parent.

Does anyone have the same issues and is there a solution or workaround?

Many thanks in advance.

 

Image Target Size Issues

February 3, 2013 - 12:45am #3

After more testing, I realized that QCAR's behavior is to set the scene units to the aspect ratio of the dimensions defined (in my case 11 x 8  gives an aspect ratio of 1 x 0.8) and then set the scale to the width to arrive at the final dimensions. Correct me if I'm wrong. This would mean that we will not be able to set the Image Target's scale to 1. It's misleading to define a dimension in the XML and ending up with a product of scale x aspect ratio. Normally, we would expect the dimensions in the XML to set the scene units of the Image Target. While the product of scale x aspect ratio would give the same dimensions as defined in XML, the behavior is unexpected. Perhaps the documentation should be clearly on this.

Anyway, yes, creating an empty gameobject to parent the models and making that gameobject a child of the target solves the local scale issue of the models. It's such a simple workaround, why didn't I think of that?! Thanks for your help!
 

Image Target Size Issues

February 2, 2013 - 12:20pm #2

As you've observed, the scene's unit scale is inherited from the width defined for the target and local scale is 1. There is no way to change this correspondence. It's used to pose the target or camera depending on how you've defined your World Center Mode. You can change the dimensions in the XML file and then select Vuforia > Apply Dataset Properties from the menu to apply custom scales after importing the dataset.

Can you achieve what you're looking for by parenting our model with a gameobject and making that gameobject a child of the target?

Log in or register to post comments