x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.8
Tags:
more ▼

asked Aug 19 '15 at 03:49 PM in Rendering

avatar image

FabienDanieau
1 1 2 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

alt text

Let me know if you still have questions.

Cheers,

Andrew Hurley

more ▼

answered Aug 19 '15 at 05:17 PM

avatar image FabienDanieau Aug 20 '15 at 09:13 AM

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.

avatar image AndrewHurley Aug 20 '15 at 02:33 PM

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,

Andrew Hurley

avatar image FabienDanieau Aug 20 '15 at 06:48 PM

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!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question