Hi, I’m implementing a portal effect and I’m using scene capture 2D in order to generate the portal’s destination: https://youtu.be/6QCgtk4MpJ8
I’m concern about rendering optimization where the problem is that the portal may be far way, but the scene capture component will always be rendering the entire screen to the render target texture…
Is there any way I can specify only part of the viewport to be rendered by the scene capture component? Maybe using rectangle coordinates (x1,y1,x2,y2) so the scene capture will not render things that are outside the portal bounds and therefore will be discarted.
I think what you’re looking for is the max view distance on the Scene Capture 2D.
On a side note, I’m curious on how you lined up the portal’s views relative to your character’s position if you’re willing to explain
It’s not view distance… I hope the attached image will make my point.
About the positioning, there’s no mystery about it, each portal just take the relative transform of the player from it and apply it to the target portal rotating by 180º around it root component.
im having an issue with rotating the capture components. no matter what rotation i give them they stay the same.
I think your attached image does not show, how your Scene Capture Component in this view actually works. If I understand your setup correctly, your SCC should be attached to your portal itself, so it will actually capture “through the eyes” of the target portal, and not through your eyes, like in your image. However, you’re right, that there is a lot of overhead due to the relatively small screen size of your portal compared to the capture size behind it.
If you somehow want to optimize your screen component capture efficiency, playing with your render targets resolution might improve results. I don’t think, that you can tell your Scene Capture Component to somehow “do not capture” specific parts of your scene, at least I’m not familiar with a way to do that. Especially since you would have to adjust this area each time your player moves and it’s view angle changes.
I don’t think there is an option to render only part of the viewport, but I would be happy with any direction on what to change in the engine in order make that feature… or even a “it’s not possible” from any UE4 staff would be good too.
Hey, resurrecting this post 5 years later!
Did you ever find out a solution or even a alternative to this problem? I’m struggling to get my portals more performative at the moment and thought the very same thing might work.
Unfortunately not, I left this project behind, I hope you find the solution for it!
That’s a shame, thanks for the swift reply though!