Log in or register to post comments

Issue with moving 3D object with detected Cylindrical Target by Vuforia

May 6, 2014 - 9:06am #4

I am detecting a cylindrical target using Vuforia extension for Unity 3D. I show a 3D object, a bottle, beside that cylinder when detected. The problem is that When I rotate the cylinder object in real world, bottle moves with it as well. But the problem is when bottle tends to enter the background. I hope the image link can explain the issue.

https://www.dropbox.com/s/rrfxd4w4p05byit/2014-04-28%2011.52.00.png

 

Issue with moving 3D object with detected Cylindrical Target by

May 9, 2014 - 12:53am #3

You can achieve this using a "Depth Mask" shader (same as the one already used for the Cylinder target occlusion)   

BUT you need to have a 3D model of your bottle (e.g. an OBJ or FBX model for example) and add it to your scene, and then APPLY the Depth mask shader material to the whole bottle 3D model.

HTH.

 

Issue with moving 3D object with detected Cylindrical Target by

May 9, 2014 - 6:07am #2

Thank you for your response. I applied the the  "Depth Mask" shader to the whole bottle(3D object in .FBX format) but  this shader hides the bottle by making it invisible and when the ARCamera tracks the real object, my bottle is not visible on the screen anymore. Previously, the shader used for bottle was "Mobile/Diffuse". Guide me if I am wrong somewhere. Thanks already.

Issue with moving 3D object with detected Cylindrical Target by

May 9, 2014 - 6:59am #1

Ok, let me explain it better:

you need to add a second 3D bottle;  this second 3d model must be aligned (overlapping) the Cylinder target (i.e. it must exactly overlap the bottle label).

your "original" 3d bottle model should still use the Mobile/Diffuse shader (to render it normally), but the second bottle will have the DepthMask shader.

 

Log in or register to post comments