# CaptureComponent2D causes scene flicker

**URL:** <https://forums.unrealengine.com/t/capturecomponent2d-causes-scene-flicker/389787>\
**Category:** Rendering\
**Tags:** Scene-Capture, flicker, unreal-engine, flickering, question\
**Created:** [April 3, 2017, 1:19pm UTC](https://forums.unrealengine.com/t/capturecomponent2d-causes-scene-flicker/389787 "2017-04-03T13:19:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2709d010](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2709d010](https://forums.unrealengine.com/u/anonymous_user_2709d010)\
**Post date:** [April 3, 2017, 1:19pm UTC](https://forums.unrealengine.com/t/capturecomponent2d-causes-scene-flicker/389787/1 "2017-04-03T13:19:32Z")

</div>

I have a setup where I use a minimap from one of the packages in the Marketplace. I added the scene capture component to the scene as described and cause a capture from above when the character moves. The result is that the rendered 3D scene flickers every time a capture is made for the minimap.

This bug was already reported in the past here [link text](https://issues.unrealengine.com/issue/UE-30207) and a related bug here [link text](https://issues.unrealengine.com/issue/UE-17989)

The first bug is marked as “solved” which it clearly is not. The flicker seems to happen only when the render target is of a certain size for instance 1024 \* 1024. When I set the render target to 512\*512 no flicker occurs.

Flickering is accompanied by constant outputs of the following sort to the logfile:

```
2017.04.02-23.46.00:411][407]LogRenderer: Reallocating scene render targets to support 1336x1024 NumSamples 1 (Frame:1409).
[2017.04.02-23.46.00:427][408]LogRenderer: Reallocating scene render targets to support 1336x836 NumSamples 1 (Frame:1411).
[2017.04.02-23.46.01:422][467]LogRenderer: Reallocating scene render targets to support 1336x1024 NumSamples 1 (Frame:1469).
[2017.04.02-23.46.01:437][467]LogRenderer: Reallocating scene render targets to support 1336x836 NumSamples 1 (Frame:1471).
[2017.04.02-23.46.02:437][527]LogRenderer: Reallocating scene render targets to support 1336x1024 NumSamples 1 (Frame:1530).
[2017.04.02-23.46.02:454][528]LogRenderer: Reallocating scene render targets to support 1336x836 NumSamples 1 (Frame:1532).

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [April 3, 2017, 3:12pm UTC](https://forums.unrealengine.com/t/capturecomponent2d-causes-scene-flicker/389787/2 "2017-04-03T15:12:42Z")

</div>

Hey Wallenstein,

So I would need a way to reproduce the first issue in a new blank project with minimal content (no minimap content). The first one dealt with the issue strictly on Windows 10, and was marked as resolved by me as the issue no longer occurred on that platform. If you can provide me with a test case to follow then we can investigate further.

Thank you,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2709d010](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2709d010](https://forums.unrealengine.com/u/anonymous_user_2709d010)\
**Post date:** [April 4, 2017, 6:25am UTC](https://forums.unrealengine.com/t/capturecomponent2d-causes-scene-flicker/389787/3 "2017-04-04T06:25:20Z")

</div>

Sorry I cant reproduce it in a new project. It happens only in my project but it’s a client app for a server connection and wont run alone, besides its over 7GB.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [April 4, 2017, 2:21pm UTC](https://forums.unrealengine.com/t/capturecomponent2d-causes-scene-flicker/389787/4 "2017-04-04T14:21:39Z")

</div>

I would need a way to reproduce the issue in order to report this as a bug. Your issue could be the same as second bug you linked which is still unresolved.

Regards,

H

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6b572aea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6b572aea](https://forums.unrealengine.com/u/anonymous_user_6b572aea)\
**Post date:** [July 25, 2017, 7:25pm UTC](https://forums.unrealengine.com/t/capturecomponent2d-causes-scene-flicker/389787/5 "2017-07-25T19:25:55Z")

</div>

Hi Andrew,

I am seeing this bug as well. I’ve described it in a similar thread [here](https://answers.unrealengine.com/questions/663662/can-i-call-rhicmdlistreadsurfacedata-or-readpixels.html). I believe you can reproduce it by doing the following:  
Add a SceneCapture2D actor to the scene. Give it a render target whose resolution is larger than the PIE/Standalone window.  
Periodically in your code, call ReadPixels doing something like this…

```
// camera is a SceneCaptureComponent2D*
UTextureRenderTarget2D* RenderTarget = camera->TextureTarget;
FTextureRenderTarget2DResource* RenderResource 
 = (FTextureRenderTarget2DResource*)RenderTarget->Resource;

TArray<FColor> pixels;
RenderResource->ReadPixels(pixels);

```

You should see the screen flicker every time ReadPixels is called as well as significant slowdown. The log should give the “re-allocating” message. Try this with bHDR both enabled and disabled on the texture target - I think there is a significant performance difference but you should see the bug either way.

I’m also seeing the re-allocation message when my texture targets are smaller than the current viewport, but I don’t get the screen flicker and I haven’t run the profiler yet to see if there is a significant performance cost in that case.

---

<div class="post-metadata">

**Author:** ![SebaSopp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SebaSopp](https://forums.unrealengine.com/u/SebaSopp)\
**Post date:** [October 15, 2018, 2:35pm UTC](https://forums.unrealengine.com/t/capturecomponent2d-causes-scene-flicker/389787/6 "2018-10-15T14:35:42Z")

</div>

Having also the problem, like you described it depends on the Viewport- and SceneRenderTarget-Size. Also disabling Temporal-AA eliminates the flickering… I’m using 4.17.2 , has this been fixed in a later version?
