Basic Concepts - anticto/Mutable-Documentation GitHub Wiki

Assets and Actors

Mutable-Basic

The diagram above shows the different assets used for a customization and their relation. The main assets are Customizable Object, Customizable Object Instance, and Actors.

Customizable Object

A Customizable Object is the blueprint of the customization. It defines what can be customized and how. It includes all the possible variations that can be applied to it, and defines the runtime parameters that will control those.

You can create Customizable Objects from the Content Browser Add New menu:

Parameters

A Customizable Object will define several parameters. The parameters are what the game or application (so probably the player) will be able to modify at runtime. There are several types of parameters, some examples of those are:

  • Enumeration parameters: they represent an option in a predefined set of options. These may be created by an Enum Parameter, or by an Object Group and their Child Objects.
  • Float parameters: numeric parameters with decimals. These are usually created explicitly by a Float Parameter, and used for continuous effects like texture transitions or mesh morphs.
  • Color parameters: they represent a color with alpha channel, in essence a vector of four numeric decimals, ranging between 0.0 and 1.0. These are created by the Color Parameter.
  • Projector parameters: they represent a projector with a position that will be modified at runtime. They are created with the Projector Parameter.
  • ...

Customizable Object Instance

A Customizable Object Instance represents an instantiation of a Customizable Object. In other words, a set of parameter values to apply to a Customizable Object. This asset represents a specific customization and can be instantiated as an Actor into a world.

To create an instance asset from a Customizable Object, you can right-click the Customizable Object in the Content Browser and select 'Create New Instance'.

To create a new Actor, simply drag and drop the Customizable Object Instance into the world.

Customizable Object Editor

Here is a quick overview of the different widgets you can find on the Customizable Object Editor:

  • Source Graph : It contains a tree of all operations needed to perform a customization. In comparison to Blueprints, this graph does not contain an execution pin and nodes are always executed from left to right.
  • Object Properties : General properties of the asset.
  • Details : When a node is selected in the Source Graph, its properties are displayed here. Right-clicking a node or pin usually also provides additional contextual options.
  • Preview Instance Viewport : By default the Editor always shows a Preview Customizable Object Instance. This panel shows an automatically created Actor.
  • Preview Instance Parameters : The selected parameter values of the Preview Customizable Object Instance. They can be directly modified here and allow you to see how changes made in the graph actually modify the customization. It also allows you to Bake the current parameters into a static asset.

The editor contains its own tool bar with the following elements:

  • Save Saves the current asset.
  • Compile Compile the current graph and update the Preview Instance. This is necessary to reflect any changes in the graph.
  • Compile Only Selected Compile only the subgraph of the parameters selected in the Preview Instance. Useful when you want to quickly iterate on a very specific customization.
  • Texture Memory Analyzer: Opens a tool panel that will show the generated textures and their details.
  • Performance Analyzer: Opens a tool that lets you benchmark the current Customizable Object by generating many random Instances while monitoring their performance.

Splitting the Graph

Mutable allows you to split the graph into multiple assets. You can split it by using:

  • Customizable Object Macro Library: Similar to Blueprint Macros, it allows you to reuse a sub-graph in multiple places. See Macro Instance Node.
  • Import/Export: There are special diagram nodes to export and import connections from one Customizable Object to another.
  • Child Object: A Child Object can be connected to an Object Group directly, but also in between Customizable Objects (only when it is the root node of the graph). When a Customizable Object is connected to another Customizable Object, this is called a Child Customizable Object.

Mutable vs Object

Although Mutable is usually used to generate new resources, it also have the option to use already existing ones. Using those have the benefit of being much more performance. In the other hand, since existing resources are already packaged, they can not be modified. Only switching and is allowd on them. At any time you can know which type or resource are you using by looking at the node's pins. Round or Mutable pins, are new resources that are being generated. Object or triangular pins, are resources already existing in the project.

Reference Assets

Different nodes have a property called Reference Asset (e.g., Reference Texture, Reference Skeletal Mesh). This asset is used at compile time to define which properties the generated assets should have. For example, for the Reference Texture in the Material Modify Node it defines the format and sizes the final Texture should have. See each node for specific details.