Mobile HDR having a performance impact on devices that don't support it?

We’re developing an Android/IOS game and were hoping to make use of Mobile HDR for the high end phones. But in all of our tests, if we enable mobile HDR for the project, the performance on older phones (we have a Galaxy Nexus we use as a base line for Android) completely goes to hell (without mobile HDR we’re able to achieve a reasonably stable 50-60hz with a lot of the game’s extra detail turned off, but when we enable it’s basically unplayable; probably in the region of 3-8hz). And on that phone having Mobile HDR enabled doesn’t actually do anything- we get the performance hit but without any of the visual benefits.

I figured that enabling mobile HDR in the project settings, then turning it off for the low end phones in the device profiles would work fine, but it doesn’t. To make sure it’s using the correct device profiles I’ve even tried overriding all of the settings I could think of (r.MobileHDR=0; r.UseMobileBloom=0 etc) on ALL Android related profiles, but it doesn’t help. If Mobile HDR is enabled in the project settings, nothing I do will disable it on that low end phone.

So, am I missing something? Is there a way to setup the project so that Mobile HDR is enabled on particular devices, but disabled on others / disabled on phones that don’t support it? Or if it is enabled, do we just have to accept that the low end phones can’t run the game/engine?

Cheers.

Wow, thanks for the lengthy reply :slight_smile:

Firstly, our game is not a graphically complex game - we’re building a very minimal action arcade game. We don’t have any lighting what-so-ever and the vast majority of our materials are simply emissive color only, opaque and fully rough. The most complex material in the game (applied to a single object) is a panner applied to a texture in the emissive channel, is translucent and uses a small amount of simple logic for World Position Offset. We use a fair amount of translucency for particle effects, but again, everything is fully rough. We don’t use specularity or anything like that anywhere.

First If you have a Galaxy device, we do not support full HDRwSun. We Expect full HDR without the sun but can’t guarantee it will work. This depending on the intensity of your scene etc. Using Full HDR on older device and those devices taking a performance hit is expected.

We’re not planning on using the sun stuff at all. In fact all we’re trying to get out of the HDR on the high end devices is the bloom effect (to give some of our objects a slight glow by pushing them over 1.0/1.0/1.0 in the emissive channel). The test I did last week (to see if the HDR situation had changed since last time we tried it a few months ago) confirmed that we’re still seeing the massive performance hit on the Galaxy Nexus, even though we don’t have a single material in the game with values above 1.0 in the emissive channel.

I’d be OK with taking a performance hit on the older phones, if the performance hit was, say, 5-10% of the framerate (even if the HDR cost didn’t result in a better looking game on those older device), but that’s not what we’re seeing.

Now, what you can do is to optimize to help bump the rang of HZ. This is a method, where in your material, a node is added that calculates what device you are packaging to. From there it calculates what the best method for deploying is. For instance if you add a vector1 and plugged that into the inputs of this node, you could then plug that into the deferred render for the respective value you wanted. So if you added this to roughness, since roughness is expensive on mobile platforms, in the packaging this node would calculate the best computation for that device and package accordingly.

It doesn’t sound like any of that would help us, as the performance hit is global and the materials are already about as cheap as can be.

What you could try is lower the engines scalability settings for older devices. I am not sure if you can even have HDR enabled without your settings set to EPIC.

So I’m guessing you’re talking about setting ‘r.DetailMode 0’ here? As I mentioned in my original post, I did already try toggling a bunch of different stuff in the device profiles without any luck, although I’ve never tried r.DetailMode before. Did a variety of tests just now and this was the results:

  • Initially ran with MobileHDR = false. Game runs perfectly fine.
  • Toggled MobileHDR = true in the project settings. Cleared intermediate, saved/cooked and saved/staged builds folders (I did this every time moving forwards). Game’s now running around 7hz.
  • Went into the device profiles and set r.DetailMode 0 in all Android related profiles (just to be safe). This doesn’t have any effect on the game it seems (there’s a very obvious particle system running that uses ‘low detail’ for one of its emitters and that emitter was visible at game launch). Toggled r.DetailMode 0 in the mobile console, particle emitter vanishes, framerate still terrible from mobileHDR.
  • I then tried toggling various things in the console (r.MobileHDR 0; r.MobileHDR false; r.MobileBloom 0 etc). None of these have any effect on the performance hit from Mobile HDR.
  • Removed the Mobile HDR setting from the project - Game’s running at 50hz+ again.

Settings up device profiles with mobile HDR off for all low/medium end devices (and on for high end devices) would be the ideal route (but this doesn’t appear to work at all). My college also notes that the Galaxy Nexus appears to be considered a ‘high’ end Android device for some reason even though it can only run the game in its most cutback form (so even if we find a way to toggle the Mobile HDR settings on the lower end devices, there’s still an issue here).

Hello Triblade,

So, there is a few things you will be able to do to help improve this.

1.) Go to your Project Settings > Default Postprocessing Settings. Disable everything but Bloom. If this is all that you are using the HDR for only the Bloom then that is all that needs to be enabled. This should help with increasing the hz.

2.) Go to your DefaultDeviceProfiles.ini and have a look at this documentation. Effectively this should scale your screen resolution to that of the mobile device.

Let me know if this helps,

Go to your Project Settings > Default Postprocessing Settings. Disable everything but Bloom. If this is all that you are using the HDR for only the Bloom then that is all that needs to be enabled. This should help with increasing the hz.

Everything (including Bloom) is disabled in that section (and was when I was testing the Mobile HDR setting earlier).

Go to your DefaultDeviceProfiles.ini and have a look at this documentation. Effectively this should scale your screen resolution to that of the mobile device.

We’re aware of the r.MobileContentScaleFactor setting - in the past we’ve run with native resolution across all devices (when we realised we weren’t going to get the HDR to run well on low end devices). At the moment we’re running with everything defaulted as we’ve added a fair amount of transparency to the game recently.

As I mentioned above, the Galaxy Nexus appears to think it’s a ‘High’ Android device (when it’s clearly not), so I believe it’s running at native resolution right now. But I have done tests with scaling it right down before (even going as low as MobileContentScaleFactor = 0.2) to the point where the game is unreadable, but the framerate is still unacceptable.

Hey Triblade,

I have, honestly run out of ideas for how to optimize for lower end devices. The only thing I can think of is to disable the HDR by toggling it off when packaging for lower devices. I can ask around a tad but to be honest I will have to ask someone that is on our development team. They may come back and say this is intended behavior, which is about what it sounds like but I was hoping through other troubleshoots that this would resolve itself.

We would like to set up a test here. It will be easier to use your project so that we are using your unique assets and settings. For that we need to know your specific device. Galaxy what? Nexus what? What version? We also need a copy of your project in order to launch that to the device.

Thanks,

The only thing I can think of is to disable the HDR by toggling it off when packaging for lower devices.

I’m not sure how useful that’s going to be if some of the devices that will suffer severe performance drops think they’re powerful enough to use the HDR, but is that possible? Packaging the build specifically for particular devices/device profiles? Is there some documentation about it somewhere? It would be good to know what options are available here.

They may come back and say this is intended behaviour, which is about what it sounds like but I was hoping through other troubleshoots that this would resolve itself.

To be honest, I’m half expecting the official answer on this thread to be: “If you have Mobile HDR on, older devices will perform extremely badly and there’s nothing you can do about it” - that’s the conclusion we came to a few months ago but, as our game looks a lot better with the bloom on, so I figured I’d check and make sure that it isn’t just a bug or something that we’re doing incorrectly on our end first.

Galaxy what? Nexus what? What version?

From the ‘About phone’ section of the phone’s settings (pasting it all here as I don’t what’s useful to you and what’s not):

Model Number: Galaxy Nexus

Android Version: 4.3

Baseband Version: I920XXLJ1

Kernel Version: 3.0.72-gfb3c9ac

Build number: JWR66Y

We also need a copy of your project in order to launch that to the device.

Sure! Where can I send / how should I give you a copy?

I take it I can use the “Zip up project” option in the build tools and that’ll have everything you need?

Hello Triblade,

Yeah, that is the conclusion that we have come to as well. Unfortunately mobile is still in it’s infancy stages when it comes to development and what devices are capable of handling what. I am sorry that this was the older devices could not handle what you are trying to do wit your game.

Good luck with the rest of your game development, it sounds like you have some pretty cool stuff going on.

Anyone has some news about this issue or its the same since 2015?

1 Like