Oolite on HDR Displays

News and discussion of the PC port of Oolite.

Moderators: another_commander, winston

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Oolite on HDR Displays

Post by another_commander »

Hmm... Other than the mention of the Microsoft Basic Display Adapter, which may or may not be relevant, I can't see what could be wrong here. HDR appears to be both supported (as expected) and enabled (which is what I wanted to be sure of, that it was enabled from Windows display settings). I'll see if I can make a build that would output more information during the HDR detection phase to see what IDs are generated for the primary monitor and try to pinpoint the exact point of failure, but I'm afraid that that will have to wait until the start of the next week.

I had already tested the build on two different PCs with HDR support without issues before publishing it. Hopefully we'll be able to track the problem in this case too.
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 664
Joined: Sat Aug 09, 2014 4:16 pm

Re: Oolite on HDR Displays

Post by Commander_X »

The Microsoft Basic Display Adapter is bound to Qemu's GTK window, which I keep available as a failsafe, but don't use at all, my login comes on the main NVidia display.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Oolite on HDR Displays

Post by another_commander »

@Commander_X: Could you please try launching the test build with the second monitor also active, or, if this doesn't work either, with the second monitor physically disconnected? Just trying to confirm whether that particular monitor topology involving a disabled monitor has anything to do with the dialog always popping up.
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 664
Joined: Sat Aug 09, 2014 4:16 pm

Re: Oolite on HDR Displays

Post by Commander_X »

another_commander wrote: Sat Jan 14, 2023 10:12 am
@Commander_X: Could you please try launching the test build with the second monitor also active, or, if this doesn't work either, with the second monitor physically disconnected? Just trying to confirm whether that particular monitor topology involving a disabled monitor has anything to do with the dialog always popping up.
Did both tests and still the dialog showed up in each case. For the "physically disconnected" test, I actually checked in the settings, and there was no other monitor detected[*].

*True from a Control Panel/Settings perspective, but otherwise a bit of a stretch: my device manager in turn shows 4 monitors usually, and it showed only 3 when I disconnected the second one. That is because there are 3 monitors connected to my graphics card (out of which 2 are used by Windows) and number 4 is Qemu's GTK window (again, not used by Windows, but still attached to the VM).
My 0.02 Cr is on the Microsoft Basic Display Adapter giving the lowest denominator.

Last second update: I disabled the Microsoft Basic Display Adapter from device manager and the dialog didn't show, so that seems to settle it.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Oolite on HDR Displays

Post by another_commander »

As of commit 317ce1e, Oolite can now save HDR screenshots, so you can now immortalize your adventures in full HDR glory.

Pressing * will now save both a png and a Radiance .hdr format file when the game is running in HDR. Radiance .hdrs can be opened using a utility such as HDR + WCG Image Viewer.

We are using the stb_image_write header file for saving our .hdrs and the code is written in a way that will make it possible for Linux to save HDR snapshots too whenever HDR support gets added to it.
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 664
Joined: Sat Aug 09, 2014 4:16 pm

Re: Oolite on HDR Displays

Post by Commander_X »

A link for the updated version of the dev environment would also be needed. With LE20230121, it seems that winuser.h is missing some stuff:

Code: Select all

src/SDL/MyOpenGLView.m: In function '-[MyOpenGLView isOutputDisplayHDREnabled]':
src/SDL/MyOpenGLView.m:1049:2: error: unknown type name 'DISPLAYCONFIG_PATH_INFO'
src/SDL/MyOpenGLView.m:1050:2: error: unknown type name 'DISPLAYCONFIG_MODE_INFO'
src/SDL/MyOpenGLView.m:1051:17: error: 'QDC_ONLY_ACTIVE_PATHS' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1051:17: note: each undeclared identifier is reported only once for each function it appears in
src/SDL/MyOpenGLView.m:1051:41: error: 'QDC_VIRTUAL_MODE_AWARE' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1058:3: warning: implicit declaration of function 'GetDisplayConfigBufferSizes' [-Wimplicit-function-declaration]
src/SDL/MyOpenGLView.m:1067:21: error: 'DISPLAYCONFIG_PATH_INFO' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1067:46: error: expected expression before ')' token
src/SDL/MyOpenGLView.m:1074:21: error: 'DISPLAYCONFIG_MODE_INFO' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1074:46: error: expected expression before ')' token
src/SDL/MyOpenGLView.m:1084:3: warning: implicit declaration of function 'QueryDisplayConfig' [-Wimplicit-function-declaration]
src/SDL/MyOpenGLView.m:1120:28: error: 'path' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1122:3: error: unknown type name 'DISPLAYCONFIG_TARGET_DEVICE_NAME'
src/SDL/MyOpenGLView.m:1122:3: error: empty scalar initializer
src/SDL/MyOpenGLView.m:1122:3: error: (near initialization for 'targetName')
src/SDL/MyOpenGLView.m:1123:13: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1124:13: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1125:13: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1125:28: error: 'DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1126:13: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1127:3: warning: implicit declaration of function 'DisplayConfigGetDeviceInfo' [-Wimplicit-function-declaration]
src/SDL/MyOpenGLView.m:1127:54: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1136:3: error: unknown type name 'DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO'
src/SDL/MyOpenGLView.m:1136:3: error: empty scalar initializer
src/SDL/MyOpenGLView.m:1136:3: error: (near initialization for 'advColorInfo')
src/SDL/MyOpenGLView.m:1137:15: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1137:30: error: 'DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1138:15: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1139:15: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1140:15: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1142:56: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1164:51: error: request for member 'monitorDevicePath' in something not a structure or union
src/SDL/MyOpenGLView.m:1165:16: error: request for member 'advancedColorSupported' in something not a structure or union
src/SDL/MyOpenGLView.m:1165:55: error: request for member 'advancedColorEnabled' in something not a structure or union
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Oolite on HDR Displays

Post by another_commander »

Commander_X wrote: Tue Apr 18, 2023 11:52 pm
A link for the updated version of the dev environment would also be needed. With LE20230121, it seems that winuser.h is missing some stuff:

Code: Select all

src/SDL/MyOpenGLView.m: In function '-[MyOpenGLView isOutputDisplayHDREnabled]':
src/SDL/MyOpenGLView.m:1049:2: error: unknown type name 'DISPLAYCONFIG_PATH_INFO'
src/SDL/MyOpenGLView.m:1050:2: error: unknown type name 'DISPLAYCONFIG_MODE_INFO'
src/SDL/MyOpenGLView.m:1051:17: error: 'QDC_ONLY_ACTIVE_PATHS' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1051:17: note: each undeclared identifier is reported only once for each function it appears in
src/SDL/MyOpenGLView.m:1051:41: error: 'QDC_VIRTUAL_MODE_AWARE' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1058:3: warning: implicit declaration of function 'GetDisplayConfigBufferSizes' [-Wimplicit-function-declaration]
src/SDL/MyOpenGLView.m:1067:21: error: 'DISPLAYCONFIG_PATH_INFO' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1067:46: error: expected expression before ')' token
src/SDL/MyOpenGLView.m:1074:21: error: 'DISPLAYCONFIG_MODE_INFO' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1074:46: error: expected expression before ')' token
src/SDL/MyOpenGLView.m:1084:3: warning: implicit declaration of function 'QueryDisplayConfig' [-Wimplicit-function-declaration]
src/SDL/MyOpenGLView.m:1120:28: error: 'path' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1122:3: error: unknown type name 'DISPLAYCONFIG_TARGET_DEVICE_NAME'
src/SDL/MyOpenGLView.m:1122:3: error: empty scalar initializer
src/SDL/MyOpenGLView.m:1122:3: error: (near initialization for 'targetName')
src/SDL/MyOpenGLView.m:1123:13: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1124:13: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1125:13: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1125:28: error: 'DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1126:13: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1127:3: warning: implicit declaration of function 'DisplayConfigGetDeviceInfo' [-Wimplicit-function-declaration]
src/SDL/MyOpenGLView.m:1127:54: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1136:3: error: unknown type name 'DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO'
src/SDL/MyOpenGLView.m:1136:3: error: empty scalar initializer
src/SDL/MyOpenGLView.m:1136:3: error: (near initialization for 'advColorInfo')
src/SDL/MyOpenGLView.m:1137:15: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1137:30: error: 'DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO' undeclared (first use in this function)
src/SDL/MyOpenGLView.m:1138:15: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1139:15: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1140:15: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1142:56: error: request for member 'header' in something not a structure or union
src/SDL/MyOpenGLView.m:1164:51: error: request for member 'monitorDevicePath' in something not a structure or union
src/SDL/MyOpenGLView.m:1165:16: error: request for member 'advancedColorSupported' in something not a structure or union
src/SDL/MyOpenGLView.m:1165:55: error: request for member 'advancedColorEnabled' in something not a structure or union
Actually LE20230121 is OK and DISPLAYCONFIG_PATH_INFO for example is defined in wingdi.h line 2137. But it can be used only for Windows versions equal to or higher than 0x0601. Make sure you have -DWINVER=0x0601 in your GNUmakefile both for ADDITIONAL_CFLAGS and ADDITIONAL_OBJCFLAGS.
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 664
Joined: Sat Aug 09, 2014 4:16 pm

Re: Oolite on HDR Displays

Post by Commander_X »

Yup, the options were there, it was only that 1) I didn't actually use LE20230121, but the previous LE20180425 2) I checked in LE20230121 for the QDC_ONLY missing, but in winuser.h (as google's first suggestion was) :oops:
All in order now, and I can confirm that the .hdr format is the one Blender can use (the main reason I looked after the announcement ;) ).
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Oolite on HDR Displays

Post by another_commander »

Testing Oolite using Special K, Reshade and Lilium's HDR analysis shaders and visualizations. Looking good I think, highlights, black levels and shadow details look alright in the histograms. Unfortunately my display can output only around 400 nits.

Image

Image

Image

As can be seen in the pics, a small percentage of the displayed colors (DCI-P3) is outside of the normal SDR colorspace (BT.709) and this is without boosting the saturation. The percentage can increase easily to 5% or more by simply raising the game's color saturation to 1.25. This means that when you play in HDR you can see more colors than typical monitors can display. We are using the full capabilities of HDR. Yay!

Oh, and the screenies above are SDR of course. Unfortunately you cannot see here exactly what I see on an HDR screen.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Oolite on HDR Displays

Post by another_commander »

Starting with revision 4dc9357, a new shortcut has been added to the Start menu group for the game under Windows. Those who use the trunk installers, will notice this new icon under the group "Oolite":
Image

You can now use it to launch the game in HDR.

As a reminder, to be able to run the game in this mode you need:
  • Windows 10 or 11 (11 is strongly recommended).
  • A monitor that supports HDR output.
  • Graphics card that supports HDR, like 10xx NVidia series or higher spec.
  • HDMI 2.1 / DisplayPort 1.4 or higher spec cable, so that the HDR bandwidth requirement is satisfied.
  • Enabling of HDR in Windows from the Settings -> System -> Display
    Image
    If your system does not support HDR for whatever reason you will not have the option to enable it as seen.
  • Execution of the game using the new shortcut or the -hdr parameter from Start -> Run or command line.
Attempting to launch the game without full HDR support will trigger a warning dialog informing the user that it was not possible to detect HDR on the system and asking whether the user would like to proceed with the game rendering as HDR in a non-suitable environment (i.e, looking weird) or abort.
User avatar
hiran
Theorethicist
Posts: 2055
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Oolite on HDR Displays

Post by hiran »

another_commander wrote: Sun Oct 22, 2023 7:04 pm
Starting with revision 4dc9357, a new shortcut has been added to the Start menu group for the game under Windows. Those who use the trunk installers, will notice this new icon under the group "Oolite":
Image

You can now use it to launch the game in HDR.

As a reminder, to be able to run the game in this mode you need:
  • Windows 10 or 11 (11 is strongly recommended).
  • A monitor that supports HDR output.
  • Graphics card that supports HDR, like 10xx NVidia series or higher spec.
  • HDMI 2.1 / DisplayPort 1.4 or higher spec cable, so that the HDR bandwidth requirement is satisfied.
  • Enabling of HDR in Windows from the Settings -> System -> Display
    Image
    If your system does not support HDR for whatever reason you will not have the option to enable it as seen.
  • Execution of the game using the new shortcut or the -hdr parameter from Start -> Run or command line.
Attempting to launch the game without full HDR support will trigger a warning dialog informing the user that it was not possible to detect HDR on the system and asking whether the user would like to proceed with the game rendering as HDR in a non-suitable environment (i.e, looking weird) or abort.
Where could we store these instructions so players do not have to dig in some thread history to get this information? The wiki? The readme? Some other of Oolite's documents?
Sunshine - Moonlight - Good Times - Oolite
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Oolite on HDR Displays

Post by another_commander »

hiran wrote: Mon Oct 23, 2023 4:40 am
Where could we store these instructions so players do not have to dig in some thread history to get this information? The wiki? The readme? Some other of Oolite's documents?
I guess both the readme distributed with the game and the wiki are good places to have this information available.
User avatar
hiran
Theorethicist
Posts: 2055
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Oolite on HDR Displays

Post by hiran »

Every time again, after seeing new HDR images or advertizements for new monitors/TV screens and being impressed by their detail, color contrast and whatsoever I have to think twice to realize that the stuff was presented to me by my own, already existing equipment...
Sunshine - Moonlight - Good Times - Oolite
Post Reply