Где хранится кэш unreal engine 4
Where the DDC Is Stored
Depending on how your project and system are configured, there can be several DDC caches in a hierarchy that ranges from fast to slow. When assessing derived data, your system will do the following to determine how quickly it can access it:
When a piece of derived data is needed, the fastest cache is checked first, then the next fastest, and so on, until the data is found.
When the data is found, it is copied into the fastest local cache so that it is quicker to access next time.
If the data is not found, then it is first generated, then asynchronously copied into the caches so it is available for you (and potentially your team) in the future.
Content stored in the DDC is disposable, and can 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.
DDC Pak
If you download Unreal Engine from the Epic Games Store, the engine will come with a DDC Pak (.ddp). The DDC Pak contains derived data for all engine content, so you can start working without compiling shaders and so on. Similarly, some samples are shipped with a DDC Pak for the same reason.
For Example: EngineDir/DerivedDataCache/Compressed.ddp
Project DDC Pak
For Example: ProjectDir/DerivedDataCache/Compressed.ddp
Последовательность для анимации
- Экспорт анимации в файл FBX.
- Выберите элементы, которые Вы хотите экспортировать (кости меша с единственной корневой костью, сам мешь – по желанию) и нажмите на ‘export selected’.
- Настройки экспорта:
- Экспорт Animation
Последовательность для Static Mesh
- Экспортируйте меш в FBX-формат из 3D-приложения.
- Основные настройки экспорта, используемые в Epic:
- Экспорт Smoothing Groups (группы сглаживания)
- Не экспортировать Tangents and Binormals (Касательные и бинормали)
- Экспорт Preserve Edge Orientation (Сохранение ориентации ребер)
Scene Management
Художники в Epic, обычно, хранят подобные (подобные как треугольники в школе) ассеты в одном файле. Например, Static Mesh, который имеет три различных состояния: нормальное, поврежденное и сломанное; все три находятся в одном файле 3д пакета. Тем не менее, каждый мешь экспортируется в виде отдельного FBX – файла.
Лучше экспортировать только мешь со своим скелетом (без рига). Скелет с Rigging’ом сохранить в отдельный файл.
Отдельный файл rig’а.
Каждая анимация обычно хранится в отдельном файле, поэтому довольно просто следить за всеми различными анимациями в файловой системе.
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 times 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:
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.
Q: Can I change the Shared DDC path?
Yes! You can change it by setting the UE-SharedDataCachePath mentioned above.
However, you should never set UE-SharedDataCachePath to a local path! Doing this means you would have both Local and Shared caches on your machine—twice the disk space for zero gain!
Последовательность для Skeletal Meshes
- Экспорт скелетного меша в файл FBX.
- Выберите элементы, которые Вы хотите экспортировать (мешь и его кости с одной корневой костью) и нажмите на ‘export selected’.
- Основные настройки экспорта, используемые в Epic:
- Smooth Mesh отключен
- Экспорт Smoothing Groups
Shared DDC
One of our strongest recommendations for teams in the same location is that they set up a shared DDC. This is a network drive that all team members and build machines can read/write to. This then writes off the cost of creating any required DDC data across the entire team. For example, when an artist edits a shader, the DDC data will be written straight to the DDC share.
Shared DDC: Will be either a network or mapped drive.
Mounting Your DDC Folder
For the DDC to be used over your internal network, the folder that contains the DDC must be mounted to a network drive. If you are unfamiliar with how to do this, see Map A Network Drive on Windows.
Последовательность для Morph Target
- Экспорт morph targets в файл FBX.
- Выберите элементы, которые Вы хотите экспортировать (мешь с модификатором blendshapes/morpher) и нажмите на ‘export selected’.
- Настройки экспорта:
- Экспорт Animation
- Экспорт всех параметров Deformed Models/Deformations
Именование контента
Художники в Epic, как правило, используют следующие схемы именования экспортируемых файлов:
Используя такую схему именования ассетов в проекте позволяет организовать и идентифицировать файлы ассетов.
Тем не менее, понятие «пакет», которое долгое время было в Unreal резко изменилась в Unreal 4 в сравнении с предыдущими UE1,2 и 3. Файлы пакетов теперь содержат только один файл, а структура каталогов игры определяет различные уровни, как было в старом файле .upk. Посмотрите Assets and Packages для получения дополнительной информации.На этом изображении StoneBox находится в папке под названием Meshes, аналогично в UE3 (или UE1, UE2) будет пакет (Game) с именем группы (Meshes), который содержит ассет (StoneBox).
Setting Up Shared DDC
As you may see in BaseEngine.ini, the editor is already set up to use a Shared DDC that can be enabled one of three ways.
Here are the options from most to least recommended.
Add an override (as pictured below) in the DefaultEngine.ini for your project that sets the path to a valid location for your team.
[DerivedDataBackendGraph] Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=10, MaxFileChecksPerSec=1, ConsiderSlowAt=70, PromptIfMissing=false, Path=\YourCompanyServer\DDC, EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache)
Set an environment variable (as pictured below) of UE-SharedDataCachePath (On Mac/Linux UE_SharedDataCachePath ) to the folder to use.
In the editor, set the SharedDerivedDataCache variable.
Click image for full size.
You don't have to do anything special to \YourCompanyServer\DDC; as long as it is writable, the engine will create the structure it needs.
Types of DDCs
Typically, you will have at least the following two caches:
Boot DDC: Startup files that are loaded into memory to increase boot times.
For Example: ProjectDir/DerivedDataCache/Boot.ddc
Local DDC: Derived data for your projects.
For Example: EngineDir/DerivedDataCache
However, your project may also be set up to use a DDC Pak or Shared DDC.
Q: I am short on disk space. Can I move the Local DDC elsewhere?
Yes! You can adjust this in your project under the Editor Preferences. Aditionaly you can set an environment variable of UE-LocalDataCachePath to a path of your choice. For example: UE-LocalDataCachePath=d:\DDC.
At the command prompt, type "setx UE-LocalDataCachePath d:\DDC".
Restart Unreal Engine, along with any application you launch it from, such as Epic Launcher, UGS, or Visual Studio.
This can be used when you are short of space on your primary drive, or when you are working on multiple branches and wish to ensure the data isn't duplicatednote
Что такое Media Framework
Media Framework в значительной степени набор интерфейсов C ++, несколько вспомогательных классов для общих случаев использования и медиа-плеерный генератор, который может быть расширен с помощью так называемых Media Player плагинов. Вся интересная работа воспроизводимых фильмов и других мультимедийных файлов происходит в плагинах.
Код Media Framework’а находится тут: /Engine/Source/Runtime/Media/
Существующие плагины плеера расположены здесь: /Engine/Plugins/Media/
На данный момент плагин плеера для Windows использует API Windows Media Foundation. Существует также плагин для MacOS, который использует Apple’s AV Foundation, однако в настоящее время весьма ограничены, но должно работать и на IOS. Также начата работа по созданию плагина плеера для Android.
Несмотря на то, что плагин для windows наиболее завершённый он всё ещё имеет некоторые проблемы с некоторыми форматами, а именно с H.264 и .mp4.
Импорт / Экспорт всей сцены
Это полезно при экспорта камер, которые были созданы в Matinee, анимационных треков Matinee, а также всей необходимой информации, чтобы воссоздать кат-сцену в 3D редакторе. После редактирования в 3д пакете каких-то параметров, а так же если добавлена новая геометрия на сцену, все это можно экспортировать в FBX и импортировать обратно в Unreal Engine 4.
Экспорт из Matinee.
Сейчас FBX – единственный поддерживаемый формат при Export All – просто задайте имя и нажмите кнопку ОК. Просто как юппи: «Просто добавь воды!»
Находясь в интерфейсе Matinee, Вы можете импортировать данные из FBX файла (после того, как отредактируете сцену в 3д пакете).
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.
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:
Run UE4Editor.exe from the UE4/Engine/Binaries/Win64 directory, passing the arguments shown below:
UE4Editor.exe ProjectName -run=DerivedDataCache -fill -DDC=CreatePak
This creates a DDC.ddp file in the UE4\ProjectName\DerivedDataCache directory.
The engine automatically detects and uses the .ddp file.
Where are DDC settings kept?
DDC settings are kept in DefaultEngine.ini under the [DerivedDataBackendGraph] section. You can view the defaults in BaseEngine.ini.
Виды медиа ассетов и импорт медиа
С введением Media Framework’а были добавлены 3 новых типа ассетов, которые можно создать в контент браузере.
Ассеты медиа плеера
Ассет медиа плеера представляет собой проигрыватель для источника медиа, такого как файл фильма на диске или медиа URL потоковой передачи в Интернете. В отличие от UTextureMovie в Unreal Engine 3, ассет медиа плеера фактически не содержит каких-либо данных, он хранит только путь или URL в источнике медиа.
Ниже, представлены несколько способов создания ассета медиа плеера.
Создание ассета медиа плеера
Вместо нажатия кнопки Add New вы можете просто кликнуть правой кнопкой мышки в пустом месте контент браузера для вызова контекстного меню.
Импортирование перетаскиванием
Простейший способ импортирования медиа — это метод перетаскивания.
Находясь внутри своего проекта в папке Content/Movies/, просто перетащите ваш медиа файл в контент браузер.
Это автоматически создаст ассет медиа плеера и определит его месторасположение.
Подробности ассета медиа плеера
Ассет медиа плеера может выводитть различные потоки контента, будь-то аудио или видео, или даже текст титров. Вы можете это выбрать в выпадающем меню расположеном вдоль верхней части окна медиа, ниже кнопок воспроизведения.
На панели Details вы можете просмотреть настройки медиа источника.
Под настройками Playback, вы можете включить опцию зацикливания, для повторного воспроизведения медиа когда оно достигнет конца, просто поставьте галочку в опции Looping.
В разделе Source вы можете указать путь к медиа файлу расположенному внутри проекта, либо же указать ссылку на файл, при условии что у вас стоит режим Streaming.
Ассет медиа текстуры
После создания ассета медиа плеера, вы можете создатьиз него ассет MediaTexture для вывода видеопотока. Медиа текстура даёт вам возможность захвата видеопотока (если он доступен) для последующего его использования как обычную текстуру в движке.
Для создания медиа текстуры из медиа плеера, кликните по ассету медиа плеера, после чего выберите Create Media Texture.
После этого будет создан новый ассет медиа текстуры.
Кликнув правой кнопкой мышки по ассету медиа текстуры вы можете создать материал для последующего использования его как обычного материала внутри движка.
Если видео не воспроизводится на текстуре, но проигрывается внутри редактора медиа ассета, наиболее вероятно, что выбран неправильный видеотрек. Вы можете сменить его путём дабл клика по медиа текстуре для открытия редактора текстуры и выбора трека на панели Details под MediaPlayer.
Если это не помогло, то внутри ассета медиа плеера, выберите Auto Play дабы увидеть, стримится ли видео внутри текстуры. Если это устраняет проблему, то вы можете либо продолжать использовать Auto Play, либо посредством блупринта создать скрипт который будет воспроизводить ассет, подробнее об этом смотри ниже в разделе Media Framework с блупринтами.
Q: Can I change the Shared DDC path?
Yes! You can change it by setting the UE-SharedDataCachePath mentioned above.
However, you should never set UE-SharedDataCachePath to a local path! Doing this means you would have both Local and Shared caches on your machine—twice the disk space for zero gain!
Using a Shared DDC
A 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, or back up your DDC, or restore a DDC from a backup. While not necessarily harmful, this would be a waste of time—it takes longer to transfer the amount of data stored in the DDC than it does to generate it from scratch locally. If you have a large project and want to distribute pre-built DDC data, you should generate a DDC Pak.
Media Framework с текстурами и материалами
Данный раздел покажет как быстро начать используя Media Framework с Textures и Materials.
Текстуры
Ниже, представлен пример медиа текстуры воспроизводимой на телевизоре.
Для примера был мигрирован ассет SM_TV из проекта Realistic Rendering который вы можете найти во вкладке (лаунчера) Learn.
- Создание ассетов медиа плеера и медиа текстуры с желаемым видео используя шаги описанные на этой странице.
- Откройте ассет медиа плеера и установите его в положение Auto Play.
- Откройте ‘M_TV’ материал расположенный в папке Game/ArchVis/Materials.
- Перетащите вашу медиа текстуру в ‘M_TV’ материал и поместите её рядом с нодой ScreenColor.
Shared DDC
One of our strongest recommendations for teams in the same location is that they set up a shared DDC. This is a network drive that all team members and build machines can read/write to. This then writes off the cost of creating any required DDC data across the entire team. For example, when an artist edits a shader, the DDC data will be written straight to the DDC share.
Shared DDC: Will be either a network or mapped drive.
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.
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:
Run UE4Editor.exe from the UE4/Engine/Binaries/Win64 directory, passing the arguments shown below:
UE4Editor.exe ProjectName -run=DerivedDataCache -fill -DDC=CreatePak
This creates a DDC.ddp file in the UE4\ProjectName\DerivedDataCache directory.
The engine automatically detects and uses the .ddp file.
Q: Can I have multiple DDC settings?
Yes! Just create a new [YourDDCSettings] entry in DefaultEngine.ini and then run the editor with -ddc=YourDDCSettings.
At Epic, we do this for three reasons:
For teams in offices that want to use their own DDC instead of the global one.
When creating DDC Paks we use one of several options that control what goes into the .pak file, such as [CreateInstalledEnginePak].
For people working from home who don't want to use a Shared DDC due to slower internet or not having VPN enabled.
Материалы
Для материалов, всё что вам надо, так это создать материал из вашей медиа текстуры, после чего применить материал на объекте.
Выше, материал был применён на стандартный кубик внутри сцены. Ассет медиа плеера был также установлен в режим Auto Play.
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 times 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:
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.
Where are DDC settings kept?
DDC settings are kept in DefaultEngine.ini under the [DerivedDataBackendGraph] section. You can view the defaults in BaseEngine.ini.
Mounting Your DDC Folder
For the DDC to be used over your internal network, the folder that contains the DDC must be mounted to a network drive. If you are unfamiliar with how to do this, see Map A Network Drive on Windows.
Q: How can I diagnose DDC issues?
If you think your editor is not correctly reading DDC data, then search your logfile for LogDerivedDataCache.
Here you can see:
There's no project or Engine Pak cache, which is what would be expected as I compiled this build myself from Perforce.
My local data cache path is mapped to d:\DDC and is writable.
I am using the Epic shared cache, which is writable.
You can also run with -logcmds="LogDerivedDataCache Verbose" to turn on verbose logging.
Q: What is the S3 DDC?
The Fortnite DDC is extremely large due to the amount of content we have. When Covid19 struck, we quickly realized that it was very inefficient for developers to pull all this data from a network share over the limited bandwidth of a VPN to the office, so instead we distribute the most commonly used data via S3.
Setting up the engine to use the S3DDC is extremely easy, but you will need to set up automation that generates the DDC content and uploads it to S3.
Q: I have a slow network connection. Can I turn off the Shared DDC?
Yes! There are two options, depending on whether you want this to be temporary or permanent:
If you set the environment variable for a DDC to None it will disable it. In this case, you would set UE-SharedDataCachePath=None.
Launch the editor with -ddc=noshared.
Q: I have a slow network connection. Can I turn off the Shared DDC?
Yes! There are two options, depending on whether you want this to be temporary or permanent:
If you set the environment variable for a DDC to None it will disable it. In this case, you would set UE-SharedDataCachePath=None.
Launch the editor with -ddc=noshared.
DDC Settings
Q: What is IDDCUtilsModuleInterface?
This interface allows you to use ? Name arguments in your DDC settings that can then be resolved dynamically at runtime based on platform or domain.
Unfortunately, we don't ship an example of this, but implementing it is straightforward:
MediaSoundWaves
MediaSoundWaves - это аудио компонент который может быть размещён на уровне, так же как и любой другой звуковой эктор.Т.к. он ссылается на ассета медиа плеера, то вы должны указать, что именно воспроизводить (если он не установлен в положение Auto Play).
Вы можете создать MediaSoundWave путём ПКМ по ассету медиа плеера и выбора Create Media Sound Wave.
DDC Settings
Q: Can I have multiple DDC settings?
Yes! Just create a new [YourDDCSettings] entry in DefaultEngine.ini and then run the editor with -ddc=YourDDCSettings.
At Epic, we do this for three reasons:
For teams in offices that want to use their own DDC instead of the global one.
When creating DDC Paks we use one of several options that control what goes into the .pak file, such as [CreateInstalledEnginePak].
For people working from home who don't want to use a Shared DDC due to slower internet or not having VPN enabled.
Q: What is IDDCUtilsModuleInterface?
This interface allows you to use ? Name arguments in your DDC settings that can then be resolved dynamically at runtime based on platform or domain.
Unfortunately, we don't ship an example of this, but implementing it is straightforward:
Q: How do I create a DDC Pak?
Creating a project-specific DDC:
UE4Editor.exe ProjectName -run=DerivedDataCache -fill -DDC=CreatePak
This commandlet will create a DDC for all content in the project. Alternatively, you can simply supply -DDC=CreatePak while running automation or even a user session to generate a more targeted set of content.
Александр Кузнецов запись закреплена
Подскажите как изменить директорию локального кэша? (Derived Data Cache) Вопрос в том как правильно отредактировать путь в BaseEngine.ini [InstalledDerivedDataBackendGraph] ?
Виктор Верс
Виктор, Создаю папку в которую хочу перенести DDC, копирую ее адрес. Прогоняю файл BaseEngine.ini на deriveddatacache, меняю директории на нужную мне. Сохраняю файл. После запуска проекта он все равно прогружает кэш на мой локальный диск (с) системой, сьедает все свободное место и крошит загрузку. Не могу сообразить что делаю не так?
Виктор, Замена адреса должна быть не только в графе [InstalledDerivedDataBackendGraph] ? В "Filename" и в "Path" ?
Виктор Верс ответил Александру
Виктор Верс ответил Александру
Alexander, Path="%GAMEDIR%LocalDerivedDataCache" такое прописывал вместо "%ENGINEVERSIONAGNOSTICUSERDIR%DerivedDataCache"?
DELETED запись закреплена
Могу ли я безболезненно для работы движка очистить содержимое папки Engine/DerivedDataCache? которая весит уже более 20Гб. Судя по всему это кэш от открытых мной проектов, многие из которых я удалил
конечно. просто при последующем открытии он потребует дольше времени что бы выстроить пути и зависимости.
Александр Горохов
спасибо за ответы. К сожалению жесткий диск маленький, на 500гб, поэтому поможет только удаление.
А вот инструкция по изменению путей папки DerivedDataCache, взятая с uengine.ru, может кому пригодиться
1)Открываем BaseEngine.ini который находится в папке Config движка.
2)Там ищем [InstalledDerivedDataBackendGraph]
чуть ниже будут строчки
Boot=(Type=Boot, Filename=”%GAMEDIR%DerivedDataCache/Boot.ddc”, MaxCacheSize=512)
Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path=”%GAMEDIR%DerivedDataCache”)
и меняем путь на ваш. в "Filename" и в "Path"Александр, маленький? ты удивишся, что я работаю на 200 гб ХДД с 2 ОС шында 7 и убунта 15,04. вот мне не хваатает места!
Эта страница с советами, подсказками и последовательностью работы с контентом FBX в Unreal Engine 4, используемых в Epic Games.
Types of DDCs
Typically, you will have at least the following two caches:
Boot DDC: Startup files that are loaded into memory to increase boot times.
For Example: ProjectDir/DerivedDataCache/Boot.ddc
Local DDC: Derived data for your projects.
For Example: EngineDir/DerivedDataCache
However, your project may also be set up to use a DDC Pak or Shared DDC.
Disabling a Shared DDC
Developers working remotely with a project that has a shared DDC configured may experience poor performance due to the fact that it takes longer to access DDC data than it does to generate it. To temporarily disable a shared DCC, use one of the methods below:
Pass -ddc=noshared on the command line.
Set the environment variable to a local drive hard drive:
On Mac: UE_SharedDataCachePath=None
Q: I am short on disk space. Can I move the Local DDC elsewhere?
Yes! You can adjust this in your project under the Editor Preferences. Aditionaly you can set an environment variable of UE-LocalDataCachePath to a path of your choice. For example: UE-LocalDataCachePath=d:\DDC.
At the command prompt, type "setx UE-LocalDataCachePath d:\DDC".
Restart Unreal Engine, along with any application you launch it from, such as Epic Launcher, UGS, or Visual Studio.
This can be used when you are short of space on your primary drive, or when you are working on multiple branches and wish to ensure the data isn't duplicatednote
Overview of the Derived Data Cache and the storage of assets in formats used by UE4 and its target platforms
Choose your operating system:
DDC stands for Derived Data Cache.
Many Unreal Engine Assets require additional "derived data" before they can be used. (A simple example would be a Material that has a shader). Before the Material can be rendered, the shader must be compiled for the platform the editor is running on.
Because the derived data is large, and at times may need regenerating, it is not checked into source control. Instead it's kept in the Derived Data Cache (DDC).
Using a Shared DDC
A 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, or back up your DDC, or restore a DDC from a backup. While not necessarily harmful, this would be a waste of time—it takes longer to transfer the amount of data stored in the DDC than it does to generate it from scratch locally. If you have a large project and want to distribute pre-built DDC data, you should generate a DDC Pak.
DDC Pak
If you download Unreal Engine from the Epic Games Store, the engine will come with a DDC Pak (.ddp). The DDC Pak contains derived data for all engine content, so you can start working without compiling shaders and so on. Similarly, some samples are shipped with a DDC Pak for the same reason.
For Example: EngineDir/DerivedDataCache/Compressed.ddp
Project DDC Pak
For Example: ProjectDir/DerivedDataCache/Compressed.ddp
Media Framework с блупринтами
Вы также можете управлять напрямую ассетом медиа плеера посредством блупринтов.В данном примере у нас есть тригер расположеный перед телевизором на который была наложена медиа текстура.Ассет медиа плеера был также установлен в режим Auto Play.
Когда игрок попадает в тригер, то наложенная на телевизор медиа текстурм будет воспроизводится, а когда он выйдет из тригера, то воспроизведение будет поставлено на паузу.
Внутри Level Blueprint был создан следующий скрипт.
Создав новую переменную типа MediaPlayer и применив наш ассет медиа плеера как дефолтное значение.После чего было установлено, что когда игрок (MyCharacter) находится внутри тригера, мы воспроизводим ассет медиа плеера (который назначен в переменной).
Аналогичное действие было проведено для ситуации когда персонаж покидает тригер, с тем лишь отличием что используется нода Pause. Нода Event End Play также используется для остановки медиа плеера после выхода из режима Play в реадкторе. Это лишь 2 ноды которые можно использовать с медиа плеером; если вы вытяните из переменной медиа плеера связь, то увидите, что с ней можно использовать ещё некоторые ноды.
Q: How do I create a DDC Pak?
Creating a project-specific DDC:
UE4Editor.exe ProjectName -run=DerivedDataCache -fill -DDC=CreatePak
This commandlet will create a DDC for all content in the project. Alternatively, you can simply supply -DDC=CreatePak while running automation or even a user session to generate a more targeted set of content.
Media Framework с UMG
Если вы хотите, чтобы медиа воспроизводилось как часть вашего пользовательского интерфейса, или как внутреигровой ролик, вы можете это сделать посредством UMG и созданием Widget Blueprint и применением материала который был создан из медиа текстуры (которая была создана из ассета меда плеера).
Ниже мы создали систему при которой, игроку при нажатии кнопки М показывает плеер на экране с кнопками управления (воспроизведение,пауза,перемотка воспроизводимого видео).
Для создания этой системы мы сперва создали Widget Blueprint как показано ниже.
Для Image внутри нашего виджет блупринта был применён материал который использует мадиа текстуру.
Граф блупринта виджета содержит лишь команды для кнопок воспоизведения, паузы, отмотки видео.
Мы также добавили переменную MediaPlayer и назначили ассет медиа плеера который хотим использовать.
Для того, чтобы материал применился к нашей кисти, мы должны сделать одно небольшое изменение и установить в канал Emissive.
В нашем Level Blueprint был сделан скрипт для игрока, включающий/отключащий внутреигровой плеер который мы создали.
Дополнительные примеры вы найдёте в Content Examples на UMG и Media картах.
Common Questions
Q: What is the S3 DDC?
The Fortnite DDC is extremely large due to the amount of content we have. When Covid19 struck, we quickly realized that it was very inefficient for developers to pull all this data from a network share over the limited bandwidth of a VPN to the office, so instead we distribute the most commonly used data via S3.
Setting up the engine to use the S3DDC is extremely easy, but you will need to set up automation that generates the DDC content and uploads it to S3.
Where the DDC Is Stored
Depending on how your project and system are configured, there can be several DDC caches in a hierarchy that ranges from fast to slow. When assessing derived data, your system will do the following to determine how quickly it can access it:
When a piece of derived data is needed, the fastest cache is checked first, then the next fastest, and so on, until the data is found.
When the data is found, it is copied into the fastest local cache so that it is quicker to access next time.
If the data is not found, then it is first generated, then asynchronously copied into the caches so it is available for you (and potentially your team) in the future.
Content stored in the DDC is disposable, and can 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.
Common Questions
Переименование контента в Unreal Editor
Вы можете переименовать любой объект в Content Browser. Выберите объект, который Вы хотите переименовать и нажмите F2 или нажмите на нем ПКМ и выберите команду Rename. Это позволит выделить имя объекта в Content Browser и ввести новое, аналогично переименованию файла в Windows.
Вы, вероятно, получите уведомление об очистке кэша. Это нормально, поскольку объект находится в кэше под старым именем, и необходимо очистить кэш, чтобы в дальнейшем не было проблем.
Setting Up Shared DDC
As you may see in BaseEngine.ini, the editor is already set up to use a Shared DDC that can be enabled one of three ways.
Here are the options from most to least recommended.
Add an override (as pictured below) in the DefaultEngine.ini for your project that sets the path to a valid location for your team.
[DerivedDataBackendGraph] Shared=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, DeleteUnused=true, UnusedFileAge=10, FoldersToClean=10, MaxFileChecksPerSec=1, ConsiderSlowAt=70, PromptIfMissing=false, Path=\YourCompanyServer\DDC, EnvPathOverride=UE-SharedDataCachePath, EditorOverrideSetting=SharedDerivedDataCache)
Set an environment variable (as pictured below) of UE-SharedDataCachePath (On Mac/Linux UE_SharedDataCachePath ) to the folder to use.
In the editor, set the SharedDerivedDataCache variable.
Click image for full size.
You don't have to do anything special to \YourCompanyServer\DDC; as long as it is writable, the engine will create the structure it needs.
Overview of the Derived Data Cache and the storage of assets in formats used by UE4 and its target platforms
DDC stands for Derived Data Cache.
Many Unreal Engine Assets require additional "derived data" before they can be used. (A simple example would be a Material that has a shader). Before the Material can be rendered, the shader must be compiled for the platform the editor is running on.
Because the derived data is large, and at times may need regenerating, it is not checked into source control. Instead it's kept in the Derived Data Cache (DDC).
Disabling a Shared DDC
Developers working remotely with a project that has a shared DDC configured may experience poor performance due to the fact that it takes longer to access DDC data than it does to generate it. To temporarily disable a shared DCC, use one of the methods below:
Pass -ddc=noshared on the command line.
Set the environment variable to a local drive hard drive:
On Mac: UE_SharedDataCachePath=None
Q: How can I diagnose DDC issues?
If you think your editor is not correctly reading DDC data, then search your logfile for LogDerivedDataCache.
Here you can see:
There's no project or Engine Pak cache, which is what would be expected as I compiled this build myself from Perforce.
My local data cache path is mapped to d:\DDC and is writable.
I am using the Epic shared cache, which is writable.
You can also run with -logcmds="LogDerivedDataCache Verbose" to turn on verbose logging.
Media Framework
На данный момент MoviePlayer может быть использован лишь для воспроизведения заставок в то время как движок загружается. Он не может быть использован для воспроизведения роликов в игре, к примеру, как часть UI элемента окружения или использоваться на статик мешах, по типу телевизора.И тут в дело вступает Media Framework который может всё это и даже больше, ниже приведён краткий перечень возможностей.
Media Framework в Unreal Engine 4 это:
- Возможность поддержки локальных аудио и видео треков.
- Доступ в контент браузер, редактор материалов, и звковую систему.
- Доступ для использования блупринтов и umg.
- Поддержка стриминга медиа.
- Отмотка,перемотка, воспроизведение, пауза медиа.
- Возможность поддержки подключаемых игроков.
Как было указано выше, Media Framework сама является одновременно и движком и Slate agnostic, а это значит, он может быть использован не только в игровом двжике или редакторе. Есть слои на верхней части рамки, которые обеспечивают возможности воспроизведения мультимедиа с другими подсистемами, таким как Engine, Blueprints, Slate, и UMG UI Designer. Это охватывает большинство случаев использования, к примеру: в игре — текстуры и пользовательский интерфейс, в редакторе — видео уроки, и видео с маркетплейса.
На данный момент Media Framework всё ещё не законченный и находится в экспериментальной стадии. некоторые функции могут работать не так как ожидалось, тем не менее мы продолжаем работать над решением этих проблем, а также добавляем новый функционал.
Читайте также: