Why can I see through the objects? ( nodes help )

when I render this scene you can see the monkey through the box. How can I make it so you can’t see through it. I’m new to the compositor so I really appreciate the help. Thanks

the .blend forgot to upload

Attachments

Test_01.blend (194 KB)

Hi blenderman911

I’m no expert either and there might be an easier way to do it but I think you just needed to add a Z Combine node to tell the compositor how far away from the camera the elements are in your scene.

Somehow it doesn’t look totally right in that the glow seems to have gone from the monkey, maybe using alpha masks might have been a better idea, but like you I’m still learning.

Bill

Attachments

Test_03.blend (213 KB)

Thanks a lot. It works but now the glow isn’t as intense but i’ll try and figure it out. I’m brand new to the node editor so I’m not that great yet.

Maybe I can help a little …

When you combine two streams, you have to tell the computer how to choose pixels from one of them vs. the other one, on a pixel-by-pixel basis.

One way to do that is: “Z-depth.” This is a channel of information that tells the computer how far away from the camera the source of each pixel is. This lets the computer choose “the one that is in front.”

Another way to do it is “Alpha,” which is a fourth channel of information that represents transparency or translucency. You must request that channel (RGBA), and if you store the image in a file you must use a file-format that stores Alpha. (e.g. “JPG doesn’t; PNG does.”) A solid object will have Alpha = 1.0 everywhere the object is, and Alpha = 0.0 everywhere it isn’t. (If you neglect to request the Alpha channel, that information isn’t there at all. Be sure also that you’re actually “piping” Alpha information as well as Color information between all the nodes that require it.)

There’s one little bit of funny-business with regard to Alpha that you do need to be aware of: premultiplication. In simple terms, this is a technique that “fuzzes the edges” of an object (anti-aliasing) by surrounding it with a slight border with Alpha values that are between 0.0 and 1.0. When you’re dealing with an Alpha channel, you need to be aware of whether it has been “premultiplied” or not so that you don’t accidentally get visible borders around things as you combine them.

When you say that “you can see through” the objects, that tells me that the computer isn’t distinguishing one channel from the other as you intended it to … and you’ll have to troubleshoot exactly why this is so.

Hi blenderman911

I had some time to have another play with your scene and think I have it a bit better. By using alpha and masks and changing one of your screen fac values from 1 to 2.5 it retains the glow for the monkey.
It’s good to dig a bit deeper into how to do these things.

Bill

Attachments

Test_04.blend (250 KB)