TAA / Motion Blur in Scene Capture 2D feature is not working in 4.17

I’m fairly sure that this commit was meant to fix Temporal AA and Motion Blur in Scene Capture 2D’s, but I can’t seem to get it to work. I’ve tried a variety of Render Target formats with no success.

Test Project: Google Drive: Sign-in

Image:

Change 3388862 on 2017/04/11 by Guillaume.Abadie

Allows Motion Blur and TAA in scene capture 2d.

https://github.com/EpicGames/UnrealEngine/commit/81ef7a206b58eb8204c9da4315aecd14cabde9c7

I don’t know who edited this but it’s NOT an answer - this is supposed to be working.

Have you had any luck?

The fact don’t see the render target of your scene capture being double tonemapped makes me suggest you have forgotten to set the capture source to final color on the scene capture, required to run the post processing chain of the renderer that includes passes such as motion blur or temporal aa. Would I be correct by any chance?

Does that mean it’s only possible to use this with Scene Color LDR? That would be a real shame if so
LDR is a just a terrible name sadly a legacy frozen in assets that slow us down to refactor this.

You can have this work: scene capture source to final color, enable all post processing pass such as MB and TAA you need with show flags. and add a post process material that replace the tonemapper (material’s blendable location = replace tonemapper) that just do the additive blend of bloom and scene color (don’t forget the bloom intensity). The additive bloom is available in this blendable location in postprocessinput2.

This way your scene capture’s rendertarget will still be in linear color space, but with all the post processing enabled, that I believe is what you are looking for.

I see in your code you disable every frame automatic update of the scene capture. To have TAA and MB, among other graphic feature, you will need to set bAlwaysPersistRenderingState=true;

Thanks @Guillaume.Abadie - I’ll try and set this up and get back to you!

The reason I disabled Capture Every Frame is because I manually capture the scene in another function, only when split-screen mode is active and when camera positions have been finalised - would it be better for me to use Capture Every Frame, and just turn that bool on and off instead of calling CaptureSceneDeferred() manually?

Also what texture settings for the Render Target should I be using? I currently have it set to not be HDR and using Linear Gamma.

Many thanks!

You most likely want float RT for your linear color space output that may have arbitrary lighting intensity.

As long as you have bAlwaysPersistRenderingState==true when bCaptureEveryFrame==false, it won’t have any difference.

When resuming capturing frames of a scene capture at a given frame N, I would like to remember you should manually emit a camera cut on the scene capture with USceneCaptureComponent2D::bCameraCutThisFrame on that very frame N. Otherwise the result of TAA for frame M>=N may have artifacts until it recovers from this crippling case. This is by design because the motion vector of your opaque geometry within the frame are going to indicate wrong previous location.

No, I’ve tried all sorts of configurations for the RT / Scene Capture too.

I’ve reached out to Guillaume who was responsible for the push, hopefully he will have a bit more information

Hey @Guillaume.Abadie

In the example project above, the capture source is set to ‘Scene Color (HDR)’, since that’s the only way to make the Render Target look identical to the Scene around it (other settings make it look darker, lighter etc so aren’t that useful).

Does that mean it’s only possible to use this with Scene Color LDR? That would be a real shame if so :frowning:

Note, I’ve also tried Final Color - and while this does work, the material looks a LOT darker :frowning:

I want to use this feature to create a split-screen system by using the Render Target as the second half of the screen, but since TAA doesn’t work this doesn’t seem to be possible :frowning:

I can increase the Render Target brightness by messing with ‘Target Gamma’, but something about that doesn’t feel right…

No matter what settings I use, I can’t mirror what the actual scene camera outputs using Final Color LDR :confused:

This is using SceneColor HDR - the colours are now correct, but the render target has no anti-aliasing :frowning:

@Guillaume.Abadie Thanks for the help. I’ve come close to what I think is what you want me to do, but I’m having a couple of issues.

Here is my material:

And this is the result I get. The problem now is that the Bloom in PostProcessInput 2 is NOT anti-aliased so looks very blocky, so I’m having trouble adding it back to the scene view:

Also, now that I am ‘replacing’ the tonemapper, how do I make the output look like the normal scene view?

I seem to have been able to Match the Render Target output with the Scene output now when using ‘Replace Tonemapper’. To do this, you also need to do this on the Scene Capture:

		VoronoiCapture->ShowFlags.SetTonemapper(false);

However, now I have no bloom input for the Render Target, realistically I need ALL post processing to be done on the Render Target right? Then match the scene up to it?

This is what it looks like using ‘Replace Tonemapper’, and with the Scene Capture Tonemapper switched off. Everything matches - but now I have no post-processing :frowning:

To achieve large bloom radius, Bloom works by down and upsampling scene color. This thing can happen. according to the content. And I just trust all your content after the Add of the scene color and bloom is not enhancing this problem.

You are missing multiplying the bloom input by the bloom intensity btw. :slight_smile:

@Guillaume.Abadie This seems to be as close as I can get. I set the Material to ‘Before Tonemapping’ - then turn the Tonemapper OFF for the Scene Capture.

This gives me Post-Processing for both sides without any blocky artefacts in bloom and all the good stuff etc… Unfortuantely however, the Render Target is now quite blurry when in motion. See here. It’s so close now!

I just replied at the bottom! It’s very close now using Before Tonemapping!

You would think that Setting the Material to ‘After Tonemapper’ and calling 'SetTonemapper(true) would make the Render Target come out the same as the Scene, but it doesn’t :confused: