Log in or register to post comments

suggestion: "hole in wall" effect

September 15, 2011 - 7:34am #7

Hey guys I am new to the Qualcomm AR and Unity bundle and am having trouble figuring out what I need to do to acheive the "hole in the wall" effect where the 3d geo sits "below" the tracker. I successfully have my geo placed and it's tracking amazing, but when the camera is lowered beside the tracker the objects inside of the "hole" render... I'm attaching a pic to help explain.

The way I solved this issue in flash with papervision was to duplicate the "hole" geo, flip the normals, and give it a color of (0,255,0- green) and to make that color "invisible" to the camera. It effectively occluded the geo behind it and worked like a charm! I have tried using the Image Filters in Unity, Color Correction Ramps to be exact, which has a keying function built in, but it isn't supported (or I haven't been able to get it working). Is there something more simple I'm not thinking of in Unity that allows me to not render through, or is my best bet writing a shader? Thanks for the help!

Re: suggestion: "hole in wall" effect

September 15, 2011 - 7:59am #6

You need a mask shader to do that.

Re: suggestion: "hole in wall" effect

September 15, 2011 - 8:09am #5

And we happen to provide one :) Look for the DepthMask material in the Qualcomm Augmented Reality/Materials folder.

- Kim

Re: suggestion: "hole in wall" effect

September 15, 2011 - 9:52am #4

thanks so much~!!!!! What didn't you guys think of? ;)

Re: suggestion: "hole in wall" effect

May 9, 2012 - 8:15am #3

Can this also work with iOS directly? I'm trying to get this effect, but I'm not quite sure how to do it.

Re: suggestion: "hole in wall" effect

May 9, 2012 - 9:22am #2

Do you mean the native iOS SDK, or iOS Unity Extension?

There should be no difference when implementing this for iOS Unity.

Re: suggestion: "hole in wall" effect

May 9, 2012 - 9:26am #1
DavidBeard wrote:

Do you mean the native iOS SDK, or iOS Unity Extension?

There should be no difference when implementing this for iOS Unity.

Yes, native iOS, via XCode.

Log in or register to post comments