suppose I have modelled a room like that: enter image description here

when I look at it from outside like in screenshot, I want the walls whose normals are not going towards my point of view to go transparent. In other words, I want to see the insides of the room so that the walls at which I am looking from outside, go transparent. see the screenshot for illustration, I have just hidden those faces

enter image description here

when I change my point of view, other faces have to go transparent while others become visible.

I think that must be somewhere on the surface but as always my Google skills are too bad to find out

  • $\begingroup$ Do you want the object to be affected by this in the solid, or rendered shading? $\endgroup$ – Nate_Sycro27 Dec 14 '19 at 19:57
  • $\begingroup$ @Nate_Sycro27 basically, I don't care. I would prefer solid, Eevee would be good as well. but not Cycles because then I couldn't work fast enough with that $\endgroup$ – Serhii Dec 14 '19 at 20:01

Assuming that the room's normals point inwards, you can accomplish this by using the Geometry node, a Mix Shader and a Transparent BSDF.

Connect the Backfacing socket of the Geometry node to the Fac socket of the Mix Shader node. Next connect your actual material nodes to the upper Shader input of the Mix Shader node and the Transparent BSDF to the lower one.

This effectively creates a backface culling material.

If you're using Eevee, you will also have to set the Blend Mode and Shadow Mode to Alpha Clip or Alpha Hashed. In case you're only using Eevee and don't need a material for Cycles, you can enable the Backface Culling option (above the Blend Mode) instead of using the node setup.

Don't forget to add lights inside the room.


Eevee Blend Modes

If you only want this for the viewport, then you can enable Backface Culling in the Viewport Shading options.

Viewport Shading

  • $\begingroup$ ..I get very curious shadowing effects with my set-up, if I light a room the right-way-out.. but not if i turn it inside out, and flip the mix. I'd love to know why.. $\endgroup$ – Robin Betts Dec 14 '19 at 21:16
  • 1
    $\begingroup$ @RobinBetts I've made a mistake in the first version. Alpha Blend shouldn't be used in combination with Show Backface. It's essentially an ordering issue which also broke the screen space reflection. Setting the Blend Mode and Shadow Mode to Alpha Hashed works well. $\endgroup$ – Robert Gützkow Dec 14 '19 at 23:29

You can set up a shader to be transparent if evaluated for a camera ray which is backfacing.

enter image description here

Curiously, in EEVEE, I found it worked better with the normals facing outwards from the room (eliminating front-facing, rather than back-facing faces, as shown). In the material, both transparency and shadows are set to alpha-hashed.

enter image description here enter image description here


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.