Customizable Object compilation modes¶
- Customizable Object compilation modes
What is the HowTo about?¶
In this HowTo we'll explain the Customizable Object compilation modes and how to use the "Working Set" mode. This mode allows to visualize a set of Customizable Object subobjects inside a particular CO subobject in the Editor. If working in a subobject which needs to incorporate some other subobjects (for prototyping purposes for instance), this avoids the need to compile the root object (with all corresponding subobjects) to update changes in the subobject being edited, greatly decreasing the compilation time when having a large CO hierarchy. If you haven't still learnt how to make child objects, it's recommended that you take a look at the section Add a child object before doing this HowTo.
Customizable Object compilation modes¶
The compilation mode of a Customizable Object can be set through the Customizable Object Editor, in the Editor properties tab, through the “Mesh Compile Type” field.
Four options are available. To illustrate how each option affects the parent / children connected COs, a CO hierarchy example is proposed below. Assume the user is currently working in the “Current Editing CO” Customizable Object (highlighted in green).
1. Full object: will consider for compilation all Customizable Objects in the whole graph hierarchy. This option is the most expensive one and will force the compilation of any CO related with this one in any CO uasset file.
2. Just local object: only the current CO being edited and all the parent COs until whole graph root will be considered for compilation.
3. Local Object and Children: same as Just local object, but considering also all child COs of the current one.
4. Add working set, no children: for each element in the Working Set field (below the Mesh Compile Type field in the Customizable Object Editor, in the Editor properties tab), the CO and all its parents until whole graph root are added for compilation. The example below shows the case where the Grandchild 1 CO Customizable Object was added to the Current Editing CO Customizable Object's Working Set field. For detailed information about how to use this option, please refer to the next section in this wiki, Working Set compilation mode example.
5. Add working set and children: same as Add working set, no children but but considering too all child COs of the current one. The example below shows the case where the “Grandchild 1 CO” Customizable Object was added to the “Current Editing CO” Customizable Object's Working Set field. For detailed information about how to use this option, please refer to the next section in this wiki, Working Set compilation mode example.
Working Set compilation mode example¶
What assets are needed?¶
You can easily make the needed Customizable Objects from the assets already present in the Mutable Demo.
Setting everything up¶
1 - Let's suppose we have a root Customizable Object called "Basic_Object" with three Node Object Group nodes for possible children to be attached to it, called "Trousers", "Shoes" and "Shirt". Also, we have several Customizable Objects that will serve as child objects, called "Child_Trousers_Short", "Child_Trousers_Leggins", "Child_Shoes_Normal", "Child_Shoes_Boots" and "Child_Shirt_Poor".
Below are descriptions of this Customizable Objects, note how each one of the child objects is attached to the Basic_Object Customizable Object, and to the corresponding node.
Configuring the child object¶
2 - Open a Customizable Object which is a subobject (not the root object “Basic_Object), for example, “Child_Shirt_Poor”. Locate "Mesh Compile Type" and "Working Set" in the Object Properties, and set "Mesh Compile Type" to "Add working set and children".
3 - Add to the "Working Set" array variable all Customizable Objects you want to have available in this ”Child_Shirt_Poor” subobject. In this example, we're adding “Child_Trousers_Leggins” and “Child_Trousers_Short” Customizable Objects, so we can see the outcome of our original “Child_Shirt_Poor” Customizable Object with other COs close to it.
Compiling with the extra Customizable Objects in Working Set¶
1 - Press "Compile".
2 - Now, all COs added to Working Set are available as options for this child CO, and can be set, hidden and changed, allowing fast prototyping without the need to compile the root object (notice how the “Child_Shoes_Normal” and “Child_Shoes_Boots” COs would need compilation if the root CO, “Basic_Object”, was compiled. This applies to cases were docens of CO compilations are skipped, improving the user experience and minimizing compilation times).