Part I: Setting up the Rig (Rigging)
The primary goal of setting up a rig to work with Alembic is to organize the rig heirarchy so all of the geometry to be
exported to Alembic is under a single group. An animator can then simply select that group and export the Alembic cache.
There should therefore be no geometry nesting inside of the rigging structure. This can be easily achieved by using a parent constrain
rather than parenting geo inside the rig.
We only want the renderable geometry in this "Geo" group. That means that blendshape geo as well as any hidden geo not being
used (an extra hat, etc.) should be grouped somewhere else or possibly deleted. Otherwise the Alembic file will become humongous.
To make things clear for the animator who will be exporting the geo cache, this geo group usually is given some overtly obvious
name such as "Mery_grp_geo_PICK_THIS_TO EXPORT".
For rigs with xGen hair, we cache out a separate scalp object in addition to the geo group. See the doc
Animation Pipeline: Alembic Animation Cache, Python Texture Transfer Script
for instructions on setting this up. If the hair is animated, either through keyframing or dynamic simulation, then hair
curves will be provided by the texturing department and incorporated into the rig. The typical workflow here for keyframe animation
is to have hair geo which is rigged, and to have the hair curves follow this geo with a wrap deformer. For dynamic sims
the imported guide hairs can be made dynamic and their simulations cached out. See the doc
Maya XGen Interactive Grooming - Animation Pipeline
for detailed instructions on setting this up.
Alembic works by matching the names of objects in the hierarchy, so it is crucial that all nodes in the rig (in particular
the geometry section which we will be exporting) have unique names. The Modify > prefix hierarchy names function can
be used to add the asset's name to all the nodes to avoid naming clashes in the shot. Likewise all geometry and group nodes
should be zeroed out on the rig.
Part II: Extracting the Geo (Texturing)
Once the hierarchy has been made correctly, it can be extracted from the rig to derive the file used in texturing that will
recieve the Alembic cache.
To create a geo file from a rig do the following (with all the geo manually selected in the outliner):
- Unlock skins: In the channel editor unlock all channels.
- Kill history: edit > delete by type > history
- Delete the rig. If everything is done right the geo will not move.
In addition to this you may need to remove "rigger referencing" (this where riggers make geo unselectable).
Open the Attribute Spread Sheet and in the "all" tab set Override Display Type to 0 (normal).
You may also need to add back locked channels. A good way to do this is by exporting the geo as an FBX, then import it to a
new scene with the "merge into selected namespace and rename incoming objects that match" option.
Pro tip: If you need to update an existing tex file with the FBX from a rig file
(to ensure that they are identical for Alembic) if you import the FBX into the Maya scene with the tex file in it,
it will replace the tex file geo with the new geo but keep the material assignments on the geo!
Part III: Exporting (Animation)
This step is done by the animation department. Select the top group for the geo you want to export
(usually the group will be named "GeoPICK" or similar) and Pipeline Cache > Alembic Cache > Export
selection to Alembic [options box]. When the options dialog opens,
check the following options on in the Advanced Options section of the dialog window:
- Strip namespaces
- UV write
- World space
To test that the cache export worked, import the cache (option "import to scene root") into a new Maya scene that contains your shot camera.
Make a playblast of this and upload it to Shotgun for review.
Part IV: Importing the cache (Lighting)
Building a shot is a two step process of first building the scene, and then second importing the caches for all animated assets.
Step 1: Scene build
- Set your project.
- Open the FG Maya Template file in Maya, and "save as" to the name of your shot
using the proper naming conventions (see the naming conventions help document).
This will give your the ground plane, cameras, lights, proper render settings, and passes.
- Replace the [SHOT NUMBER] placeholder in the Render Settings Variable Field with your shot number (ex: Shot06)
- Check the Shotgun shot page to see which assets you will need (the character and prop population columns)
Refer to the Shotgun Release page to ensure you have the most updated version of all of those assets.
- Import the animated assets for the shot into your scene. Make sure to use the option "Merge into selected namespace and
rename incoming objects that match" with the "root" namespace selected so the file will import in without any namespaces.
- Select the top groups for each of the animated assets you just imported, and add them to the FG_STUFF_IN_HERE group.
Make sure to also place the character’s xGen collection for hair, or if using Vray fur the FurPreviewTm
node in this group as well. This will populate the content of the FG_STUFF_IN_HERE group into all the render layers.
For an explanation of what these Render Layers do, see the doc BG: Shot setup for backgrounds
- Set the camera and frame range, in the Render Settings.
- Determine camera distance and fill out in zdepth pass
(see Proper DOF settings for details on setting this up).
Note that ideally the zdepth for the BG and FG should be the same so check the settings in the BG scene.
- If a camera is outside of a wall in a shot, turn off primary visibility on the geo.
That way it still affects the reflections and GI.
- Optionally, if there is geo in the scene that will not show in the camera, or affect shadows or reflections,
you may be able to hide it to speed up the render. Do this with a custom display layer named for your shot
(ex: shot12Hide)
Step 2: Geo caches
For this workflow see the doc
Animation Pipeline: Alembic Animation Cache, Python Texture Transfer Script. In sum the steps are:
- import the geo group to scene root
- use the Texture Transfer GUI to transfer the materials from your texture asset onto the imported geo group cache
- if hair is present, select the scalp on your texture asset and import the scalp cache with "import: merge into selected"
- delete the geo group of the texture asset
For animated hair you will additionally need to load the Alembic curves into the xGen, as described in the doc
Maya XGen Interactive Grooming - Animation Pipeline
|