Package Fail: CompressedFormat == PF_Unknown || CompressedFormat == CompressedMip[0].PixelFormat

I’m hitting this bug too. It looks like the CompressedFormat variable is modified within a ParallelFor loop without any kind of synchronization, but that may not be the full issue.

Fixed that with several settings, not sure about which one of them did the trick
Use DXT5 Normal Maps=True // Because error includes differences with RGBA & RGB
Mobile Reflection Capture Compression = True // Because error connected with packaging to ASTC to Android
Package Compression Format = Zlib // Because this error is spinning around compression of textures & lightmaps

1 Like

I fixed this issue now,the problem is ECT2 format detect the alpha channel.On VT,it maybe some tile all piexl alpha channel value less than 1,but some tile all piexl alpha channel value equal to 1.So it lead to different format for the tile,you should change the FTextureBuildSettings.bForceAlphaChannel value to ture in the code can fix this .(I don’t see any Blueprint type value can change this value

1 Like

Great find @_sama_24 but what about ASTC textures ?

Also, could you please provide info in what file and what line of code this fix needs to be allied ?

I think ASTC also can be fixed by this way.
You can serach "bForceAlphaChannel " in TextureCompressorModule.cpp and you need to change the this value to true when cooking VT.
Also you can change the bForceNoAlphaChannel to ture,but it will loss the alpha channel.

1 Like

As a follow-up to this issue. There was recently a fix for this issue pushed to UE5 branch. If you have UE4 github access you can see it here, basically what @_sama_24 mentioned:
https://github.com/EpicGames/UnrealEngine/commit/65ac772e9ffe514c6e2cad63425e7c5fcce1c58e

I needed this for 4.27 and so made a backport of the fix which you can find here:
https://github.com/error454/UnrealEngine/commit/2ee2ce75da917228512a520ace26e9655d7efc09

I use virtual textures for lightmaps on quest 2 (vulkan - ASTC) and everything is working perfectly with this patch.

6 Likes

I have the same problem did you find a solution all this time? I’m with ue5.0.3 Thanks!

The patch is down :frowning:

It’s still up. Are you sure you have access to UnrealEngine github?

Hello everyone,

I hadn’t much time to work on this since my last post.
Anyway I managed to package virtual textures for mobile (Android with Vulkan) with UE5.1
It seems to work fine now.