One of the most important things when using a character customization system in a game is the resource management. Depending on the type of project and target platforms some strategies work better than others.
A game may have different stages. For instance:
- A customization menu where the players constantly change a character.
- An in-game stage where characters are created and destroyed while the game action is in progress.
- A loading screen where there is no action, the user is waiting, and some characters are being generated for the level being loaded.
Each of them have different requirements, and also different resources available. These are the metrics to keep in mind for each use case:
The most important game design question for this metric is "How many characters are going to be created at the same time?" (even if they are not rendered at the same time).
Mutable for Unreal creates unique meshes for each instance, so if the meshes are complex, the amount of memory for them is relevant. Mutable supports LODs and will only generate and use the memory for the necessary LODs for each character.
Textures that are generated by Mutable are shared across instances of the same object if they are identical. If your characters use the texture packing system in Mutable, or a complex texture customization, it is less likely that textures can be reused, so you will need to count them as unique for your game budget. For platforms without unified memory, textures are generated in main memory and streamed to graphics memory as required by the Unreal texture streaming system.
The most important game design question for this metric is "How many characters are going to be rendered at the same time?". Depending on the number of characters that you need to render at the same time, the number of draw calls may become a bottleneck. A way to solve this is to merge character draw calls, by merging character materials that are similar either manually in the source assets, or in mutable, with the proper CustomizableObject diagram setup. This second option will require mutable to merge the texture layouts, and potentially create more unique textures, so careful planning is necessary to balance draw call cost and memory usage.
Since Mutable doesn't put any restriction on how deep your character customization can be, the time to generate a character when it changes can be big. This is compensated by using background character construction, and minimizing the synchronisation with the main game thread to avoid stalls. Moreover, Mutable has a "State" system, that lets you inform of what parameters are about to change, and it will automatically try to reduce the background update time. (TODO: This system is currently not active in the Unreal version yet).
Mutable uses a streaming system that splits the data into several files and loads and unloads them automatically when needed. This reduces the memory requiremets for the final game, and the loading times. The streaming system only works with packaged games, so when playing the game using the Unreal Editor, all character data is loaded.
In general the disk space is not a bottleneck for any project, but Mutable makes sure to avoid duplicated data (even if present in the source data), and can benefit from some compression if assets are packed using Unreal Engine pak files.