I'm on Blender 2.8 and I want to create a special shader, which is harder than I thought.

I want to create a box, which contains more objects inside. The front face is a hole where we can see the inside. But I want the outside faces to be transparent, and make every objects inside transparents as well when the camera is in this axis.

On the pictures, the grey box is my main box where I want the transparent outside, opaque inside shader. The blue box is an object inside (that I actually see so my shader is not working) and the red one is kind of a background object.

So I want the red box not visible when seen through the inside of the main box and I want the blue box only visible through the hole of the main box but the red box still visible cause it's not an inside object of the main box.

enter image description here

Hope everything's clear, it's kind of a concept here.

Thanks for your help,


  • $\begingroup$ The shader is for the magic box or could it be for other object (as I don't think it's possible if other objects materials are not setup for this). $\endgroup$ – lemon Sep 15 '19 at 10:22

For the magic box, the material of the front face is a simple principled shader (the default one) and the material of the side faces is a simple transparent shader.

The material of the other cubes is the same (or at least they both have this structure), like shown in the picture:

enter image description here

(You probably want to disable the little cube's shadow)

So you get this:

enter image description here

if you want to make the internal faces opaque, your sides need to be solid (you can do it with a solidify modifier)

enter image description here

the outer sides are completely transparent, the front is a simple principled shader, in the internal faces you need to use this material:

enter image description here

If you want the red cube to be visible, just make it a simple principled shader.

Here is the final result:

enter image description here

NOTE: if you can still see a dark shadow of the blu cube through the lateral sides, you need to increase the transparency light bounces

enter image description here

NOTE 2: I think you should work a bit on the shadows and decide which objects should cast shadows and which shouldn't (for example right now the front face creates a shadow on the inner faces)

| improve this answer | |
  • $\begingroup$ Hi @tareyes, thanks a lot for your answer. However, it's not entirely done, I need the red cube to be visible when we see the external faces of the magic box ! Is it possible with shading or do I need some compositing ? And if I need some compositing, how could I do (I'm noob with compositing stuff in Blender). And how could be the internal faces of the magic box opaque ?? Thanks a lot !! $\endgroup$ – SHDWRCK Sep 15 '19 at 8:45
  • $\begingroup$ For the red cube, its material is just a principled shader then. Or do you want it to be invisible when saw behind the internal faces of the magic box? $\endgroup$ – Tareyes Sep 15 '19 at 11:12
  • $\begingroup$ I updated the answer $\endgroup$ – Tareyes Sep 15 '19 at 14:54
  • $\begingroup$ Thank you soooo much !! It's exactly what I was searching for ! $\endgroup$ – SHDWRCK Sep 16 '19 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.