Using Unity version 2019.4.23f and have a lifetime key for SDK versions released until 31 March 2020. All of my information is mainly tested in the editor with a webcam attached for the camera.
I'm updating an app that's in production but am noticing quite a few things that are wrong with it. One of the biggest issues I notice is that 1cm in Unity isn't 1cm in real world life. I've tried using the forum but want to make sure that what I read was correct.
Is it true that I can not get a correct sized model that is at least semi accurate to what is expected even though I have filled in a correct Physical Target Height? (ex. being a plane of 10x10cm in the scene being 12x12cm when trying to measure it using a measurement tape)
I have read that in newer version there should be a boolean on the ImageTrackable about the size being "absolute", but I don't see it in the latest SDK version I can download (which is 8.10 I believe). I have also read that you'll have to use ARKit/ARCore to get this kind of accuracy in combination with Wikitude.
Any clear answer would be appreciated.
If you are using the Unity Pro version, then yes, your assumptions are correct. The Physical Target Height will affect calls to some APIs, such as computing the distance from the camera to the target or between two targets, but doesn't affect the physical size of the augmentations in world space. The most that can be done here is using the Preview option to visualize the target in the Scene View and use that as a guide to align the augmentations.
In the Expert Edition of the Unity Plugin, this has been addressed and it includes the "absolute" scaling mode, which is enabled by default and doesn't require ARKit or ARCore to work properly.
Hope that helps.
So basically the version I have now isn't useable when I would need models to be accurate up to centimeters? and the only option I would have is contacting sales for the enterprise edition, including a yearly fee instead of a one-time-purchase or upgrade from my current version?
It can still be accurate in your version as well, but a scaling factor needs to be applied to the augmentations. The largest side of the image is considered to be 1 in Unity, so for example if the image has the largest side of 50cm in real life, the augmentations need to be scaled by a factor of 2 to match.
I don't seem to understand what I am doing wrong.
I have a square marker, 132mm x 132mm.
I try to augment a standard Unity plane on it, with a scale of (0.15, 1, 0.01) on it, which should be 15cm x 1cm.
In the editor this comes out to a plane of ±17,5cm x ±1,3cm measured with a ruler.
In a build this is a plane of ±18,5cm x ±1,2cm
If I do 18.5/15= 1.23, which means the projected image is 1.23x bigger in physical size than digital.
If I follow that logic and try to project 15cm physical size, I would do 15/1.23=12.19cm which would be the digital size, so I set the scale to 0.1219 at the X, which results in a 14.1cm large physical plane.
Can you explain to me what kind of factor I should use to get the result you referred to? Or tell me what I am doing wrong?
I think that there's a scale factor that get's either bigger or smaller depending on the size of model i want to augment on the ImageTrackable. I'll be trying to build a scene where I can test this with a few buttons to set the size of a plane and a slider as a multiplier factor, to see if my theory is correct.
If this is not the case and I did something wrong in my last post, please let me know.
I just wanted to point out that the default plane in Unity is actually 10x10 units, not 1x1. Alternatively, you can use the quad, which is 1x1, but has a different base orientation, so you'll need to account for that. Additionally, unless there is some sort of distortion happening, the measured size should maintain it's proportions, so I find it very strange that the width of the augmentation grew and the height shrank when comparing the editor with the build.
The scaling factor of the augmentation, based on your marker size should be 7.57 if you're using the quad, as mentioned above. So if you parent your quad augmentation to an empty GameObject with the scale set to 7.57, the augmentation size in Unity should equal the size in real life, as long as you're using a 132mm printed target.