Hey all, I recently found an interesting potential solution to working with portals. The idea is that there are 2 sets of geometry. One that is rendered on one render layer (stencil value of say 0), and this layer is the “main” layer that is generally seen. What I want is to create another set of geometry that is in the same place as the main layer, but is only visible through a stencil portal.
The trouble I’m running into is displaying something in the portal (just a mesh with the material I’ve made) and NOT displaying it in the world. I am able to sort of pull it off, but the parts that are not in the portal remain black.
My question is, is it possible to make multiple layers so that I can mask the main layer and reveal the other layer? I can’t seem to get both working, and only end up masking one or the other, but not both. I know there’s more math I must be missing, I’m just not sure what that must be. Maybe some IF statements to dictate portal vs external rendering?