x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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: https://drive.google.com/open?id=0B_FT-hzi26QkdmVkeTVINWZFTmM

Image: alt text

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

Product Version: UE 4.17 Preview
Tags:
test.jpg (227.8 kB)
more ▼

asked Jul 11 '17 at 04:38 PM in Bug Reports

avatar image

TheJamsh
820 61 99 141

avatar image CupMcCakers Jul 12 '17 at 10:08 PM

Have you had any luck?

avatar image TheJamsh Jul 13 '17 at 12:36 PM

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

avatar image CupMcCakers Jul 22 '17 at 07:53 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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?

more ▼

answered Jul 24 '17 at 07:48 PM

avatar image

Guillaume.Abadie STAFF
10 1

avatar image TheJamsh Jul 26 '17 at 07:49 AM

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 :(

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

alt text

untitled.jpg (143.0 kB)
avatar image TheJamsh Jul 26 '17 at 07:51 AM

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 :(

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

avatar image TheJamsh Jul 26 '17 at 08:26 AM

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

alt text

alt text

help.jpg (339.5 kB)
blendable.jpg (116.8 kB)
avatar image TheJamsh Jul 26 '17 at 08:32 AM

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

alt text

help2.jpg (424.8 kB)
avatar image Guillaume.Abadie STAFF Jul 26 '17 at 09:31 AM

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.
avatar image Guillaume.Abadie STAFF Jul 26 '17 at 09:38 AM

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;

avatar image TheJamsh Jul 27 '17 at 08:51 AM

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!

avatar image Guillaume.Abadie STAFF Jul 27 '17 at 09:11 AM

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.

avatar image TheJamsh Aug 09 '17 at 05:17 PM

@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: alt text

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:

alt text

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

material.jpg (196.3 kB)
bloom.jpg (305.4 kB)
avatar image Guillaume.Abadie STAFF Aug 09 '17 at 05:50 PM

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. :)

avatar image TheJamsh Aug 09 '17 at 06:04 PM

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

avatar image TheJamsh Aug 09 '17 at 06:36 PM

Where do I read the Bloom Intensity from in the material?

avatar image TheJamsh Aug 09 '17 at 05:47 PM

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 :(

alt text

test.png (1.3 MB)
avatar image Guillaume.Abadie STAFF Aug 09 '17 at 06:09 PM

but now I have no post-processing

You have DOF, TAA, and MB. VoronoiCapture->ShowFlags.SetTonemapper(false); Also disable bloom.
avatar image TheJamsh Aug 09 '17 at 06:04 PM

@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.

alt text

alt text

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!

https://www.youtube.com/watch?v=aVDqcsmVSA8

code.jpg (44.9 kB)
avatar image TheJamsh Aug 09 '17 at 06:08 PM

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 :/

avatar image soylent_me Oct 10 '17 at 04:28 AM

Hi TheJamish -- Were you ever able to get a 1-to-1 scenecap? It's odd that getting a RT to match viewport is a "Holy Grail" but here we are...!

avatar image TheJamsh Oct 10 '17 at 08:23 AM

I couldn't manage it in the end I'm afraid. I tried all kinds of different settings but I couldn't get both screens to look identical unless I replaced the tonemapper and lost bloom and all post etc in the process.

I got close, but unfortunately the post-process bloom that comes in as part of PostProcessInput2 is extremely blocky, it's not really useable for anything unless you have Temporal AA (and even that might be a push). The other issue is that the bloom coming in is for the whole screen, so I'd still have to find a way to mask it.

I've decided to cut this feature from my game for now, because it's too difficult and it's expensive to render the entire scene twice (despite disregarding half the pixels :() - so I won't be putting any more effort into this for now!

avatar image soylent_me Oct 10 '17 at 03:15 PM

Thanks for the update, very good to know.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question