HDR and multiple SceneCapture2D

Hi,

I have several SceneCapture2D to take screenshots of my scene from diffrent point of view. The problem I have is that the cameras are not exposed in the same way to the lights and thus the HDR gives different results for each camera. I would like to compare the screenshots against each others but one would be very dark while another is bright.
Is there a way to make sure that the HDR would be homogenous between cameras?
I tried to by pass the post-processing but it changes nothing.

cam = GetWorld()->SpawnActor<ASceneCapture2D>(ASceneCapture2D::StaticClass(), FVector::ZeroVector, FRotator::ZeroVector);
cam->GetCaptureComponent2D()->ShowFlags.SetPostProcessing(false);

I also tried to use the LDR. There is no different in luminosity but the captured colors are really poor…

Thanks for your help.

Hey FabienDanieau,

How I would go about doing this would be to create a Scene Capture 2D blueprint as a parent class. Now whenever you drag an instance of that blueprint into your scene, it will still be it’s own individual actor so you can use the unique view, but the post processing settings of the blueprint will be inherited across all instances. This will keep things uniform and clean.

There are also a bunch of Show Flags for the Scene Capture 2D actor to give you greater control over what is rendered to the texture in the camera actor itself.

Scene Capture 2D - Show Flags

Let me know if you still have questions.

Cheers,

Thanks for the answer. This thing is that I have to use a C++ code to create the cameras…
Anyway I am using the code above to create them so they all have the same post-processing settings. Still the rendering of each camera is different because the HDR processing is independently performed on each captured texture.

I tried to switch on/off several flags but nothing changes.

Is there a particular reason you have to use code?

This would be handled much easier through blueprints. I don’t know how you would like to do this in code, but the principle is to create a Parent Camera actor and then create child actors of the parent that inherit the post processing.

You could also just use a global post process volume (unbound) and then ignore the post process blending of your Capture 2D camera actors.

Thanks,

I found a solution actually. I was using ReadPixels to get the image of the camera.

TArray<FColor> Col;
FTextureRenderTarget2DResource* textureResource = (FTextureRenderTarget2DResource*)cam->GetCaptureComponent2D()->TextureTarget->Resource;
textureResource->ReadPixels(Col);

But it seems that ReadFloat16Pixels gives me the raw image without any post-processing.

TArray<FFloat16Color> Col;
FTextureRenderTarget2DResource* textureResource = (FTextureRenderTarget2DResource*)cam->GetCaptureComponent2D()->TextureTarget->Resource;		
textureResource->ReadFloat16Pixels(Col);

Thanks!