[ANDROID] COMPRESSED HDR LIGHTMAPS ARE NOT ENCODED

Unity2019.2
In PC platform editor ,hdr lightmap values look fine,white.


But In android platform editor ,hdr lightmap values like clamp 0~1 (uncorrect )after compress in ASTC HDR format

Please make sure that Lightmap Encoding is set to High Quality for Android platform in the Player settings. Keep the texture compression settings at their defaults. Also, make sure that you are in Linear color space. Rebake the lighting and see if the issue reproduces.

You can also try switching to RGB9e5 compression and see if that helps in your case.

We are also experiencing this issue of clipped hdr lightmaps with ASTC on Unity 2019.1

Switching to RGB9e5 helps, but seems to require way more memory, so an ASTC compression would be way better.
And yes project is set to high quality lightmaps and linear.

Compressing a HDR texture with a method that supports HDR should obviously not clamp to [0,1] so this sounds like a bug to me.

It would be helpful if you can create a minimal project that shows this issue and then with the project opened click Help > Report A Bug to create a bug report containing the minimal project. This would enable us to take a closer look. Thanks!

My lightmaps are also clamp in ASTC HDR with encoding set to High. I am using unity 2019.3.11f1

And ASTC HDR cubemaps compress with convolution type to Specular reflections are all washed out

Still had no time to time to make a test project, but for us this is also still true.
ASTC HDR is clamped.

@Cerberus_team already reported a bug for this, so no need to report another one.

@florianpenzkofer could you link the bug report (if any) please? I’m interested in this too. What’s the ETA for the fix? Thanks

Should be fixed in 2019.4.6f1, from the release notes:

  • Graphics: Fixed an incorrect clamping of ASTC HDR lightmaps. (1256699)

Hi!

I’ve been dealing with a problem during the last few days. I’m making an AR Foundation image tracking app running on Android. I’m baking lights into prefabs using a script that I found on the web. Till here everything works fine. The problem appears when I run the app on my android mobile, textures make a weird effect. If I load game objects that define the prefab directly on the hierarchy tab without actually making a prefab and try to run this on my phone textures load well (and in the play mode of unity look well too), but if I make a prefab, bake textures using script into prefabs and then try to load that prefab using the Ar Tracked Image Manager, the weird effect appears. Is kind of hard to illustrate this with words so I’m uploading 2 dif. images. One is the play mode result before building for Android and the other is what I get on my phone.

Anyone have any clue what might be going on here?


Hey there, a few questions for you:

  • Which script are you using to bake lighting into the prefabs, could you post a link?
  • What are the values of the ā€œLightmap Encodingā€ and ā€œTexture Compressionā€ project settings? Does the issue happen regardless of those settings?

I’d suggest opening a bug report, since this looks like a bug to me.

Hi!
I’ve started a new project from scratch and now is working fine. I guess that there was a problem with some packages when I updated the AR Foundation version in my previous project. Anyway, the script that i’m using is the one on this link, working fine for my Unity project version [2020.3.1f1-ARF 4.0.12]
https://github.com/Ayfel/PrefabLightmapping
Thanks for your reply!

1 Like

Compressor Quality Fast, ASTC HDR 4x4 results in clamped values.

Single 2k by 2k HDR lightmap
Active platform is Android.
ASTC HDR 4x4

Normal Compressor quality takes approx. 55 seconds to a minute to import a single lightmap.
Fast compressor quality takes approx. 2-3 seconds…

I do regular Android builds, I prefer to keep my active platform as Android so I don’t have to keep swapping platforms. But this is slowing down game immensely. Just loading into the scene takes a long time in 2020.3, the profiler shows it is processing textures/loading them. We have 11 lightmaps and entering the scene takes 15~ seconds in Play mode because of texture related scene load operations in the profiler.

I’d swap to Fast, but Fast clamps the HDR values…:

FAST:
7251944--874079--upload_2021-6-19_13-28-25.png

NORMAL:
7251944--874082--upload_2021-6-19_13-30-21.png

NOTE: I only reimported ONE of my lightmaps, that’s why the mesh in the background is still clamped.

So yes, this is extremely frustrating. Is this a bug?

1 Like

If the values are really clamped then itā€˜s a bug. Do you know if this happens in 2021.x?
Some ASTC compressor improvements are being backported to 2020.3.14.

Could the outcome you see in my images be caused by something else? They look completely different, right? The FAST quality doesn’t just look like it has compression artifact because of FAST compression. The colours are entirely different through the entire scene. I figured this means the values are being cutoff or limited in some way?

I’m not sure if it happens in 2021. Ill try an empty protect with just this one light map texture and try to reproduce it.

Also, as 2020 is an LTS release, am I right to say that it doesnt matter if this bug occurs in 2021 or not? It should be fixed in 2020. It is not an Enhancement. It is potentially just a bug right? I am submitting my bug report under 2020 LTS and after submission will download and check in 2021 to see if it is present.

I asked about 2021 because the ASTC compression changes that were made 2021 are being backported. So if this doesnā€˜t happen in 2021 then there is a chance that the issue will be fixed by that backport.

Thanks for submitting the bug report.

1 Like

Can confirm it happens in 2021 too. (2021.1.12f1)

Bug report submitted Case 1344592

1 Like