Anchor performance due to high latency


I am testing my small ARKit project with Aryzon, and I hit a performance problem. When I anchor a 3D model on a surface, and when I move my head around, the model is not firmly anchored at the position, but it is ‘dragged’ around following the head movement. I guess transforming the position from the ARKit plane to Aryzon ‘space’ is kinda slow with very noticeable lag or high latency.

I hit the issue with my iPhone 8 + ARKit. I am using just default setting for Aryzon unity object.

Would you please give me a tip to have a lower latency? It does not need to be perfect, but I think there could be a way to make it better. I found a similar discussion in thif froum around Nov 2017, but the discussion is very short, so I’d like to get your advice.

Thank you for the awesome product BTW. :slight_smile:

Hope to be able to help you with this, you are right about the latency. What you call Aryzon space is actual reality. It takes some time for the phone to process the light that hits the camera sensor, calculate position and render the 3D content on the screen. In screen based AR you don’t notice the delay since the video frames are in sync with the time it takes to process the calculations and rendering. The actual calculated pose in the real world is delayed a bit from reality. Therefore when you view it in the headset you do notice the delay.

There is no perfect way to correct this issue, the only thing we can do is estimate what the pose should be at the time of rendering to screen. This means extrapolating the pose given by ARKit / ARCore etc…

Have a look at the script below, it’s in development and far from perfect but perhaps you can make it work for your situation. It is a first attempt to do prediction. It does linear prediction based on previous samples and a least squares fit. The more samples the heavier it is to do calculations so you might want to tweak the settings a bit. Check the comments to set it up correctly. The ‘main object’ should be ARKit’s Main Camera object. You should then link the Aryzon ‘follow transform’ to newly created child inside the ‘main object’. (1.9 KB)

Wow thank you for sharing the code! Linear prediction sounds very interesting. I’ll look into your code, and try to use it for a better anchoring of 3D objects.