Tone Mapping - Let's Make Space Dark Again Mk II

Contents

1. Introduction

2. Basic Curves

2.1 Linear Curve

2.2 Gamma Curve

3. What is Tone Mapping?

4. Filmic Tone Mapping

5. Elite dangerous Tone Mapping

5.1 HDRNode Reference Settings

5.2 HDRNode Settings

5.3. HDRNode Modded Settings


1. Introduction

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

Disclaimer: Tone mapping is a post processing technique so it's unlikely that you will break the game if you make changes to the HDRNode settings, although the colours in game may look horrendous depending on the changes you make. However, do not make changes to the GraphicsConfiguration.xml file. Any changes to the HDRNode settings should be placed in the GraphicsConfigurationOveride.xml file. If something goes wrong, you can then simply delete the changes and restart the game.

Important Note: The curves and colour maps in Sections 5.2 and 5.3 are based on the "HDRNode" settings as it is assumed these are used in game (not the HDRNode_Reference settings). This is a reasonable assumption given that the Flimic curve doesn't use "dual" operators. However, if a FD dev (or anyone else in the know) stumbles across this thread, a post confirming or debunking this assumption would be appreciated.

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

This thread was inspired by Cmdr Horizone's post "Rift users! Let's make space dark again! Fix the Rift CV1 bad low-end gamma". Cmdr Horizone noticed that dark colours were brighter in the Oculus Rift when compared to a normal monitor, but there was some improvement by adjusting the HDRNode settings used in the Elite Dangerous graphics configuration file. Cmdr Horizone's observation regarding the connection between the in game colour and the HDRNode settings was correct, although he was mistaken about the "gamma curve". The HDRNode settings relate to another transform called "Filmic tone mapping".

This thread considers the tone mapping used by the HDRNode settings and how changes to the settings may improve the colours in the Oculus Rift (and other displays). The final topic suggests adjustments to the HDRNode settings for Cmdr's to play with.


2. Basic Curves

Before tackling Flimic tone mapping it's worth taking a brief look at two basic curves that you are probably familar with.


2.1 Linear Curve

The standard linear curve for RBG colours starts at 0 (black) and ends at 255 (white). Plotting these coordinates on an X Y graph produces the following curve:

KgcrXDr.jpg



2.2 Gamma Curve

Gamma is a basic transform that affects all colours between black and white. If we increase the gamma and plot the transform on an X Y graph it would resemble the following curve:

yUfnzlN.jpg


If we reduce the gamma instead, the curve would stretch in the opposite direction below the blue line. Note that gamma (like brightness and contrast) is a post processing technique that operates on the output. Notionally, the gamma curve has been placed the que and what you see on your monitor is the end result. It can therefore be used in conjunction with other post processing techniques such as tone mapping.


3. What is Tone Mapping?

Tone mapping is post processing technique applied to the output. A simple definition - It is the process of converting the tonal values of an image from a high range to a lower one. For example, an HDR digital image with a dynamic range of 100,000:1 will be converted into an image with tonal values ranging from around 1 to 255. A little dry, but hopefully you noticed the question hidden in the text. How does one display high definition (HDR) images using limited tonal values?

The film industry provided the answer. It had developed sophisticated processing techniques for capturing the tonal differences giving us the realistic colours and shadows that we take for granted in our family snaps. Shown in an X Y graph the tone map resembles the following:

mm3pTpW.jpg


This curve has a "toe" to display deep blacks and "shoulder" to display bright whites, with a long slope for smooth transition through other colours.


4. Filmic Tone Mapping

Not surprisingly, digital imaging post processing techniques now emulate those used by the film industry. The most popular technique is "Flimic" tone mapping. It is widely used in video games including recent triple AAA releases such as Battlefield 1, Uncharted: Lost Legacy, Call of Duty: Infinite Warfare and, I should add, Elite Dangerous. Filmic tone mapping also has a curve with a toe and shoulder. An X Y graph of a typical flimic tone map would resemble the following graph:

eFBTT7A.jpg


The development of Flimic tone mapping has been largely credited to John Hable who has published some excellent articles. Three articles deserve mention and are recommended reading. They are Hable, "John uncharted2 hdr lighting" (March 2010), "Why a filmic curve saturates your blacks" (May 2010) and "Fimic tonemapping with piecewise power curves" (March 2017).

Like other curves, the Filmic curve can be shown on an X Y graph by plotting the operators proposed by John Hable listed below:

wspks2J.jpg


Note that the gamma basic transform is not "baked in" which makes Filmic tone mapping even more attractive.

So what does the Flimic curve look like in a colour map? Here's one I created using Shadertoy:

G5lK0cx.jpg


There is a good black "toe" and white "shoulder" with smooth transition of the mid tones on the way through.


5. Elite Dangerous Tone Mapping

So, you're past the hard part and ready to take a look at the tone mapping used in Elite Dangerous. The tone map settings are in the GraphicsConfiguration.xml file (which can be found in the following directory - ...\Elite Dangerous\Products\elite-dangerous-64). There are two settings, "HDRNode_Reference" and "HDRNode". However, it is worth repeating at this point that any changes to the HDRNode settings should be placed in the GraphicsConfigurationOveride.xml file. Do not change the GraphicConfiquration.xml file.


5.1 HDRNode Reference Settings

The HDRNode_Reference settings almost mirror those used for the classic Filmic curve. Compare the settings by John Hable (above) with those used in the configuration file (below):

<HRDNode_Reference>
...

<LinearStrength>0.5000</LinearStrength>
<LinearAngle>0.1000</LinearAngle>
<ToeStrength>0.2000</ToeStrength>
<ToeNumerator>0.02000</ToeNumerator>
<ToeDenominator>0.3000</ToeDenominator>
<LinearWhite>11.2000</LinearWhite>

</HRDNode_Reference>

We can see that the Filmic curve and Reference settings closely resemble each other by using the Desmos web site to plot them on an X Y graph:

EGYi6J8.jpg


We can also compare the curves in a colour map:

2 = HDRNode_Reference Curve
1 = Filmic Curve

LyhV4w6.jpg


Not surprisingly, the maps are similar. Each has a black "toe" and white "shoulder" with smooth transition between the two. The noticable difference is that the HDRNode_Reference colours are slightly darker along the curve. Makes sense, as the curve is lower than the standard Filmic curve.


5.2 HDRNode Settings

It's time to look at the HDRNode settings in the GraphicsConfiguration.xml file. The settings are listed below:

<HDRNode>
...

<ShoulderStrength>0.491000</ShoulderStrength>
<LinearStrength>0.707000</LinearStrength>
<LinearAngle>0.704000</LinearAngle>
<ToeStrength>1.185000</ToeStrength>
<ToeNumerator>1.377000</ToeNumerator>
<ToeDenominator>1.976000</ToeDenominator>
<LinearWhite>5.242000</LinearWhite>

</HDRNode>

Using Desmos to plot the settings on an X Y graph we can see the curve is flatter and much lower than the Filmic curve:

CgTG3dY.jpg


Again, we can compare the curves in a colour map:

3 = HDRNode Curve
2 = HDRNode_Reference Curve
1 = Filmic Curve

Jhdo2L4.jpg


The HDRNode Curve has a stronger black "toe", darker mid tones and a brighter white "shoulder". The transition between the two is also better as the colours fade closer to the shoulder. Good for a space game!


5.3 HDRNode Modded Settings

Now that you have a basic understanding of the Filmic curve and the HDRNode settings, you may also like to fiddle with the settings. In that case you will need to see the changes as a "hit and miss" approach is unlikely to work. I recommend you use the Demos web site to plot the changes so you can then compare them with the standard Filmic curve and avoid changes that grossly distort the curve.

Here's the HDRNode settings I'm currently using:

<HDRNode>

<ShoulderStrength>0.430000</ShoulderStrength>
<LinearStrength>1.400000</LinearStrength>
<LinearAngle>0.768000</LinearAngle>
<ToeStrength>0.190000</ToeStrength>
<ToeNumerator>1.48000</ToeNumerator>
<ToeDenominator>1.920000</ToeDenominator>
<LinearWhite>4.900000</LinearWhite>

</HDRNode>

The HDRNode modded curve looks like this:

5IoExJA.jpg


Note that the starting point ("blackpoint") of HDRNode modded curve has been moved to the right a little bit - an experiment on my part intended to make everything left of the starting point black. :)

A quick comparison using the same colour map shows the changes:

4 = HDRNode Modded Curve
3 = HDRNode Curve
2 = HDRNode_Reference Curve
1 = Filmic Curve

a3PN6T1.jpg


The HDRNode modded curve obviously has a much stronger black "toe" and more subdued mid tones. There is also a nice white "shoulder" and a smooth transition as the colours fade closer to the shoulder.

In game, space is noticeably black and the mid tones look rich (inside a corolis station being a good example). However, I suspect that the HDRNode curve has been pushed to its limit with some colour issues starting to emerge. In particular, the dark side of planets (when approaching the surface) and nebulae show signs of colour saturation. Happily, this can be corrected in large part using 25% gamma without washing out the light side of planets. There are still grey clouds when leaving planets, which may in fact be a little more noticeable against the black. There seems to be a little more bloom (from stars) which could be due to the mid tone changes.
 
Last edited:
UPDATES & NOTES

27/03/18

Cmdr Dar|{cyde has done some work and believes the "HRDNode_Reference" settings should be used. He has posted some test settings below (post #8). If someone can get to the bottom of the mystery "HDRNode" settings (as opposed to the reference settings) rep will flow. :)

24/03/18

ATM there is an unresolved issue - Whether "HDRNode_Reference" settings or "HDR Node" settings (or both) should be used when making changes in game? Any insights welcome. :)
 
Last edited:
Cheers mate! Will look into this at some stage. The colours in my Rift actually really bother me sometimes in ED, I was making do with the old A/B cable switcheroo and adjusting AMD settings for that port. Oh and have some rep!
 
I love this stuff. Have some rep!

You did a thing on shadertoy, so you can code? Have you thought about implementing the user variables shown on the filmicworlds site? He provides all the code we need. Basically need to just apply a GUI with some sliders/knobs for the controls. My coding skills are very limited, I would have done it already if I had any. Randomly tweaking values can and does mess up the curves, but his code fixes that.

Have you tried a straight filmic curve in-game? I really wonder how that would look. Have been using the tweaks from the other thread for ages, really helps deep space look blacker.
 
I love this stuff. Have some rep!

You did a thing on shadertoy, so you can code? Have you thought about implementing the user variables shown on the filmicworlds site? He provides all the code we need. Basically need to just apply a GUI with some sliders/knobs for the controls. My coding skills are very limited, I would have done it already if I had any. Randomly tweaking values can and does mess up the curves, but his code fixes that.

Have you tried a straight filmic curve in-game? I really wonder how that would look. Have been using the tweaks from the other thread for ages, really helps deep space look blacker.

Thanks.

I only understand basic code - "monkey see monkey do" - and waiting for someone to tell me I've stuffed it up. :)

A "straight filmic curve" should be possible by using the John Habel operators in the slide which are very close to the "HDRNode_Reference" settings, assuming the reference settings are there purely as a benchmark. ATM I'm unsure what the purpose of the reference settings is. I can see the effect of changes to the "HDR Node" settings in game, so have assumed that they are the relevant ones.

It's interesting that the settings in the earlier thread work. I wasn't able to get to the bottom of this. I tried them and they don't look right when plotted on an X Y graph or colour map. Basically, the toe was good, but the mid tones were off the chart which means they would be too light - would have to turn gamma off. It looked more like a "contrast curve". However, the two settings Cmr Horizone changed do relate to the toe, so he was on the right track.

Just to complicate things further, the colour maps below show the "HDR Node Reference" settings and "HDR Node Settings" with the changes by Cmdr Horizone. The changes look ok and a little darker in the reference settings (which he used in the earlier thread) colour map, but really bad in the HDR Node settings colour map. If players are changing the reference settings AND seeing a difference with those changes in game that are not off the chart, then this would mean that the reference settings are doing something (???) :eek:

Note - labels should be "HDR" not "HRD" (whoops).

TUlEKEw.jpg
 
Last edited:
OK, I played around some.

https://www.desmos.com/calculator/bpiterq7mn Black graph is filmic, Red is Elite default, and blue you can move around.

ED actually uses the HDRNode_Reference values and ignores what is in HDRnode. I tried the HDRNode values in my GraphicsConfigurationOverride.xml, they are horrible.

Code:
   <HDRNode_Reference>
        <ShoulderStrength>0.168000</ShoulderStrength>
        <LinearStrength>0.5000</LinearStrength>
        <LinearAngle>0.100000</LinearAngle>
        <ToeStrength>0.3940000</ToeStrength>
        <ToeNumerator>0.028200</ToeNumerator>
        <ToeDenominator>0.300000</ToeDenominator>
        <LinearWhite>11.2000</LinearWhite>
    </HDRNode_Reference>

Those values look pretty good. I'm trying to make space black w/out crushing the blacks too much, it's a decent compromise. You can still see lots of space dust in the skybox on the dark side of planets, but we would have to destroy the picture to get rid of it. I will probably tweak a bunch more, it's pretty easy to iterate the numbers.

I find its best to tweak the toe a bit, then balance the line out w/ shoulder to get closer to the default. If you play with the sliders enough it starts to make sense. Trying to add more toe at the start, while keep the rest of the line near as possible to default.

I also tried Filmic values, they are too bright and washed out.

--Edit: after playing a bit, those values are too dark. Needs more testing.
 
Last edited:
  • Like (+1)
Reactions: A D
OK, I played around some.

https://www.desmos.com/calculator/bpiterq7mn Black graph is filmic, Red is Elite default, and blue you can move around.

ED actually uses the HDRNode_Reference values and ignores what is in HDRnode. I tried the HDRNode values in my GraphicsConfigurationOverride.xml, they are horrible.

Code:
   <HDRNode_Reference>
        <ShoulderStrength>0.168000</ShoulderStrength>
        <LinearStrength>0.5000</LinearStrength>
        <LinearAngle>0.100000</LinearAngle>
        <ToeStrength>0.3940000</ToeStrength>
        <ToeNumerator>0.028200</ToeNumerator>
        <ToeDenominator>0.300000</ToeDenominator>
        <LinearWhite>11.2000</LinearWhite>
    </HDRNode_Reference>

Those values look pretty good. I'm trying to make space black w/out crushing the blacks too much, it's a decent compromise. You can still see lots of space dust in the skybox on the dark side of planets, but we would have to destroy the picture to get rid of it. I will probably tweak a bunch more, it's pretty easy to iterate the numbers.

I find its best to tweak the toe a bit, then balance the line out w/ shoulder to get closer to the default. If you play with the sliders enough it starts to make sense. Trying to add more toe at the start, while keep the rest of the line near as possible to default.

I also tried Filmic values, they are too bright and washed out.

--Edit: after playing a bit, those values are too dark. Needs more testing.


Great. I thought the HDRNode settings (as opposed to the HDNode_Reference settings) made a difference, but happy to be wrong about that. At least we know that ED does use Filmic tone mapping, roughly what it means and have a way to test it. All good stuff.

Thanks for the input. Good work on the curves BTW.
 
Last edited:
Delighted to see this excellent article. Very glad you went all-in and explained everything better than I could at the time. It would be really nice to have a Frontier expert on the matter come in here and give some insight to the last issues.
 
I was reading on the Oculus forums last week that the 'too bright' issue is actually a deliberate move by Oculus so that certain colours pop more, or don't loose definition. Or something like that. The person who stated that said it was word from an NVIDIA rep, after the latest NVIDIA drivers removed the option to adjust levels for the Rift. As in Oculus had requested that NVIDIA remove the feature. I don't know anything about it as this was last week, and I'm an AMD user. Correct me if I'm wrong, I won't explode ;)
 
  • Like (+1)
Reactions: NW3
Makes sense. While the rift has OLEDs that can do perfect blacks, they are too slow. If it went right down to pure black, we would get horrible black smear. I think they boost the darkest colors to prevent that. We just notice it a lot in this game because of all the dark sky with subtle details. You'll notice most VR games are very bright, ED is actually a worst case scenario.
 
  • Like (+1)
Reactions: NW3
Thing that always cracks me up is my CMDR wearsa black flight suit under charcoal / black clothes, and these are always darker than the blackness of space. IF we could teak the hame to render the black bits of space as the same near blacks used for the cmdr's clothes it would look a trillion times better.
 
That's interesting news about the Rift. The best thing about OLED screens is the deep black, which gives near infinite contrast. If you can't get deep black space even on a Rift, an LCD screen (like my future Pimax 8K will have) is a lot more competitive, in terms of image quality.
 
Hey! Thanks so much for this, really respect your knowledge and contribution.

To make things easier, I've worked this in to EDProfiler, so all the above settings are adjustable through a UI

I've also included a graph plot, but I need to discuss it with an expert like you, if you don't mind, A D?

Do you have discord? If so please find me: James (Dr. Kaii)#5684, otherwise private message here, email (kaii@dr.com) or a medium of your choice is fine. I also want to work on making an image that can live update changes to see how they look, but this area is all new to me so could really use some help.

EDProfiler has over 50,000 downloads, so your assistance is requested by more than just myself :)


BwTXCOl.png
 
Basically need to just apply a GUI with some sliders/knobs for the controls.

Yep, working on this in EDProfiler. I do need help though, especially for creating the image to show changes, can you or someone else please pm me or contact me on discord or via email?

Basically I need to know what goes in the middle:


Original Pixel RGB >> {something with the numbers here} >> Output Pixel RGB

Basically this is where we are up to:

GBocFNp.png


What's left is to check the graph is accurate, maybe label it better, add the image and consider adding sliders if there is a reasonable range for each value. Right now you can increase values with mouse scrolling in the boxes
 
I've been playing with this since i saw the first post by Horizone many moons ago. I began using the 'demos' site as seen in the 'make space dark again II' thread on Dar|{cyde post #9. https://www.desmos.com/calculator/bpiterq7mn

The time I've put in experimenting with this is HUGE! So it's with absolute glee, happiness and joy that I can now use this tool! Cuts down the time immensely! and a review screen too!

MANY MANY MANY thanks drkaii... rep and donation coming to you. If I were a woman I'd kiss you :)
 
This is so great I don't even have words... Excellent research by A D and fantastic of drkaii to make a extension to EDprofiler for this...

And many thanks to you horizone! Without your first post I doubt very much any of this would have come to fruition, at any rate so quickly! :D
 
Back
Top Bottom