2
$\begingroup$

I am making a portal and I want to make it so you can only see objects through the Portal, like in Picture 1.Picture 1

$\endgroup$
1
$\begingroup$

As Millad already pointed out, this would be done with the Light Path node.

Material for the portal is just a refraction shader with an index of refraction set to 1 (so it doesnt actually refract the objects behind it).

enter image description here

The "magic" happens in the material you want to see through your portal. use a mix shader to mix a transparent node (be sure the color of the node is pure white. its often a bit grey per default) and the actual material of your object. I used an emission shader just for an easier demonstration but pretty much everything works here. THere could be some problems with refration materials making objects visible that are not supposed to be visible. If you stumble across this problem, let me know.

for the factor input use the boferementioned light path node > transmission depth.

enter image description here

$\endgroup$

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.