Baking Instances - anticto/Mutable-Documentation GitHub Wiki
Why
The main goal of Mutable is to build dynamic objects at game runtime. However, it is also useful to be able to build these objects in the editor, and convert them to standard Unreal Engine assets (SkeletalMeshes, Materials and Textures). Possible uses for this are:
- Production of marketing materials in other tools. From Unreal you can export these assets and import them in other content creation tools for the creation of cinematic videos, offline renders, etc.
- Debugging your object. You can examine a baked instance in standard Unreal Editor tools to better understand the effect of Mutable and try to pinpoint inefficiencies in your object.
- Mutable as a production tool. Some projects use Mutable purely offline at game content creation time, generating final characters for their games.
How
Instances can be baked from the Bake Instance button in any Mutable Preview panel. These currently include the CustomizableObject Editor and the CustomizableInstance Editor.
A window will popup to select the target content folder for the generated resources, and a prefix for the asset names:
There are two additional checkboxes in this window:
-
Export all used resources: If checked, all the materials and textures used by the object will be baked in the target folder. Otherwise, only the assets that Mutable modifies will be baked, and the original references to non-Mutable assets will be used instead (i.e. textures used by object materials, but have no nodes connected to them). In other words, checking this box will generate a fully self-contained object that doesn't use any shared resources from your project.
-
Generate Constant Material Instances: If checked, all the material instances in the baked skeletal meshes will be constant instead of dynamic. They cannot be changed at runtime but they are lighter and required for UEFN.
The result is a set of Unreal assets in the target folder, including all levels of detail.