- Home /
Vuforia: Hide object behind ImageTarget
Hi! I am using Unity with Vuforia extension. And I want to animate an object, which comes from behind the ImageTarget and goes in front of it. I want to make it coming out of the picture. Is there a way to make the image transparent for the camera, but I don't want the objects to be drawn behind it?
This is an AR app. When I point my camera to the real painting the frameworks recognizes the image below (as a marker) and then draws the red cube. This is what I see in the editor, but when I build the app, I don't render the image, because I don't want to project the image of the painting on the camera image. But as I don't render image, the whole cube can be seen, and it not "goes through the painting". I hope it is clear now, what I am trying to do.

Answer by idunlop_oefun · Oct 15, 2012 at 02:22 AM
Create a plane that sits in the same position as your image marker (or just behind it). Then use a material with the 'depth-mask' shader to render that plane. Any object behind that masking shader is invisible (i.e. all you'll see is what the device camera is seeing).
Answer by sparkzbarca · Oct 14, 2012 at 08:57 PM
so what you want like
things you cant see blocked by object object you cant see cause its invisible image you can see through camera
Thats what you seem to be saying in which case it just doesnt make sense, How can you ability to see something be blocked by an invisible object, But irregardless it could probably be done by casting a sphere behind the object collecting the nearest objects and setting there transparency to full until you decide to reveal them
if you actually wanted
ojbect hidden that will pop out image camera
You can simply place the object in the scene and set its ALPHA value to 0
alpha is a number between 0 and 1, 0 = fully transparent, .5 something like fogged glass, 1 = non transparent.
I updated my question, maybe it is clear now what I am trying to accomplish.
Answer by TankThunderbird · Nov 28, 2016 at 08:04 AM
Depth-mask works great, but the plane has to be attached to the image marker of the object to be concealed.
Answer by madhu_unity425 · Feb 12, 2019 at 01:08 PM
can you people help me
how to hide or Mask the image target after tracking found,
I don't want to see the image target after scanning, I want to mask component
Your answer