Rendering a second view

I’m creating a sci fi style game where the player is hoping between dimensions, it’s taking elements from alien isolation and ratchet and clank rift apart to create the games mechanics

Current setup is as follows

  • a single level with two shrunk down skybox’s to represent the two dimensions. The portals are set up using render targets and the player can see into the other dimension, they can use their handheld device at any time to see into the other dimension (think dishonoured 2 a crack in the slab)

My question is can unreal render two viewports at once ? What I was thinking of doing was creating two sub levels, once for each. With the dimension the player isn’t in we don’t want it to be rendered at all unless they are standing in the view of a portal, in which case we render what they would see through the portal?

Is this overkill and shouldn’t be done or is it possible and something I should look into ? If it’s possible anybody got any links to references ect would be amazing. I’m only asking because in the recent ratchet and clank video from (can’t remeber the name) they said that they would render another version of the level when the player used the tether mechanic and then unload the first version when they had complete the transition to the portal.

Hey there @Samuasp! Welcome back to the community! So generally the only way for UE to (natively) render two viewports is between two players in split screen. If you work from the source, you may be able to utilize that and change it into the mechanic you’d need. Otherwise I believe you’d be working from render targets the same way as your portals.

That’s what I was thinking around, I’ve spent the last week looking possibly doing it using the stencil render but that’s a lot more complicated than this demo really needs to be. They did it in unreal for another game (can’t remember it) where a wall would be visible but then when you moved past a tree the tree would occlude the wall reveal what’s behind it based on how far you moved. It could be done with the stencil but you’d have to mask out a lot of things

For now I’ll stick with the render targets. As it’s indoors and the space dimension needs to represent space I can get Away with the space level being off in the distance having its own skybox and just have both levels loaded at one, just like they did with dishonored 2

Absolutely understandable! The stencil method is effective, and more efficient than RTs but definitely far more complicated to deal with. RTs have built in functionality to handle it, but they are so expensive when you need to render them repeatedly. If you do come up with a novel method to pull it off and are comfortable sharing here later, it might help others with your idea in the future!

Hey there @Samuasp! I was taking a look around to see if there are less in depth workarounds you may be able to use, and found that some users are using the Composure plugin to do something similar, it might be of use so I decided to come back and drop this here:

I was having a look around and came across this MultiWorld in Code Plugins - UE Marketplace It’s literally the exact thing I’m going for but at £300 :joy: but I’ll have a look at that video now see if that helps

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.