Is that a good method to create a PIP scope (Picture in Picture,like insurgency,EFT,COD16) with a good performance?

While I was devloping my game,I came up with a method to create a PIP scope with a good performance.
We could find out that there is a lot of ideas of creating PIP scope in YouTube.But these ideas are mainly about Scene2DCapture Component,we all konw it wastes performance.And the effect is not satisfactory while the Render 2D Target is in low resolution.
Here is my method.
We’ll create a new static mesh component with a few properties that different with original static mesh component.And we’ll instant our scope from the new static mesh component class.Because I want the rendering thread to render our scope in the last part of current frame.
When the common progress of rendering get rendered,we collect pixels of a specific area into a texture,then we do common rendering for our scope model,after that we put this texture on our scope model(I don’t think about uv of scope model yet).
You may think PostProcess Material can be replace it,yeah we can use PostProcess Material to make a similar visual effect.But that is not wonderful yet.I think I will have another trouble if I use PostProcess Material to realize
I wonder if my method could be implemented .I don’t study computer graphics yet,I just know a little of rendering.
I think it could be satifaction experience if I try to implement it.
Thanks !

Was trying something similar to this by basically rendering into the UI layer.
It was… interesting :slight_smile:

Really need to get into the engine one day and create a proper method for it.
Until then, we use a scene capture component as well, with the texture render target being dynamically sized as required. Ensures the resolution used for the optic is never too much or too little.

1 Like

One performance measure I took was to manually capture the scene to the render target. Everything is done in c++ since I’m using Tick to capture the render target and the tick is only running on the owning client and setting the tick interval to set how often the render target should update. For example this allows me to force it to 60 captures a second or 30 or whatever I want and give laggy effects for things like thermals if I so wish (think Escape From Tarkov’s Thermals). You could do something similar and just periodically set the tick interval to be 75% of the players current framerate. Other small measures I’m doing is when the player is not aiming I either flat out disable the tick so it stops capturing to the render target or I drastically slow down the rate to something like 10 times a second in the case of certain optics’ glass still being visible when not aiming (assuming the scopes eyebox doesnt block it out of view entirely).

1 Like