4
$\begingroup$

I've created a portal based on this method. Here's what it looks like:

Portal Test

Light passing through the portal is not handled accurately; instead I've faked it by baking the light from the outside onto the outer side of the portal, and then applying the baked texture onto the inner side.

Now, the problem is that, as you can see, the two parts of the cylinder sticking through the portal do not match up, since they are lighted differently.

Is there any way I can get the light on the cylinder to work correctly?

$\endgroup$
2
$\begingroup$

Figured it out myself. It can be done by stacking three renders: At the bottom the interior of the portal, on the next level the exterior without the cylinder but with the shadow of the outer part of the cylinder, and finally on top the partially covered cylinder. The node setup looks like this:

enter image description here

And here's the result:

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.