Language:
Page Info
Tags:
Skill Level:
Engine Version:

Derived Data Cache

Choose your OS:

The Derived Data Cache (DDC) stores versions of Assets in the formats used by the Unreal Engine on its target platforms, as opposed to the source formats artists create that are imported into the Editor and stored in .uasset files. Content stored in the DDC is disposable in that it can always be regenerated at any time using the data stored in the .uasset file. Storing these derived formats externally makes it possible to easily add or change the formats used by the engine without needing to modify the source asset file.

Using a Shared DDC

Studios should use a shared DDC that all users in a particular location can access. This way, only one person needs to build the derived Asset format(s) and they will be automatically available to all other users. There will occasionally be stalls when Assets need to be processed, but the results are stored and shared. Even on a fairly small team sharing Asset processing work in this way will eliminate most processing time.

It is not advised to copy an entire DDC across the Internet, back up your DDC, or restore a DDC from a backup. This will not do any harm, but it is a waste of time, as it takes longer to transfer the amount of data stored in the DDC than it would to simply generate it from scratch locally.

To set up a shared DDC, override the paths for the [InstalledDerivedDataBackendGraph] or [DerivedDataBackendGraph] (depending on whether you use the binary install from the Epic Games Launcher or compile from source) by declaring the following section in your game's DefaultEngine.ini file. This section is originally declared in the BaseEngine.ini where the paths are set to Epic's internal DDC share. Re-declare the section and change the paths to point to a share on your network (e.g. Path=\\mystudio.net\DDC):

Choose your installation method:

Epic Games Launcher

Compiling from Source

[InstalledDerivedDataBackendGraph]
MinimumDaysToKeepFile=7
Root=(Type=KeyLength, Length=120, Inner=AsyncPut)
AsyncPut=(Type=AsyncPut, Inner=Hierarchy)
Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared)
Boot=(Type=Boot, Filename=%GAMEDIR%DerivedDataCache/Boot.ddc, MaxCacheSize=256)
Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=17, FoldersToClean=-1, Path=../../../Engine/DerivedDataCache)
Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=\\mystudio.net\DDC, EnvPathOverride=UE-SharedDataCachePath)
AltShared=(Type=FileSystem, ReadOnly=true, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=\\mystudio.net\DDC2, EnvPathOverride=UE-SharedDataCachePath2)
Pak=(Type=ReadPak, Filename=%GAMEDIR%DerivedDataCache/DDC.ddp)
EnginePak=(Type=ReadPak, Filename=../../../Engine/DerivedDataCache/DDC.ddp)
[DerivedDataBackendGraph]
MinimumDaysToKeepFile=7
Root=(Type=KeyLength, Length=120, Inner=AsyncPut)
AsyncPut=(Type=AsyncPut, Inner=Hierarchy)
Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=EnginePak, Inner=Local, Inner=Shared)
Boot=(Type=Boot, Filename=%GAMEDIR%DerivedDataCache/Boot.ddc, MaxCacheSize=256)
Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=17, FoldersToClean=-1, Path=../../../Engine/DerivedDataCache)
Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=\\mystudio.net\DDC, EnvPathOverride=UE-SharedDataCachePath)
AltShared=(Type=FileSystem, ReadOnly=true, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=19, FoldersToClean=-1, Path=\\mystudio.net\DDC2, EnvPathOverride=UE-SharedDataCachePath2)
Pak=(Type=ReadPak, Filename=%GAMEDIR%DerivedDataCache/DDC.ddp)
EnginePak=(Type=ReadPak, Filename=../../../Engine/DerivedDataCache/DDC.ddp)

Satellite studios working out of a single shared code base can set the UE-SharedDataCachePath environment variable to a path that all users at each location can read and write to. This allows each location to have its own shared DDC.

For example:

UE-SharedDataCachePath=\\mystudio.net\DDC

Using a Local DDC

Lone developers or developers working remotely generally just use a local DDC. To tell the engine not to use a shared DDC, use one of the methods below:

  • Pass -ddc=noshared on the command line.

  • Set the environment variable to a local drive hard drive:

    UE-SharedDataCachePath=c:\DDC

Building Derived Data

The user who imports the Asset is the one who builds the derived data since they will most likely be using and testing that Asset in the Engine. However, there may be occasions when a new Asset needs to be processed. This happens automatically on an as-needed basis and should not result in much of an impact when running on fast hardware, though there may be occasional stalls.

You can fill your DDCs at any time by running the following command:

UE4\Engine\Binaries\Win64\UE4Editor.exe ProjectName -run=DerivedDataCache -fill

Epic Games does this on a nightly basis to ensure that the DDC is always primed, but it is not necessary as the general automatic caching feature should suffice.

The user who imports the Asset is the one who builds the derived data since they will most likely be using and testing that Asset in the Engine. However, there may be occasions when a new Asset needs to be processed. This happens automatically on an as-needed basis and should not result in much of an impact when running fast hardware, though there may be occasional stalls.

You can fill your DDCs at any time by running the following command:

open -a "ProjectName.app" --args -run=DerivedDataCache -fill

Epic Games does this on a nightly basis to ensure that the DDC is always primed, but it is not necessary as the general automatic caching feature should suffice.

Distributing with a DDC

Cooking is the preferred method for packaging games since cooked builds do not need (or use) a DDC. However, DDCs can be packaged for distribution if the need arises.

To package a DDC:

  1. Run UE4Editor.exe from the UE4/Engine/Binaries/Win64 directory, passing the arguments shown below:

    UE4Editor.exe ProjectName -run=DerivedDataCache -fill -DDC=CreatePak
  2. This creates a DDC.ddp file in the UE4\ProjectName\DerivedDataCache directory.

  3. The engine automatically detects and uses the .ddp file.

Cooking is the preferred method for packaging games since cooked builds do not need (or use) a DDC. However, DDCs can be packaged for distribution if the need arises.

To package a DDC:

  1. Run UE4Editor.app from the cd /PathToUE4/Engine/Binaries/Mac directory, passing the arguments shown below:

    open -a UE4Editor.app --args -run=DerivedDataCache -fill -DDC=CreatePak

  2. This creates a DDC.ddp file in the UE4\ProjectName\DerivedDataCache directory.

  3. The engine automatically detects and uses the .ddp file.