Good fbx pipeline shim strategy?

I’m looking for a good way to inject metadata into an FBX file on its way to Unreal, and then to pull that data out on the unreal side.

Right now I do this in the most brute-force way possible; I stash a blob of JSON, crunched down to a string with base64 encoding, onto a string attribute on the root node of the maya file. This works fine, but I feel like it’s very crude – in particular I don’t like the fact that unreal has to scan lots of nodes looking for my metadata and I’m worried that some artist will find a way to cut-and-paste objects such that Unreal gets two, conflicting copies of the data.

So I’m looking for a suggestion about the right place to inject file-level metadata into an fbx and then to pull it out in unreal. My instinct is to use vanilla fbx to export the file and then post-edit it right after it’s complete to add the data from Maya – though an alternative would be to write a custom FBX plugin with more flexibility. I assume the latter is more work but I could be wrong.

Suggestions? @Randall_Hess?

3 Likes

Maybe use the FBX Python API? It’s useful for messing around with FBX files…

Can use it for fun things like removing namespaces post-export, renaming things, etc. - basically any FBX file manipulation.

1 Like

If you could, I would totally sidecar the data. json/xml/whatever flavor you like that has wide support. Which is anything with python support. Its just way easier.

More resource handles laying about? Sure; who doesnt use a resource filemanager as well already though?

Cheers

So Steve you are basically doing this https://docs.unrealengine.com/en-us/Editor/Content/FBX/FBX-Asset-Metadata-Pipeline