Download

SceneCaptureComponent2D antialiasing?

I’m using a scene capture component 2d on my game, but the results are very jagged and with no antialiasing, creating some artifacts and bright spots on the image. Is it possible to activate AA for that? How do I do it? I tried enabling it as a post process (on the capture component), but nothing changed, and I really need this captured texture to be as smooth as the game.

Cheers!

If you enable “Final Color with PostProcess” or something like that on the SceneCapture it will look exactly like in the game itself, so if Temporal AA is turned on it will also be turned on for the SceneCapture :slight_smile:

36f0fc06c7272f9eb017d701471c4a8ef85cc441.png

I tried that, but for some reason it’s still lacking AA. The captured scene looks exactly like the game, except for the AA ):

Maybe it’s a bug?

Temporal AA is not supported in Scene Capture 2Ds. I recall seeing it recently on a documentation page, but I’m having trouble finding it at the moment. If I do, I’ll post it back here. You can reduce the jaggedness some by increasing the texture size of the Render Target, but this will like lead to performance issues you increase it too large.

That’s a real bummer. Even on a higher resolution I still have artifacts everywhere, and the performance loss is unbearable. Is there no other way? Why doesn’t it support Temporal AA? Is it possible to enable it somehow, or maybe enable FX AA?

I’m facing the same problem right now. I use SceneCapture2Ds for a portal-like effect and the lack of AA destroys the illusion a little bit…

Hello,

is there already any solution for this problem.
Our problem is that we have to render a high quality model to a SceneCaptureComponent2D, due we need to display it within a 2D widget.
Caused by the lack of Temporal AA the model has not the desired quality.
Hence SceneCaptureComponent2D is not an option as long as there is no suitable post processing.

So we started to evaluate some other solutions.
1.) The first idea is to find a way to render the model after the 2D Widget. So the 3D scene just contains the model.
The viewport is first filled with the 2D Widget and afterwards it is blend with the model.
This sounds like a fragment shader manipulation.
Has anybody an idea to get an approach for this?

2.) The second idea is to modify the C++ code and recompile the engine.
This is more complex and I do not know whether the Epic team is currently working on it.
So far i found the corresponding classes within SceneCaptureComponent.cpp, TextureRenderTarget2D.h and TextureRenderTarget2D.cpp.
Additionally the class FRCPassPostProcessSSRTemporalAA in PostProcessTemporalAA.h/cpp is of interest.
Can anybody give me a hint where the code starts the post processing for an UTextureRenderTarget2D, so that I can simply add a **PostProcessTemporalAA **instance?

Thank you in advance.

Edit:
Due Temporal AA needs some frames (default is imho 3) to achieve a time based anti aliasing, this seems to be the reason why SceneCaptureComponent2D does not support it.
Hence when we want to modify the C++ code, the SceneCaptureComponent2D has to store the last 3 frames.

Use FScreenshotRequest to avoid the Jagged Edges and other Artifacts.

When using raw buffer, AA is not supported, but when using final color it is. **THE PROBLEM is **that there’s this ridiculous, still unresolved bug:
https://issues.unrealengine.com/issue/UE-79525
:slight_smile:

Here, I’m using 4.26. There’s an “advanced show flags” option, and TAA is disabled by default and is using FXAA as a fallback, make sure to turn it on and also that "Final Color (HDR) in Linear sRGB gamut is enabled.

Alpha channel lost after enabling (Final Color (HDR) in Linear sRGB gamut)