Forum

Object as 3D Alpha Mask

Hi I'm trying to make an effect for a b4w project I'm currently working on, this effect I think should be achievable by using an object as a 3d alpha mask for another object so that this object will be visible only when it is overlying the mask object in camera view. To better figure it out let's imagine we have an opaque sphere (our mask) inside an alpha textured cube, and we want to make visible only the points of the cube that overlap the sphere in camera view. I'm attaching an image that shows such a context, on the left there are the mask and the object we want to mask, on the right the result I want to achieve. I'm attaching also the .blend containing the demo scene I used to render the attached image. That said, is there a way to achieve it in blend4web? I'v tried to use node materials as well as different transparency combinations without success so far