Render Texture Bug with Post Process Material when scenecapture 2D is set to "capture every frame" and "final color".

Hi,

Problem is in the title.
To make it obvious:

  1. Make a new project from “Blank”
  2. Make a Render Target texture, add a Scenecapture2D actor to the scene and assign the texture to it
  3. Make a PostProcess Material and import the render target in it. Connect it to emissive
  4. Assign this PostProcess Material to the Global Post Process Volume
  5. In SceneCatpure 2D settings, check “capture every frame” and choose “Final color”
  6. Launch the level and within 1 or 2 seconds your screen will become black, or blue, or red or whatever (seems that it depends on the color of objects you have in your level).

Here is a link to a video I made to show the bug:


Any idea what causes it? Is there a way to fix this?

Regards

Ed

Hi Ed -

From your setup it looks like you have set up an infinite mirror situation. Setting the Scene Capture to use LDR FInal Color will apply the full post processing for the scene to the Capture Camera view which you have set to render as the Post Process Scene View. From a very real sense it is the rendering equivalent of dividing by zero.

I would have to know what you are trying to do to better be able to help you solve this issue.

Thank You

Ketchum

Hi ,

“Infinite mirror situation”: yes, that’s the impression it gave me.
It seems you mean that this setup just can’t work (“the rendering equivalent of dividing by zero”). But it already works
with “Final Color” and “Capture every frame” unchecked. So, I don’t understand why it shouldn’t work when it’s checked. Also: if this infinite mirror situation is expected, why would “capture every frame” be an available option with “final color”?

Basically, i want to combine (a kind of compositing in a post process material, based on a black & white mask) 2 renders of the scene: 1 from PPInput0 and 1 from the render target texture.
You can see screenshots of what I already did in this thread (see the last screenshots):

The glass is from render texture and the rest of the scene is from PPInput0. It works nicely BUT the problem is that, for the moment, I had to let “capture every frame” unchecked. So when the camera stops moving, the render target is not updated. So, unless i want to use this effect for an infinite runner game (!), it’s not ideal :wink:

Ed

Hey -

Okay I have a better understanding of what you are doing and am fairly confident that the issue revolves around tick. With Capture Every Frame ticked you are actually pulling frames based on tick and this is not allowing the post process pipeline to run effectively and is causing the infinite mirror effect.

In 4.8.0 - the new Update Capture Function is implemented which would allow you to set a looping Timer to a Custom Event which updates your Scene Capture Actor without using Tick, you will have to play with the exact Time for the Timer but I would start with 0.25 and work as low (more updates per second) until you hit the error again.

Let me know if this doesn’t help fix the issue for you -

Ketchum

Hi,

I just downloaded UE 4.8.0. and made a quick test with the “update content” function. And it works. That’s great!

In fact, you don’t even have to use a Timer: in Level Blueprint, I just grabbed the “Event Tick” node, added the “Update content” node, targetting my scenecapture2D component and… it updates every frame, while my scenecapture2D actor is set to “final color” and “capture every frame” UNCHECKED. If i check it, the same bug reappears.

So it seems if you want to capture every frame, you must let “capture every frame” unchecked!

Using Timer is a good idea, though, as it gives more control over the updating process and can optimize my setup, which has a significant (but still reasonable) cost on fps.

Thanks for your help.

Ed