"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

clip the camera plane

Hallo,

I want to show something below the camera plane, let the users feel that they can see a "hole" in the current plane, I have already set the texture z position to minus, but still all the texture below is displayed, and also I just want to cut part of the current plane, and let the current plane hide the part of the edge of the hole below when users are not vertical to the plane. so what I need to do is letĀ upper edge of the hole aligned with the camera plane. then cut out the camera plane exactly where the hole is located.

So you have some idea to achive this?

Thank you !

AlessandroB

Mon, 10/29/2012 - 12:32

Hi, can you explain a bit more in detail what you mean by "camera plane" (do you mean a plane parallel to the camera and located at a certain distance from the camera, or do you mean the trackable plane, or other )?

tonyniu2008

Mon, 10/29/2012 - 15:08

Thanks for your reply, the "camera plane" I mentioned is the texture plane we get directly from the camera, a plane parellel to the camera with certain distance, this plane is from real world.

AlessandroB

Tue, 10/30/2012 - 08:59

Hi, thanks for the clarifications, but to me it still sounds unclear what you want to achieve; 

I'm really happy to help you if I can, but could you describe in a very detailed, step-by-step way what you want to do?

AlessandroB

Fri, 11/02/2012 - 10:42

Thank you for your PM messages with details; so I'll share the answer to your problem here, hoping it can be useful to other developers as well:

So, the technique you need to use is based on rendering a plane to the "depth buffer" without rendering it to the "color buffer";

AlessandroB

Fri, 11/02/2012 - 10:45

And by the way: disabling Color Mask (i.e. disabling writing to color buffer) in OpenGL is done by:

glColorMask( false, false, false, false );

AlessandroB

Tue, 11/06/2012 - 07:58

One additional little detail is that you need to render the "plane with hole" before rendering anything else, so to write to the depth buffer before other geometry and thus obtaining the clipping effect.