Force OSMC to Render Interface in Native 4K?

Prior to my recent purchase of a Vero 4K+, I had been using an Nvidia Shield TV as my primary Kodi/SPMC box. As part of the transition process between the two, I was copying some of the relevant settings by toggling back and forth between the two inputs and glancing at the setting screens, and I noticed that everything in the interface looked much crisper in Kodi/SPMC than it did in OSMC, despite both devices being set to the same interface resolution (3840x2160p). As I looked more closely, I realized that Kodi/SPMC appeared to be rending the interface in true 4K/UHD, while OSMC appeared to be rending the interface in a lower resolution, then attempting to upscale rendered image to the selected resolution.

I don’t have a good camera, but I tried to take some quick sample photos on my mobile phone to show an example of the difference: OSMC vs SPMC Interface Rendering. You can see in the top photo (OSMC) that the font appears significantly less sharp than the bottom photo (SPMC). The same applies for cover art and and everything else displayed at the interface level, so it’s not a font-specific issue; I just chose the fonts for an easy apples-to-apples comparison.

Is there a setting (or tag for advancedsettings.xml) that I’m forgetting about that will force the OSMC interface to render natively in 2160p, or is a native 2160p interface simply unsupported by OSMC at this time?

You should not run the GUI at 4K – it’s not recommended.

It can be done but you need to make some extensive changes.
Kodi doesn’t have a very good scaler; so it’s better to set the interface to 1080p and let your TV do the job.

Sam

Out of curiosity, what are the changes required in case I did want to proceed down that path?

I believe your response actually answers another question I had, though, namely is there any way to have OSMC “downgrade” to 1080p when playing 1080p files while running the GUI at 4K? With SPMC, if you toggled the option “Also allow resolution switching”, then it would either upgrade or downgrade resolution to match the video file (allowing you to have a nice, crisp interface, but still play files in their native resolution), but it sounds like OSMC will only upgrade to higher resolutions for media files at this time?

After fiddling around with settings more last night, I settled on leaving OSMC at 1080p so that it would at least play 1080p and 4K files in their native resolution, but the fuzzy look of the interface is still nagging at me a bit.

Even if you output the GUI at 4K resolution, you’d need the skin to actually provide textures at the appropriate resolution. Those do not exist yet - in fact, many skins are made for 720p resolution (the OSMC one is 1080p). And considering that those textures would need to be four times the size (resolution) they are at the moment, the experience of a true 4K skin would probably be quite bad - at least on a small box like our Vero. As there is no hardware acceleration for the GUI (the skin engine is using the CPU), it would probably be laggy as hell.

What this means as well: There shouldn’t be a visible difference atm as skins don’t provide 4K resolution natively. The only difference would be the scaler. :wink:

You’d need to build a custom kernel and Kodi. Probably not a good idea.

I’m actually using the Estuary skin on my Vero right now (heresy, I know! :yum:), since I was so used to it from Kodi and SPMC on my Shield TV, so it should presumably have the exact same textures available as it did on the Shield. In any case, I don’t notice any particularly meaningful difference in the imagery of the theme, since it’s mostly just abstract colors in the backgrounds. The items that I notice the sharpness difference on are the fonts and cover art, neither of which I would imagine should be dependent on skin textures, since the one will be drawn on the fly and the others are just external images.

I just realized that since this is internal upscaling as opposed to set upscaling, I should be able to capture the difference in screenshots from the respective Kodi builds (as opposed to on my garbage phone camera), so I’ll try to take a couple of those this evening to better demonstrate what I’m seeing.

EDIT: Never mind about the screenshots; I didn’t quite think that one through. I tried to take a screenshot of each system with the resolution set to 3840x2160 and saw that the OSMC screenshot still came out as 1920x1080. Apparently the built-in screenshots operate prior to the upscaling stage of rendering.

Ah, so the 4K native interface resolution is a custom feature of the Android Kodi builds? I didn’t realize that.

No – the resolution is implemented at the OS level.

We scale the framebuffer in OSMC as it provides the performance and image.

Sam

Got it. I’ll put in a low-priority feature request sometime down the line for both the native 4K interface and the automatic resolution downgrading to match native media resolutions, since the features would really only make sense if they were both implemented together, then.

In the meantime, I’ll try out @Chillbo’s OSMC skin, which sounds like it’s optimized for 1080p. Glancing over it, I already like the fact that it offers hiding both plot and images on unwatched episodes, since that was one of my biggest pet peeves with the standard Kodi skins. The additional media info it shows for episodes is a nice touch, as well.

Thanks

It’s something we will look at – but for now it’s not on the radar.
What I think would keep everyone happy is to just show images > 1080p at 4K resolution. I have some ideas on how to do this.

Sam

You’d technically be right about the fonts, yes. Those should be resolution agnostic. But just have a look at the actual cover art that kodi caches… Those have more a less a fixed resolution depending on the scraper you’re using. But to my knowledge the standard Kodi scrapers don’t offer cover art for 4K resolution. And even if they did, that’s not how a skin works. The image controls in which the cover art are rendered are programmed for a set resolution (mostly 720p, not absolutely sure about Estuary). So, even if the cover art was made for 4K, it would be downscaled in an image control that isn’t made for 4K (with, let’s say, a hight of 700 pixels) no matter how the skin is rendered in the end: building the skin is happening before rendering, so a fixed 720p skin is just scaled to 4K. The same applies to fonts as those are normally set to a pixel hight in a skin as well…

As far as my skinning knowledge goes (and I’d confidently say, that I’ve acquired quite some until now) the difference in sharpness can’t be explained with a skin that is actually rendered at 4K, no matter the platform Kodi is running on. Maybe the scaler on Android is just different than the one of your AVR/TV that kicks in when you’re using OSMC.

I was wondering about that, as well, but per what Sam mentioned, OSMC is actually handling the scaling of the framebuffer when it’s set to 2160p (which I verified is working correctly on my box; the television does indeed show it’s receiving a 3840 x 2160 input from the Vero in such a configuration), so the TV scaler never comes into play with either device when they’re set to a 4K resolution.

It looks like I may have been a bit spoiled by the Android builds of Kodi, since they did actually scale the image rendering in the controls up to the size that was specified for caching in the <fanartres> and <imageres> tags in advancedsettings.xml (or at least up to the resolution selected for the GUI; I never tried specifying anything higher than 2160 for obvious reasons). I’ve never used Kodi on any other system before, so I had assumed that behavior was simply how Kodi functioned across all platforms.

With all that said, the number one reason I wanted to move away from using Kodi on the Shield/Android is that it can’t perform automatic colorspace switching and can’t output a 4:2:0 10-bit signal at 23.976 Hz, forcing you to manually adjust the entire system colorspace and shift to 4:2:2 12-bit when playing back Rec.2020 10-bit media (and introducing a bug that causes banding in HDR media on some LG televisions in the process), whereas OSMC handles Rec.2020 playback and auto-switching with aplomb. A lower resolution GUI that’s a bit fuzzier in exchange for proper (and simpler) media playback is a trade-off I’m happy to make at this point in time, and perhaps OSMC will be able to match the Android builds’ higher resolution interface somewhere down the line and it can be the best of both worlds.

The problem is that Kodi’s UI texture scaling is just plain poor. There’s an entire thread on this topic:- GUI: improved image scaling algorithm

If I recall correctly Kodi scales the images twice, once when they are downloaded and stored in the cache, this is what <fanartres> and <imageres> control and then the cached image is scaled again when it is displayed at the correct control size.

A 4K GUI makes all the difference, I use both a Vero 4K+ with a 1080p GUI and a dedicated HTPC with a 4K GUI and trust me the artwork scaling looks perfect on the 4K GUI and very poor on the Vero with it’s 1080p GUI.

I’d love the Vero to have a true 4K GUI mode but even if it did I suspect the frame rate would be pretty unusable.