Working with Materials
This section contains information about how to handle Materials when importing, and how to set up Motion Blur. It also lists the set of Shaders provided with the package that are specifically customized to work with Alembic.
Assigning Materials on Import
By default, Unity assigns the Default Material to imported Alembic Meshes. You need to manually reassign your Materials for each GameObject.
The Alembic package does not support remapping Face Set names to Materials, or creating Materials from Face Set names.
Alembic Shaders
The Alembic package includes the following Shaders:
Shader: | Description: |
---|---|
Overlay | Alembic visualization Shader. Use it to visualize the normals, tangents, UV spaces and vertex colors of your Mesh. |
Points Standard | When importing Alembic Point Caches (or using the ones generated when you record a Unity particle system), you can assign a Mesh of your choice to each Point to achieve effects such as a flock of birds or falling rubble. For optimization purposes, when Unity imports Alembic Points, it applies this Shader, which is a dedicated, simplified version of the Standard Shader. |
Points Transparent | With this Shader, you can use transparency on Meshes acting as Alembic Points, and customize both their blending mode and how they interact with the Depth Buffer. |
Points Motion Vectors | For proper conveyance of motion vectors with Point Caches, Alembic Points components need a dedicated Shader. Unity creates and assigns these Shaders and their associated Materials automatically. |
Standard | Standard Physically Based Renderer (PBR) Material with Motion Blur support added. |
Standard (Roughness setup) | Standard PBR Roughness Material with Motion Blur support added. |
Standard (Specular setup) | Standard Specular Material with Motion Blur support added. |
Motion Blur
Although Unity generates motion vectors for Mesh Renderers and Skinned Mesh Renderers, the Alembic Shaders add motion vector support to Alembic files only. This is useful for rendering that requires motion vectors, such as the Motion Blur post processing effect.
|
In the above image, on the left the character is unprocessed. On the right you can see the output of motion vector and Motion Blur applied by the post processing stack.
If you want to add the motion vector generation function to your own Shader, add this line inside a SubShader:
UsePass "Hidden / Alembic / MotionVectors / MOTIONVECTORS"
Because the velocity data is passed to the fourth UV, Unity uses this data to calculate the apex position of the previous frame. See AlembicMotionVectors.cginc for the MotionVectorData struct.