Log in or register to post comments

Objects collide after certain distance of AR Camera

February 17, 2014 - 9:54am #1

Hi , I'm working on a project and it's ok in my iOS systems but in android after a certain distance of my AR camera the objects seems to collide. It's not the problem of far parameter of my AR Camera which fades the objects , but my problem is that objects collide after certain distance and they don't get rendered correctly . even when I'm in unity scene view the problem exists . I noticed that when I change the "Rendering path" parameter of my ARCamera , the problem is solved in my unity scene view but when I export it on my android device the problem is still there. my objects are near each other but they are not collided , they aren't just getting rendered correctly . 

I'll appreciate if someone can help me with this .

thanks very much

Objects collide after certain distance of AR Camera

February 28, 2014 - 7:35am #8

Yes, the depth buffer precision is device dependent, yes.

In particular, if you enable the 32-bit depth (instead of 24-bit), you are asking a depth precision that might not be supported on some devices, in such case, the device OpenGL driver could potentially "react" by automatically selecting a much lower 16-bit depth, which will result in the visual artifacts that you saw.

So, ironically, by asking 32-bit, you might end up with just 16 bit, i.e. even lower than the 24ìbit.

So, in general, at least accoring to my experience with OpenGL ES , it is usually safer to use 24-bit instead of 32-bit, unless you are sure that all your target devices support the 32-bit depth precision.

But since this topic is more about Unity raher than Vuforia per se, I would recommend to also check on the Unity website, directlty, as they might be able to provide more accurate and detailed answer on this specific topic.

 

Objects collide after certain distance of AR Camera

February 28, 2014 - 6:34am #7

Thanks so much . by ticking "Use 24-bit Depth Buffer" in build setting it is showing correctly on my device but it still shows the effect in unity editor. It also saved my other project :) is it dependent on devices? I mean is 24 bit buffer not supported on other devices? I have only tested it on my Nexus 5.

thanks so much

Objects collide after certain distance of AR Camera

February 28, 2014 - 3:30am #6

Have you tried changing the OpenGL settings in the Player Build settings ?

In particular, you can switch between "24-bit depth" or "32-bit depth" setting;the screenshot seems to suggest some sort of Z-fighting issue due to depth buffer precision issue.

 

 

Objects collide after certain distance of AR Camera

February 27, 2014 - 7:58am #5

I just spotted this effect in my other project too , it's a car which is completely ok in my iOS project but unfortunately it's getting this effect when I try it in android. I have attached a screenshot showing this effect on my model . I'll appreciate if you can help me solve this problem . 

thanks very much

AttachmentSize
Image icon carImg.jpg14.86 KB

Objects collide after certain distance of AR Camera

February 17, 2014 - 11:35am #4

The ARCamera will set the world reference frame based on the Pose of the detected image targets; this is a fundamental differendthe refereence with normal Unity cameras, as in that case the reference frame is not affected by the targets in the camera view. The target Pose may be more or less accurate depending on where the targets are located with respect to the camera position, and so result in more or less accurate positioning of your objects.

 

 

Objects collide after certain distance of AR Camera

February 17, 2014 - 11:08am #3

If I view my scene with a normal camera and not an ARCamera , I don't see this effect .I'm using ipad3 on iOS and Nexus5 on android . and also if I use "Differed Lighting " as rendering path I don't see this effect in the unity scene but when I test it on device the problem exists.

Objects collide after certain distance of AR Camera

February 17, 2014 - 11:00am #2

If you objects are far from the ARCamera position, then the target Pose may become less accurate, and/or the accuracy errors may propagate with distance.

This could then result in less accurate positioning of your virtual objects; so, if they are close to each other, they may end up colliding each other; this effect could also vary from one device to another, so it is possible that on the iOS devices that you are using the result is a bit better than on the Android devices that you use. 

One way of improving this is to use Targets with higher star rating, or using the autofocus to obtain a better focus on the targets.

 

Log in or register to post comments