When I am making copy of TextureTarget of USceneCaptureComponent2D, witch is UTextureRenderTarget2D - I have met few very weird troubles and all of them are about colors been Darker then original image. I still can make a copy of it’s Raw Data and make new UTexture2D from it if USceneCaptureComponent2D’s Capture Source was sets to be “Final Color”. But it is just darker, it seems to have to Ambient Occlusion. I made this captures away from Game World (about X =150 000, Y=150 000) so the background is captured as Black Color and Alpha = 0. But I am also found that when I have used “SceneColor(HDR), Scene Depth in A” as Capture Source - the Image on UTextureRenderTarget2D, witch I have seen as Image in Widget, was same as original. It was just like I wan it. But once I have tried to make it’s copy - it get’s to be very dark, and only shiny parts was seen. It was possible to make it brighter by adjusting Colors in it’s Color Array. But I don’t think I will ever achieve original colors this way. So All I wan is to know: How to make exactly same Image (UTexture2D) as the original Object, that USceneCaptureComponent2D was capturing?
Also, I have material, that takes RendererTarget, that was captured with “Scene Color (HDR) in RGB, inv Opacity in A” and it’s just invert it’s alpha - and it’s looks correct. When I have done same in code - it does inverts alpha, but the picture get’s to be very darker then original.
Solved it. So you should get TArray from UTextureRenderTarget2D of USceneCaptureComponent2D with “SceneCaptureComponent2D->CaptureSource = SCS_FinalColorLDR;” and give it to this function " FImageUtils::CropAndScaleImage() " and you will get perfect image. It also can be resized to be smaller for your Icons or something, like a Thumbnail. Also I can tell how to make a perfect transparent background for it, but it be better for me to post some tutorial about it.