Portal1
After setting up the door dialogue system, I moved on to building the portal system inside each sub-scene. My original plan was to recreate the same kind of portal effect I tested earlier — where a portal surface shows a real-time view of another location using a second camera and a shader material.
This worked well within the same scene.
The Problem with Multi-Scene Portals
The problem came when I tried to apply the same technique across different scenes. Since Unity handles scenes separately, the camera in one scene can’t "see" objects in another scene unless both scenes are loaded additively. Otherwise, the render texture just shows black. I tried a few workarounds, like loading both scenes at once or faking visibility, but nothing looked quite right.
Eventually, I decided to ditch the live portal view and try a different approach.
Plan B: Depth-of-Field Fakeout
Instead of using a live camera feed, I set up a static plane in front of each portal and used a depth-of-field blur effect to create a sense of distance. So when you look through the portal, it’s not actually rendering another scene — it’s just a stylized background that looks like a faraway place.
Surprisingly, it kind of worked. It gave enough visual feedback to suggest there’s something beyond the portal, even though it’s technically just part of the current scene.
But It Wasn't Smooth…
Here’s where things got tricky again: the depth effect didn’t behave well when the player moved. The camera shake or rotation made the portal’s "window" look jittery or off. I figured out that I needed to bind the camera effect specifically to the player object — or more accurately, to a plane that’s only visible when a player with the right is nearby.tag
So I made sure the player character was tagged properly, and then used that tag to trigger the portal’s visual effects only when needed.
Where I’m At Now
Right now, the portals have a pretty decent look and feel. They’re not as flashy as a real camera-feed portal, but they serve the purpose and don’t break when switching scenes. I might revisit the live shader method later with additive scene loading, but for now, this solution works — and it’s much easier on performance too.
Next up: adding sound triggers, return portals, and polishing up those transitions.

Comments
Post a Comment