View Full Version : How to make an object behave like an alpha channel

09-14-2007, 04:57 PM

http://img209.imageshack.us/img209/65/explanationpq6.jpg (http://imageshack.us)

This is what I want to do:

Like this image shows, I have a camera moving with position 1,2,3

I want to "hide" the sphere "interest" with the rectangle "mask", but the rectangle has to be transparent so that we still see the background.

I tried to check the "hide from camera" button for the rectangle, but it didn't helped....

any help?

Thank you

09-14-2007, 05:19 PM
"unseen by camera" is what you'd use for "interest", not for the mask.
(You don't need a mask if you just want to have the "interest" object invisible.) You could also set the transparency to 100% for the surface(s) of "interest".
If you really want to use the rectangle as a mask you'd best refer to this thread in the discussion forum.
Toward the end of it is a great tutorial on how to animate a mask and it goes over the correct settings.

09-14-2007, 05:35 PM
sorry, but you did not well understood my question.

I want the object of interest to be visible, except when the rectange (that is invisible) hides it.

09-14-2007, 06:48 PM
Have you tried using a clip map?

09-14-2007, 08:45 PM
You're right, I didn't read your post well the first time.

As Silkrooster said, another way to do it is by using Clip map. I'll first describe what to do just to mask the object from the middle camera.

Basically you set up a texture on the RECTANGLE which you can see, and then paste it onto the SPHERE (as its clip map)--which you can't see until rendering takes place.

Make an all white image in Photoshop. Use that white image as an image Map in the surface editor for your RECTANGLE (In the Basic tab, Use the Texture button next to the color row. That will take you to the texture editor. Use Planar projection, and set the axis so that it's perpendicular to your rectangle.) When the rectangle is all white and hides your sphere, you'll know it's positioned correctly. Copy the layer.

Then go to the Object Properties window for the SPHERE and select the Render tab.
Then select Clip Map texture button ("T") and Paste the texture you just copied from the rectangle. (This will become the clip map which will hide your sphere)

The all-white image will hide the SPHERE completely upon rendering. The problem is, depending on your settings, the SPHERE may remain invisible to all three cameras. To fix this, instead of a solid white image, you can use three vertical stripes: black, white, black. (Just be sure the rectangle is is big enough so the black bars are in front of the side cameras and the white bar in front of the middle camera.)

Copy the "black, white, black" texture from the rectangle surface and paste it onto the SPHERE's clip map texture.

Everything should line up, but I admit, it might be a hassle because you have to do frame renders to check everything, and reposition if necessary. Tile settings and other alignment settings for the image map could affect the result.

The final step would be to hide the rectangle from the camera since its striped texture is just used as a reference for you to see where the real clip map is situated. (Render tab: check the box that reads "unseen by camera" to hide the rectangle.

The "dinosaur clipping" animated mask tutorial explains a couple of variations of this as well.

09-14-2007, 09:28 PM
This is basically what Oldtekker was saying too, but instead of stripes he was making the clip map right from the scene.

09-15-2007, 09:56 AM
From what I inderstand, I will not see the background right?

Cause I will have a video playing in background. The goal is to make certain portions of my interest object transparent using a different polygon placed in front of it.

and I didnt get that :

render out the animation of the mask with a white luma100 surface against a black background than apply that as a front projection clip map to the object that you are masking. hope that makes sence...

09-15-2007, 10:45 AM
Yes, you can accomplish this using Clip Map.

09-15-2007, 01:47 PM
Take a look at this thread. Looked similar.

09-15-2007, 04:54 PM

now I get it!

this is so marvelous.

I do an animation of my alpha channel and put it on the alpha channel.

Ok ok, sorry for my misunderstanding.

Thank you all

09-19-2007, 09:11 AM
I don't know if this helps in your current project but if you are rendering elements and compositing them together later you can check the "Matte Object" box on the Render tab of the box object's Properties. You can tell the Alpha Channel to be black. The box will then cut a hole in the alpha channel that can be seen through when you lay the rendered image over another.

If your background video doesn't move in relation to the camera, you can do it all in one render pass you might be able to do it in surfacing by applying your background video onto your box with Front Projection. Turn diffuse all the way down and luminance all the way up. Make sure your box object isn't casting or receiving shadows. The background image (set in the Compositing panel) should line up perfectly with the front projection.