Sign in to follow this  
Rob Ainscough

The perfect HDR ...

Recommended Posts

I shouldn't say perfect because it will vary from individual to individual and is very much monitor(s) dependent on how HDR information is presented to the end user.

 

But for 4K monitor users or anyone interested in increased brightness levels in P3D v2.4 without getting too much clipping of brightness here are some settings that work very well for my setup:

 

\ShadersHLSL\PostProcess\HDR.HLSL

 

Line 10-13:

static const float BloomThreshold = 03.25f;

static const float BloomMagnitude = 03.75f;

static const float BloomBlurSigma = 1.3;

static const float TimeDelta = 4.0f;

 

Line 166:

avgLuminance *= 0.60f;

 

NOTE: Descrease value (i.e. 0.60 to 0.50) to increase brightness.  Note you are uncommenting this out in the original.

 

\ShadersHLSL\GPUTerrain.fx

 

Line 881:

BaseColor *= lerp( .38f, 1.0f, fAlpha );

 

Make sure you delete your shaders folder prior to running P3D: i.e. C:\Users\Rob\AppData\Local\Lockheed Martin\Prepar3D v2\Shaders

 

Also make sure you backup the ORIGINAL files before editing.

 

Interested in feedback, but be sure to include your monitor(s) brand and model and what resolution you run at (not  your DSR resolution but actual).

 

Cheers, Rob.

 

EDIT: this is based on a RGB color space, not YCbCr.

Share this post


Link to post
Help AVSIM continue to serve you!
Please donate today!

Rob Hi,

 

 

I cannot locate  BaseColor*=lerp(.38f,1.0f,fAlpha):

in \ShadersHLSLH\GpuTerrain.fx

Share this post


Link to post

Thanks Rob, I will give these a try and post results later on this evening.

Share this post


Link to post

Rob Hi,

 

 

I cannot locate  BaseColor*=lerp(.38f,1.0f,fAlpha):

in \ShadersHLSLH\GpuTerrain.fx

 

Did you open the right one ? - one is a fx file the other is fxh - its in the fx file for sure

===================================================================

 

I did not notice much of a difference but will play with darkness - brightness as Rob has stated - thanks Rob - keep these kind of tweaks coming

Share this post


Link to post

I opened the right one, still I dont see it. May be I opened with "Notepad"?? :wub:

Share this post


Link to post

 

 


I opened the right one, still I dont see it. May be I opened with "Notepad"??

 

Hmmm ... even with NotePad you should see that line of code??  ... Oh, I see, I didn't indicate the line number (edited) - sorry.

 

See line 881:

 

Original code

BaseColor *= lerp( .35f, 1.0f, fAlpha );

 

New code

BaseColor *= lerp( .38f, 1.0f, fAlpha );

 

These tweaks aren't "new", I'm just sharing the "combination" (key) of changes that worked well for me on my setup.

 

Cheers, Rob.

Share this post


Link to post

Can you share the custom sky textures you're using, Rob?

Share this post


Link to post

No problem is from my side. I dont think Notpad is the  right way to open this kind files. I opened but It doesnt shows  any  Line numbers like 881. What program do you use open this kind files?

Share this post


Link to post

Thanks very much Rob - notice a nice change in the range. Cheers!

 

BTW, things have been quiet on the western front from you and the others in the know...which usually means lots of secret squirrel stuff B). Anything you're allowed to discuss on what's in the works?!

Share this post


Link to post

\ShadersHLSL\GPUTerrain.fx

 

Line 881:

BaseColor *= lerp( .38f, 1.0f, fAlpha );

 

What does this line do?

Share this post


Link to post

No problem is from my side. I dont think Notpad is the right way to open this kind files. I opened but It doesnt shows any Line numbers like 881. What program do you use open this kind files?

if using Notepad, click VIEW | STATUS BAR. This will show you the line number in the status bar in the bottom.

Share this post


Link to post

 

 


What does this line do?

 

Increases the brightness of base textures so they provide more feedback to HDR.

 

 

 


Can you share the custom sky textures you're using, Rob?

 

I asked about this an apparently not ... but I think they are available here ... I think Mr. Sennett can point you in the right direction.

 

 

 


I opened but It doesnt shows  any  Line numbers like 881. What program do you use open this kind files?

 

I use UltraEdit, but Notepad will work fine, it's just a text file.  If you want to see what line your cursor is on in Notepad ... from Menu select View and enable Status Bar ... you'll see line numbers in the lower right corner, move your cursor to when it says Ln 882, Col1 ... or do a Find on text.

 

Cheers, Rob.

Share this post


Link to post

I asked about this an apparently not ... but I think they are available here ... I think Mr. Sennett can point you in the right direction.

 

Cheers, Rob.

 

OK, thanks Rob. By the way, I tried your HDR changes and love them. The default settings are much, much too dark in the daytime. Your settings are what they should be from the get go.  By the way, this is on two different monitors, an Asus ROG Swift PG278Q (TN panel 2560x1440) and LG 27EA63 (IPS panel 1920x1080.)

Share this post


Link to post

The values I would experiment with the most are:

 

avgLuminance *= 0.60f;

 

I've tried ranges from 0.50 to 0.95 ... I'm actually at 0.64 now after a little more testing, but this will be end user preference and be sure your monitor is fully warmed up before making any changes.

 

BaseColor *= lerp( .38f, 1.0f, fAlpha );

 

I've tried ranges from 0.32 to 0.40 ... I'm tittering back and forth between 0.37 and 0.38.

 

Best to experiment, make sure you delete your shaders folder after each change.  Also recommend you test ONE change at a time and test Dawn, Day, Dusk, and Night (also be aware of moon state, full moon will provide more light than 1/4 moon, etc.)

 

Cheers, Rob.

Share this post


Link to post

@Rob Ainscough

 

Hey brother, I tried out the tweaks but had to run, so I was only able to quickly delete shaders, start P3D, let it rebuild shaders and slew to about 5,000 feet. Right off the bat, my MSE photoscenery looked much brighter and clearer. Something similar to when one calibrates a TV's brightness/contrast and getting more shadow detail. I really liked what I saw.

 

Later tonight I will do a quick flight and check it out better.

 

Monitor: Samsung UN46ES6003 HDTV 1080P running at native 1920x1080x32 resolution in PC MODE.

Share this post


Link to post

Glad to hear it's working well for some ... thanks for the monitor/res feedback.

 

Just got word that MSE are now supporting P3D "officially" ... so that's good news (even if just installer changes) http://www.megasceneryearth.com/store/cart.php?page=prepar3d_update_files

 

 

 


Anything you're allowed to discuss on what's in the works?!

 

LM are working on v2.5 ... that's all I know.  I've been busy with work work and doing a lot of work for 3rd party providers to help them get on LM's dev showcase area.

Share this post


Link to post

 

I asked about this an apparently not ... but I think they are available here ... I think Mr. Sennett can point you in the right direction.

 

 

Taken care of Rob - thanks

Share this post


Link to post

Oh my gosh... I am officially done with FSX.  This is the most natural looking environment I have ever seen in a flight sim to date.

 

br9ew0i.jpg

Share this post


Link to post

Thanks all. I made the changes and going to make a test flight :rolleyes:

Share this post


Link to post

The brightness tweak is very nice Rob - thanks

 

Oh my gosh... I am officially done with FSX.  This is the most natural looking environment I have ever seen in a flight sim to date.

 

Great shot Molly

Share this post


Link to post

Oh my gosh... I am officially done with FSX. This is the most natural looking environment I have ever seen in a flight sim to date.

Niice!!

Share this post


Link to post

The values I would experiment with the most are:

 

 

I would like to go back to using HDR. However, the saturation in the cockpit when the cabin light is on (default Cessna 172, etc) is just too much. Could you point out which variable reduces that intensity, so I can experiment?

 

Thanks

Share this post


Link to post

Could you point out which variable reduces that intensity, so I can experiment?

 

This is the one if you see to much bloom/glow (cockpit lights often do this) ... trying increasing to reduce the bloom.

 

static const float BloomBlurSigma = 1.3;   ... I'm at 1.5 with the CS 777 at KLAS

 

and this one

 

avgLuminance *= 0.60f;   ... I'm at 0.67 with CS 777 at KLAS  0.67 is darker than 0.60.

 

Unfortunately because the various add-on/3rd party products that are all focused on FSX there is a great variance in how HDR works with each 3rd party product.  So some values may work well for one product but not necessarily another different 3rd party product.

 

Not blaming 3rd party as they didn't have HDR in FSX so there is no way they could know how their products might react to HDR.  Hopefully over time 3rd party will start to develop products with P3D's HDR in mind and test with P3D, but for now we'll just have to adjust to FSX ports.

 

Cheers, Rob.

 

 

This is the most natural looking environment I have ever seen in a flight sim to date.

 

Very nice!

 

Cheers, Rob.

Share this post


Link to post

This is the one if you see to much bloom/glow (cockpit lights often do this) ... trying increasing to reduce the bloom.

 

 

I'll start whacking away at that tomorrow evening. Thanks for all you do,

Share this post


Link to post

 

 


LM are working on v2.5 ... that's all I know. I've been busy with work work and doing a lot of work for 3rd party providers to help them get on LM's dev showcase area.

 

Thanks for the update Rob. You've obviously been busy, given all the updates on the main P3D site...!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this