Asset Shaping Feature Overview
Partitioning
Partitioning
SceneComposer produces one "big" asset as a result of the asset generation process. In the application deployment process, there are often situations where the big contiguous asset needs to be partitioned in multiple data packages to meet deployment requirements.
Assetlib Shaper works on the "big" asset and it is able to partition it in multiple other assets. The resulting assets have exactly the same format as the "big" asset, meaning that they can be loaded by the existing AssetLoader component within Candera.
To partition an asset, besides Assetlib Shaper, you need: 1. the partitioning configuration: .xml file which tells the tool the rules used in this process; 2. the asset file: .bin file produced by SceneComposer at asset generation.
Partitioning configuration file defines:
- set of partitions;
- content of each partition (e.g., a set of bitmaps, one animation, all the vertex buffers of the initial asset);
- location where the partitions will be produced
- form in which the content will be present in each partition (compressed or not compressed)
- reserved spaces for each partition
<?xml version="1.0" encoding="utf-8"?>
<shaper-configuration xmlns="http://tempuri.org/ConfigSchema.xsd">
<partitions directory="C:/temp" block-size="3KB" reserve-space-names="20%" reserve-space-tree="4KB">
<partition name="Scenes" master="true" reserve-space-asset="256KB">
</partition>
<partition name="BitmapsAndAnimations" reserve-space-lib="10%">
<compression>
<lib type="Animation"/>
</compression>
<rule type="Animation" item="*">
<rule type="Bitmap" item="*" reserve-space-lib="20%"></rule>
</partition>
</partitions>
</shaper-configuration>
Above you see a partitioning configuration file. Basically, it defines two partitions; one named Scenes and one named BitmapsAndAnimations. The first partition is the master one. Each configuration must have only one master partition. This is the place for all asset elements that are not requested by other partitions.
To partition an asset, you will use this command:
AssetTool -shape -p configurationFilePath assetFilePath