This is an easy effect that a lot of people have probably figured out
already. It's here because it's useful, especially when it isn't as
blatant as this example.
Yes, we're starting with a black background. You can use anything
you want, though.
The object isn't special, either; it's as simple a sphere as I've been
able to get out of Kai Power Tools. What does matter is that
the sphere is on its own layer.
Now we add a foreground object, which to keep things simple, is a
plain white rectangle. Again, it's on its own layer.
(Yes, it's really there.)
Duplicate the layer with the sphere, and drag the new layer above
the white layer. Now set the sphere copy layer's opacity to 50%.
That's all there is to it. We now have an object that is opaque
against the background, but partially transparent to another object.
You can see this technique in use in the
Last Supper tutorial.