Get screen monitor size (in inches) rather than resolution


I have a Post-Process material which outlines certain meshes in the game, I’m setting the width of this outline based on how large your screen resolution is (1080p = 1px, larger than that= 2px).

The issue I’m having is that since there are some monitors which are small (15inches) with larger than 1080p resolution this technique isn’t very consistent.
I’m looking to find a way to get the monitor’s size in inches rather than its resolution to define that outline width, since using the resolution really doesn’t yield the desired result.

Is there any way to get that metric in UE4 - blueprints or otherwise?


Not UE4 per say, but there are a few ways to accomplish this.

EDID information for your display contains meta data on your screen’s physical sizing. You could use NVIDIA API’s to retrieve EDID. NVIDIA Windows Management Instrumentation SDK | NVIDIA Developer

Alternatively you could retrieve the resolution and DPI by other means, and divide to get physical size.

For testing, DPI can be retrieved on windows with following in cmd:

wmic path Win32_DesktopMonitor get /format:list


A 32 inch 2k screen (30.5 viewable)

2560 x 1440 Resolution

96 DPI

2560 / 96 = 26.66 inches wide

1440 / 96 = 15 inches tall.

Confirming the diagonal size: 15^2 + 26.66^2 = 30.59 inches

Thank you for this lead.

So I gather there is no way to get this from UE directly via blueprint/c++?