Optimize an asset
This guide shows how to use Simplygon to optimize an asset. Please make sure that the Simplygon Unity plug-in as well as Unity USD v2.0.0 is installed before proceeding, if not see installation instructions.
The Simplygon Unity plug-in works, just as most of our other integrations, on selection. This means that most parts that are to be optimized by Simplygon needs to be selected in the outliner or viewport, but there are some exceptions. Some of the exceptions are transformations, skeleton / rig / bones, cameras and materials, these are exported automatically. Same parts of the exported scene may not be in use until specified in the Simplygon settings, for example cameras that can be assigned as the point of view for point for visibility culling.
Let's try to optimize UnityChan in this example. The asset has recently been imported into the scene, this will be our starting point. The Simplygon window is docked to the right, if it is not visible, go to Window -> Simplygon and dock it to your liking.
Selection of objects
In many cases it is enough to select one or more individual meshes. UnityChan has two meshes, the hair and body, which potentially could be selected individually. We can also see that these meshes has a common parent, this node can also be selected. There might even be cases where we recommend selecting the parent, for example when there is a skeleton located at the same level in the hierarchy as the meshes.
Let us select the parent of the two meshes.
Simplygon UI
The initial state of the Simplygon UI is quite minimal and expects the user to do some choices to finally progress to the optimization stage. The window presents one button which states "Add LOD Component". A component represents one LOD (which will be based on currently selected objects). Let's click the button!
In the menu there are now a choice named Templates, by templates we mean pre-generated templates for specific type of optimizations. These templates, processing settings or as we call them, Pipelines, are one of the fundamental parts of Simplygon (previously SPL (Simplygon 8.x) and INI (Simplygon 7)). Previously saved Pipelines will be listed below Templates.
If we go into Templates we can see two categories, Basic and Advanced. Basic is intended for new users and filters out most "advanced" settings, while Advanced exposes all available settings. Let's go into Basic -> Reduction with material baking!
See Simplygon API documentation for more information about specific Processors.
If an asset was selected when selecting the Pipeline then we would generate material casters automatically, if not, then select the asset, press the cog-icon and select Automatic. Advanced will let you add material casters manually.
Below we can see that the default settings for a Basic Reduction with baking is 50% reduction, two material casters (for Albedo, Normal) with 1024x1024 sized textures. Now press the yellow Simplygon logo at the bottom of the Simplygon UI and wait for the optimization to complete!
Optimized asset
Original asset to the left, optimized asset to the right:
- 50% of the original triangle count
- One shared material
- Two shared textures (Albedo, Normal)
- One uv-set per mesh