Rendertarget export node does work unexpected

Dear Community,

I am working on a Projekt where I use the unreal engine as a Image Generator with different light and camera positions for some Maschine learning tasks. To generate the images I used the sceenshot tool and rendertarget/capture2D. I need the rendertarget for generating a shadow mask by subtracing result of one renderpass with and one without the dynamic shadow properiers. Which works very well. Also the Image which is contained after capturing in the rendertarget looks a bit darker in the editor…

But when it come to exporting the rendertarget (via the exoirt rendertarget node) as Png. This image is much darker. I tried setting up the gamma as in very much posts recommanded. but this seems to be different afterall. So i am wondering if they are using different ways to convert the readed buffer or compressing the data in the sceenshot tool?

I would be glad if someone here has a answer to this and can help me out of this.

Snipped Image for Editorview on rendertarget

Image taken from Screenshot function

Image exported via Export node
329855-
Shadow Map extracted via Rendering Diff

I found out the brighness of the exported image also depands on the number of frames taken with the capturing camera. But I dont how much frames i should take to reproduce the result of the sceenshot tool. Also it seems it scales with a infinite number of Frames.

using a gamma of 2.2

30 Frames

200 Frames

500 Frames

1000 Frames

ScreenShot Tool

So maybe I miss something …

  • Set Always Persist Rendering State in
    scene capture component (clear RT
    before each capture)
  • Use Scene Color as Capture Source
  • Set the Render Target Format to RTF
    RGBA8 SRGB

I use the Export to Disk node but I don’t think there is a difference.