Questions about two unexpected ucas files that are generated when chunking is enabled

Hi Everyone,

After enabling chunking and setting up some chunks using primary asset labels, I noticed that there were two more pak files being generated, additional to what I was expecting.

I currently have the primary asset labels set up like this:

  1. Chunk 1003: Covers the entire content folder, with a priority of 1.
  2. Chunk 1001 A: Covers a single subfolder within the content folder with a priority of INT_MAX. This will contain all of the explicit assets we want to have in our first chunk.
  3. Chunk 1001 B: Covers a single folder within Engine/Plugins, that also adds some stuff from a plugin to the first chunk.

So I would expect for there to be two ucas files (exluding the global one):

  1. pakchunk1001-<PLATFORM>.ucas
  2. pakchunk1003-<PLATFORM>.ucas

However, When I build a package the following ucas files are generated:

  1. pakchunk0-<PLATFORM>.ucas
  2. pakchunk1001optional-<PLATFORM>.ucas
  3. pakchunk1001-<PLATFORM>.ucas
  4. pakchunk1003-<PLATFORM>.ucas

So there are two chunks that I wasn’t expecting to see:

  1. pakchunk0-<PLATFORM>.ucas: This one isn’t explicitly defined by a PAL, but after checking its content, it seems to contain mostly shader binaries and engine content. It does contain a few assets from the /Content folder though, so not sure why they are being included in this chunk rather than chunk 1003.
  2. pakchunk1001optional-<PLATFORM>.ucas: This one is full of “uptnl” files which appear to be an “optional bulk data file”.

So I would like to know:

  1. Is it possible to get all the files from pakchunk0-<PLATFORM>.ucas to go into pakchunk1003-<PLATFORM>.ucas? If yes, how?
  2. Is it possible to get all the files from pakchunk1001optional-<PLATFORM>.ucas to go into pakchunk1001-<PLATFORM>.ucas? If yes, how?

If it’s not possible to change this behaviour it shouldn’t be an issue as long as its consistent and doesn’t change across builds, but without having explicit control over these assets I’m a bit worried that builds will be non-deterministic, especially when the assets in the build change.

For your reference this is what the Asset Audit output looks like with chunks added:

[Image Removed]

Thanks

Hi,

Chunk0 is implicitly created and can’t really be avoided. It will inherit any data that is not covered by Primary Asset Labels and Engine content that don’t have explicit dependencies. Some of those assets are loaded during the engine startup so you need Chunk0 to be part of the initial installation. It will be easier for you to make Chunk0 part of the startup packages. You should either roll chunk 1001 into chunk 0 or just keep both.

Regarding the determinism of the chunk, the label that defines chunk 1003 should cover the project asset and Chunk0 will keep on containing the Engine related data so this should be stable in that sense.

The “optional” chunks will normally contain optional LODs and optional mips. The Optional mips are the most common source of the existence of optional chunks. They will appear as soon as the platform TextureLODGroups are using the ‘OptionalMaxLODSize’ property. Any mip that is higher than the specified size will be added of the optional chunks. That allow for a high definition texture “package” so that lower RAM devices have smaller install sizes and also save some RAM at run time. You can also set the optional chunks to not be part of the startup chunks so the player gets in the game faster even though some textures might be blurrier than expected.

Regards,

Martin