Create heatmaps of existing JXR screenshots

I discovered today that the HDR + WCG Image Viewer on the Microsoft Store allows you to create heatmaps of existing HDR screenshots. This is especially of interest for titles where Special K can’t render anything in and the game bar (WinKey+G) needs to be relied on to take a screenshot.

The only downside seems to be that while the app has an “Export image to SDR” option, that option does not actually export the currently rendered image (e.g. the heatmap), but only the original HDR image.

This means that to take the below screenshots I had to basically open the source screenshot, configure the app to display them in the mode I wanted, and then hit H and F to hide the UI and display the app in fullscreen mode and – you might’ve guessed it – use the game bar through WinKey+G to take a new screenshot of the app (aka image) in that mode.

A bit cumbersome. :expressionless:


Original:

  • Note that some details in the clouds are lost in the HDR-to-SDR conversion… :expressionless: Compare with the heatmap to see what.


SDR as grayscale:


Heatmap:


1 Like

By the way here’s a legend (or whatever you can call it) that I created using DisplayHDR Test as well as the same screenshot process described in the post above to be able to match colors to nits on the heatmap.

Basically black/blue/green/orange is ~350 nits or below. Red is ~350~1000 nits and purple/pink 2000~4000+ nits. White is 10000 nits.

  • On that note, due to the brightness being arguably low in the HDR + WCG Image Viewer when I captured the screenshots the resulting SDR image has “pure white” seen as grey as opposed to actual white (fire in the image above as well as the 10000 nits of the below legend).

This is interesting… though, an actual equation to derive the scale would be way more useful :slight_smile:

I’ll start working some of these features into Special K after I finish putzing around with my current framerate limiter stuff. I’ve been kicking around the idea in my head of going one step farther than this –

I think a real-time gamut map would be absolutely incredible, I’ve never seen it done before (in the context of analyzing graphics engines) but using compute shaders to do histogram calculation, I should be able to do analysis that puts this to shame. This is just luminance, but we’re ignoring that other aspect of HDR … color. Nobody ever talks about the saturation.

http://www.gamutvision.com/docs/gamutvision_displays.html

I want to basically implement some of those things, but make them fun for non-color scientists to play with :slight_smile:

Do you know how Evilboris creates his heatmaps of HDR video? His scale is pretty consistent and useful, but I have no idea how he creates them.

I just reviewed BT.2408-3 (HLG) in order to establish some default targets based on reference levels. I think I can derive appropriate heatmap scales now based on user preferences, rather than strictly adhering to a single mastering target as most of this software seems to do.

    //  400 peak, 101 ref ; 0.9709 gamma
    //  600 peak, 138 ref ; 0.9009 gamma
    //  800 peak, 172 ref ; 0.8621 gamma
    // 1000 peak, 203 ref ; 0.8333 gamma
    // 1500 peak, 276 ref ; 0.7874 gamma
    // 2000 peak, 343 ref ; 0.7519 gamma

    // HDR Reference White
    float _fLDRTarget = 276.0f;

The inverse gamma values used to roughly fit a power-law curve to the HDR range is very handy. Those are in the spec, but not written this way because I’m using HLG backwards :slight_smile:

I’ll probably have something functional and able to match analysis done by EvilBoris by the end of the week.

HLG even defines suggested luminance levels for SDR overlay content, which is pretty awesome and from my minimal testing pretty closely matches the levels I already use for my overlay relative to HDR scene content.

1 Like

@Aemony I assume you were more interested in Special K’s ability to do this in real-time? I don’t really want to build or use any offline tools :stuck_out_tongue:

Since like 99% of games that have official HDR implementations use HDR10 instead of scRGB, I need to create a secondary mode of operation for the HDR widget where it applies visualizations but doesn’t manipulate the image. Right now SK can only do visualizations if the game uses scRGB, but it’s not terribly complicated – my screenshot code already transforms HDR10 to scRGB.

Doing it real-time in games where SK functions and without actually using SK’s own HDR retrofit would be awesome – so just visualizing the games’ own HDR implementation through a heatmap without, as you say, manipulating the image.

It is a feature I’ve lacked a few times when I wanted to get a better idea of the default HDR implementation of a game.


But otherwise the thread was mostly a tip for others on a tool that can be used to create heatmaps in games where SK can’t function, such as Horizon: Zero Dawn :smiley:

The underlying cause of this thread and me finding the HDR + WCG Image Viewer tool was actually discussions on PCGW regarding Horizon Zero Dawn and it’s HDR support, which some users argued “didn’t reach the necessary nits required for HDR” or something. Hence the need to create a heatmap of a JXR screenshot captured using game bar since SK couldn’t do it.