Output character animation to CSV and others

Gustavo BoehsGustavo Boehs Posts: 63 ✭✭

Hello guys... I have been using Canvas to manipulate moCap data, and occasionally I also have to use other software, so I need to export/import data. For this I have created a very simple workflow for storing quaternions (not full Xfos) into CSVs and then reading those CSVs into a ClipPose.
I have tried to expose the useful bits of data conversion (as XfoToQuat, QuatToCSV, and so on) so it can be used for other purposes. There are also some higher level nodes for loading and displaying FBX characters.

I'm sharing this extension here in case it might be useful to anyone.
https://github.com/gustavoeb/fabricUtils/

Here is a list of all functions and presets included:

Characters/drawCharacter.canvas - Draws all meshes in a character.
Characters/getAllDeformedMesh.kl - Gets a deformed copy of all meshes in a character.
Characters/loadFBXCharacter.canvas - Loads the animation and bind pose from a FBX character.
Characters/localizeCharacterPose.canvas - Localizes the pose of a character based on the Xfo of one of its bones, found by its name.
Converters/poseToXfoArray.kl - Converts a skeleton's pose to an array of Xfos. Returns Xfos in local and global spaces.
Converters/quatStringToXfoArray.kl - Converts a string of quaternions to an array of Xfos.
Converters/referencePoseToXfoArray.kl - Gets the skeleton's reference pose into an array of Xfos.
Converters/xfoArrayToPose.kl - Sets the xfos on a pose using an xfo array.
Converters/xfoArrayToQuatString.kl - Converts an array of Xfos to a string of quaternions.
Draw/drawMeshArray.canvas - Draws an array of meshes.
FileIO/getClipPoseFromQuatCSV.kl - Gets pose from quaternions stored in a CSV file. Quaternions must be stored in local space.
FileIO/loadAnimationFromQuatCSV.canvas - Loads character animation from CSV files filled with quaternions.
FileIO/writeAnimationToQuatCSV.canvas - Writes character animation from CSV files filled with quaternions.
FileIO/writeLinePerFrame.canvas - Writes a string to a TXT file, each frame at a new line.

Comments

Sign In or Register to comment.