Much lower quality of LDR vs HDR in Render Target.

Hi,

Working on some Post Process materials, I noticed that LDR renders are much lower quality than HDR when you use a Render Target assigned to a scenecapture actor.

Here is an example: i assigned this simple post process material to a post process volume.

So, 2 renders of the same scene: on the left, the player camera, on the right, the scenecapture component attached to this camera.

With the scenecapture set to HDR, i get this:

e.g. absolutely no difference between the 2 renders. Neat!

and when I set it to LDR with postprocess, i get this:

which is obviously weird compared to the first.

In version 4.8 you can tweak new parameters, like gamma, gain, offset, temperature, which I did here because contrast and colours are initially awful.
But the image remains grainy, strongly compressed. Almost GIF quality!

For the moment, I used LDR renders, as I was blurring them, so the loss of quality wasn’t a big problem. Visually, it was acceptable. But now I need a better quality.

I could use HDR but in this case, I loose the possibility to use postprocess settings of the scenecapture actor to tweak my render.

Ideally, I would need something like a “HDR with postprocess” feature.

So my questions are:

  • Why LDR renders are so weird compared to HDR? Is it because of compression?
  • Is there really no way to improve them significantly, remove the grain?
  • Ideally, is there a way to have HDR with postprocess as a render for scenecapture actors?

Thanks.

Is there a way to skip the conversion HDR –> LDR, and keep initial quality?
Digging in code, for example.

I say: bump.

I had to do this myself in 4.7.6.
Assuming your happy compiling from github.

You would find need to add a bool property to USceneCaptureComponent within USceneCaptureComponent.h.

and within the FScene::CreateSceneRenderer() function within SceneCaptureRendering.cpp
after the

add

If you now disable the tonemapper on the scenecapturecomponent with LDR(with post-process) enabled you will get HDR with post-process.

Edit* the other option is to set your post-process to happen after the tonemapper if possible.
I however was in a situation where this was’nt possible.

Thanks a lot ! I’ll test it tonight and give you feedback.

Well, I did what you described, checked everything, compiled but infortunately, it doesn’t have the effect it is supposed to have.
Image is still LDR. No doubt about this: same quality, same grain, etc…

@:

Ok, so after our few P.M, here is what I get.
I’ll make it very detailled so that it will be as clear as possible:

After adding your lines of code and compiling, I made a basic postprocess material with a render texture plugged in the emissive channel for testing purposes:

4247b09686d73f9d16751ad9db081a02fa33f4a2.jpeg

this postprocess material is assigned as blendable to the camera of a third person character.

I also added a scenecapture component to this third person character and assigned the render target to this component.

Now:

1 ° - If I launch the level, with scenecapture set to HDR, I get this:

which is the equivalent of a camera view.

2° - If I launch the level with scencapture set to LDR with tonemapper enabled (so: “Disable Tonemapper” UNCHECKED), I get this:

which is what you normally get with this option.

3° - If I launch the level with scenecapture set to LDR with tonemapper disabled (so: “Disable Tonemapper” CHECKED), I get this:

So, as I told you, disabling tonemapper really does something and it’s better than the second screenshot.
Colors are the same but gradients are modifed: you no longer have these smooth transitions between values.
You see what I mean as it’s obvious.

The only way i could recreate image 3 was to disable hdr with the render textures settings.

scenecapture before,
http://i.imgur.com/q2nuWLS.png

disable hdr option,
http://i.imgur.com/lucvPJi.jpg

scenecapture Image after,
http://i.imgur.com/TmCtZEd.png

It might be worth checking your texture settings.

In the 3 screenshots i posted, HDR was checked in the render target settings.
Otherwise, the first screenshot would have been as weird as the third.
I don’t understand. You tell me it works and, on my side, it doesn’t.
Maybe a hardware issue…
Or maybe : i compiled using “build UE4” on a source code already modified and built 2 times for other reasons. Should I use “rebuild” ? Could it make any difference ?

I’d be interested to see if it is a hardware issue, i’ll upload a shipping build of my test project tommorrow for you to test out.

Ok, great.