Select the animated mesh and in Maya Animation menu, choose Geometry
Cache / Create new cache
The export your GCG Character Geometry File as detailed
here.
Note: the vertex animation will be embedded in the GCG file, so after
export, you can just delete the .mcc/.mcx files created for the Geometry
Cache
To save to FBX (alternative)
To be able to save the nCloth simulation in a geometry file, it is
required to create a Quick Set : Select the flag mesh, Create Menu /
Sets / Quick Select Set... / Give a name (eg FlagQuickSet)
Export the FBX file with the given Quick Set selected in the FBX
Export parameters:
Select the Character Node in
main workspace, and relocate its Geometry File in the Asset Properties panel by clicking on
the button. Browse to the geometry file
you just exported with the flag. You may need to set a bigger bounding
box than the usual character because of the flag simulation.
Add an new Asset Group node named Empty and connect it to the Flag
Asset Group node. This will allow to have part of the characters
without flags
Select the Flag Asset Group node and then select the flag mesh in
Maya and click on the Import Geometry
button in the Geometry Tab. This
will add a flag Mesh Asset node in the Flag Asset Group node
Set the Flag Asset Group node as weighted by clicking on
the button on the node (or
by checking the Weighted checkbox in the Asset Properties panel)
New Geometry Nodes for the flag
Make sure the Character Bounding Box is large enough to contain the
flag when the character will move its arms
Then in the Rendering Types view, adjust the weights of the Flag
group.
Creating the Geometry Behavior
Open the Behavior Editor, and add a Geometry Behavior (it should be added in a
Parallel Operator if the character should also
play a motion at the same time)
Go inside the geometry Behavior attributes and set the geometry Id so
the fbx/gcg is found inside your gcha.
Finally set a correct start/stop frame in order to play the animation
You are now ready to run the simulation tool and render your animation!