Exporting Unity GameObjects to Alembic
You have two different options to export Unity GameObjects to Alembic:
- The Alembic Exporter component (available by default in the Alembic package).
- The Alembic Clip Recorder (only available if you installed the Unity Recorder package, minimum version: 2.0.0).
Both options support exporting single frame and multi-frame Alembic files, and can export GameObjects with the following components:
- Static Meshes (MeshRenderer component)
- Skinned Meshes (SkinnedMeshRenderer component)
- Particles (ParticleSystem component)
- Cameras (Camera component)
Using the Alembic Exporter component
The Alembic Exporter component is available by default in the Alembic for Unity package.
To configure a Scene to export an Alembic file, add the Alembic Exporter component to a GameObject in the Scene. You can add it to an empty GameObject in the Scene; it is not necessary to add it to the GameObjects being exported.
You can configure the component to export the entire Scene, or individual GameObject hierarchies.
Warning: Using the Alembic Exporter component automatically disables Draw Call Batching. Because of this, you might notice your Scene slowing down, because the elements are no longer static.
If the Mesh group is valid after being batched, then the Alembic package exports it. In some cases, Unity batches the data multiple times and the results may change.
To re-enable batching in your project after using the Exporter component, open the Rendering section of Player settings (from Unity's main menu: Edit > Project Settings > Player > Other Settings > Rendering). However, you should not re-enable Draw Call Batching while using the Alembic Exporter component.
Using the Alembic Clip Recorder
The Alembic Clip Recorder is an extension of the Unity Recorder. It becomes available as soon as you install both the Alembic for Unity and Unity Recorder packages.
The Alembic Clip Recorder includes the overall functionality of the Unity Recorder in addition to its own Recorder properties:
- You can use the Alembic Clip Recorder as any other recorder, either from the Unity Recorder window or through a Recorder Clip in a Timeline track.
- You can use more than one recorder of any type at the same time to simultaneously capture different data.
- The ways to start and stop the Alembic Clip Recorder are the same as for any other recorder type.
To set up an Alembic Clip Recorder, you need to perform the following main steps:
When adding a new recorder (either through the Recorder window or a Recorder Clip within Timeline), select Alembic Clip.
Set the Recorder properties specific to the Alembic Clip Recorder.
Set the global Recording Properties (shared with the other recorders, such as the frames to record).
Note: The Unity Recorder documentation provides the generic instructions to add a recorder and set up the global Recording Properties.