Very dark cockpit in 5.2

Any issues, problems or troubleshooting topics related to the Prepar3D client application.
boeingp3d
Posts: 51
Joined: Sat Dec 04, 2021 9:47 am

Re: Very dark cockpit in 5.2

Post by boeingp3d »

boeingp3d wrote: Fri Feb 18, 2022 12:40 am
BiologicalNanobot wrote: Tue Jun 15, 2021 9:20 pm Hi,

One of the reasons of dark cockpits is the HDR tonemapper used in the simulator. Physically based lighting calculations often produce values beyond SDR, so it is easier to do calculations in HDR and then convert resulting HDR image back to SDR. Mathematical functions called tonemappers are used for this purpose.

P3D uses Narkowicz fit of ACES tonemapper, which makes the image overly contrasty and crushes blacks. I hope Lockheed Martin uses Uncharted 2 instead, which results in a much more natural look.

Here is my implementation, if it helps:

Code: Select all

float3 Uncharted2Curve(float3 input_color)
{
    const float shoulder_strength = 0.22;
    const float linear_strength = 0.30;
    const float linear_angle = 0.10;
    const float toe_strength = 0.20;
    const float toe_numerator = 0.01;
    const float toe_denominator = 0.30;

    return (((input_color * ((shoulder_strength * input_color) + (linear_angle * linear_strength))) + (toe_strength * toe_numerator)) / ((input_color * ((shoulder_strength * input_color) + linear_strength)) + (toe_strength * toe_denominator))) - (toe_numerator / toe_denominator);
}

float3 ToneMap(float3 input_color)
{
    const float exposure_bias = 2.0;
    const float white_point = 11.2;

    return saturate(Uncharted2Curve(input_color * exposure_bias) / Uncharted2Curve(float3(white_point, white_point, white_point)));
}
Will the shader edits work in latest p3d 5.3 hf2?
I was brave and tried, and the new cockpit shader works in the newest P3D5.3
The fps is a little low during the day on the ground compared to default cockpit shaders but it looks so much better. Thanks BiologicalNanobot for all your work! The combination of edits for environmental haze, less moon reflection and brighter cockpit make 5.3 very good!
shermank
Posts: 336
Joined: Thu Nov 28, 2013 6:17 pm

Re: Very dark cockpit in 5.2

Post by shermank »

Where should the cockpit light tone be placed in the P3D directory. And how should it be titled? thanks
Sherm
boeingp3d
Posts: 51
Joined: Sat Dec 04, 2021 9:47 am

Re: Very dark cockpit in 5.2

Post by boeingp3d »

shermank wrote: Sun Feb 20, 2022 6:29 pm Where should the cockpit light tone be placed in the P3D directory. And how should it be titled? thanks
Sherm
Hello in his post here I used notepad++ to create a new HDR shader file and always delete temporary shader folder in appdata/LOCAL/lockheed martin\prepar3d v5

http://www.prepar3d.com/forum/viewtopic ... 42#p242942
shermank
Posts: 336
Joined: Thu Nov 28, 2013 6:17 pm

Re: Very dark cockpit in 5.2

Post by shermank »

boeingp3d wrote: Mon Feb 21, 2022 8:58 pm
shermank wrote: Sun Feb 20, 2022 6:29 pm Where should the cockpit light tone be placed in the P3D directory. And how should it be titled? thanks
Sherm
Hello in his post here I used notepad++ to create a new HDR shader file and always delete temporary shader folder in appdata/LOCAL/lockheed martin\prepar3d v5

http://www.prepar3d.com/forum/viewtopic ... 42#p242942
Checking the folder there is no HDR Shader. And, now it occurs to me that because I do not have an HDR monitor, there would be no such thing...duh, my bad....thanks...
Sherm
boeingp3d
Posts: 51
Joined: Sat Dec 04, 2021 9:47 am

Re: Very dark cockpit in 5.2

Post by boeingp3d »

shermank wrote: Thu Feb 24, 2022 1:51 pm
boeingp3d wrote: Mon Feb 21, 2022 8:58 pm
shermank wrote: Sun Feb 20, 2022 6:29 pm Where should the cockpit light tone be placed in the P3D directory. And how should it be titled? thanks
Sherm
Hello in his post here I used notepad++ to create a new HDR shader file and always delete temporary shader folder in appdata/LOCAL/lockheed martin\prepar3d v5

http://www.prepar3d.com/forum/viewtopic ... 42#p242942
Checking the folder there is no HDR Shader. And, now it occurs to me that because I do not have an HDR monitor, there would be no such thing...duh, my bad....thanks...
Sherm
Prepar3D v5\ShadersHLSL\PostProcess\HDR.hlsl
shermank
Posts: 336
Joined: Thu Nov 28, 2013 6:17 pm

Re: Very dark cockpit in 5.2

Post by shermank »

Checking the folder there is no HDR Shader. And, now it occurs to me that because I do not have an HDR monitor, there would be no such thing...duh, my bad....thanks...
Sherm
[/quote]

Prepar3D v5\ShadersHLSL\PostProcess\HDR.hlsl
[/quote]

Thanks, Boeing
shermank
Posts: 336
Joined: Thu Nov 28, 2013 6:17 pm

Re: Very dark cockpit in 5.2

Post by shermank »

One more question. When I looked at the file being replaced by this new one, I saw that it had been written by TOGA...evidently from my use of ENVSHADE and/or ENVTEX. So, I assume that to use any of the TOGA programs with this new setting is impossible. Is that correct? Thanks.

Sherm
mpni
Posts: 1098
Joined: Thu Aug 09, 2018 10:37 am
Contact:

Re: Very dark cockpit in 5.2

Post by mpni »

Hi BiologicalNanobot
Thank you very much for this fix which works fine in 5.3HF2.
Is there a possibility for having better light is the cockpit?
For testing, what criteria must be changed in your fix?
As you, I really hope also Lockheed Martin makes this default in next Prepar3D versions.
Regards
Michel
Post Reply