Self-excluding Transparency Material in Cycles I'm trying to create a Cycles material that allows a material to be transparent, but not show its backside or any intersecting meshes that use the same material, despite which direction their normals face. (See the attached image created in the Internal engine for some sort of idea of what I mean.)

Preferably this could be mixed with the opaque, "default" version of the material (such as a Principles BSDF) to allow the final material to have a more interesting material with various colors, roughness, and normals.

Is there any way to achieve this effect in Cycles?
I found using Transparent Depth from the Light Path gets the job done. It works in reflections as well, but of course any other kind of transparency also occludes objects using this node setup as the ray depth will be more than 0.



Another possible solution depending on your exact case is to use multiple passes and to add transparency to the objects pass in compositing.