Distorted objects on image target using image path

Description of the issue:
Android
ARDK 2.1
Unity 2020.3.26f1
Mac Monterey

If the image target isn’t square objects are distorted when using image path instead of .bytes. In the editor using a mock image it looks just fine, but after building the object on the image is distorted on the y axis.

Also I’m unsure of how to create the .bytes file. I’ve tried the the get info > rename to image.jpg.bytes, and image.bytes, but unity wont recognize either file type after that is changed.

Thanks!

Hi Andrew,

The quality of the image tracking depends on the image being tracked so this can vary. Find more information on Best Practices here to make sure you don’t run into any issues next time.

Also, to create the .bytes file take a look at our documentation on Creating from a .jpg.bytes reference.

Hi Moranda,
I don’t think I explained that correctly. The image tracks just fine. Meaning the object shows up, the problem is that it is distorted. I thought this might have to do with calling it via “path sync” rather than “bytes”. When placed on the yeti image, which is called via bytes, it seems to work. The same image tracks just fine in ARFoundation without distortion.

As for creating the .bytes file, thank you for the link. But that is what I was referring to. I tried the bellow but unity doesn’t recognize the file afterward.

" For this, add the .bytes file extension to your .jpg image. On Mac you can add the extension under Right Click → Get Info → Name & Extension ."

is it supposed to be image.bytes? or image.jpg.bytes? neither work. I’m obviously missing something.

any help would be appreciated.
Thanks

"

Are you able to provide a copy/paste of the code you’re using and the console log for errors? Unity shouldn’t have a problem recognizing the file unless it’s in the wrong format.

Hi Moranda,
I think it’s the wrong format is the issue. I was trying to convert it from outside unity and then importing it. I found that if I do it from file manager on an already imported image before I open unity then it’s recognized. So I’ve solved the .bytes issue, but I think I was wrong, even the yeti image seems to distort a basic cube prefab. For this project I can add an anchor and instantiate the object at the image point, but it would be nice to be able to have an image track without distortion. Unless I’m missing something else. Is there a way to set “_physicalImageHeight” and “_physicalImageWidth”?
I’ll try reimporting the sample scenes in the meantime to see if that fixes it. Thanks.

Hi Andrew,

ARCore will try to estimate the physical image height/weight based on its knowledge of world space. If you choose the physical size in Unity editor, the estimation timing will happen faster. Keep in mind the estimated size may be slightly different from your chosen size.

Let me know if the reimporting works for you.