I've been trying to find a way to export the skeleton for a skinned and animated figure and noticed that if I load one from an FBX file and then export it to a GLTF file (using File->Export and selecting .gltf as the export type), I can produce a file that contains the skeletal hierarchy, albeit with the values for the joint matrices set to the currently selected animation frame. Unfortunately, that's about all it seems to contain, as the mesh info is completely missing from the GLTF file. Some of this data seems to be accessible using techniques in the "Simple ASCII Export.js"example script, but it would be nice to find a way to also let me export all the data needed to animate a skinned figure using a script. Is this possible?
If not, I can think of several hybrid approaches that might work, such as manually advancing an animation through all it's keyframes while exporting a GLTF for each frame and then using some kind of external script to process all the exported files to capture all the joint positions. The mesh could then be exported to an OBJ file, but this still doesn't handle getting access to the mesh weighting values, but perhaps there is a way to export this using a script?. I'm also not sure how to get the pose position matrices. I imagine all this information is available in the FBX file but, so far, the structure of this format seems to not be very well documented and my attempts to parse it have not yielded much success.
If anyone can suggest any other approaches, or can clue me in on some more advanced scripting techniques that might solve some of the issues I've mentioned, please let me know.
Wayne
If not, I can think of several hybrid approaches that might work, such as manually advancing an animation through all it's keyframes while exporting a GLTF for each frame and then using some kind of external script to process all the exported files to capture all the joint positions. The mesh could then be exported to an OBJ file, but this still doesn't handle getting access to the mesh weighting values, but perhaps there is a way to export this using a script?. I'm also not sure how to get the pose position matrices. I imagine all this information is available in the FBX file but, so far, the structure of this format seems to not be very well documented and my attempts to parse it have not yielded much success.
If anyone can suggest any other approaches, or can clue me in on some more advanced scripting techniques that might solve some of the issues I've mentioned, please let me know.
Wayne