FBX - Analytics

In order to help my project group with a better way of validating assets (other than manual checks to verify file integrity) I created a tool for Maya with PyMel, that lets the user check their entire asset folder very quickly.

FBX-Analytics interface

FBX-Analytics interface


When the script is executed the user is prompted to point at a directory containing their FBX-files. Then it starts to loop through each file, for every sub directory it finds, until done. After which an interface opens, the log window will display the total number of checked assets and the total number of faulty files it found.


The user can then choose to open any of the faulty files to view the problems both inside of the Maya scene as well as the log window. After the problems have been corrected the asset can simply be exported again.


In depth

As previously mentioned, the script, when executed will loop through all files and directories and subdirectories from the given path. Everytime an FBX-file is found the file is opened in Maya and the analytic-function gets called and is run for each file until completed.


The analytic section of the script starts off with a few basic operations, making sure that the name of the FBX-file corresponds with the name of the mesh inside it, as per our naming convention standard and it displays vertex count.

After this is done the script starts checking the mesh if it has textures, I use the ‘listConnections’ function to see if the nodes exist. If they do, the name of the texture gets displayed in the log, if they don’t, the file will be appended to the ‘taggedFiles’ list for error/warned files. The missing type of texture (Albedo, Metallic etc) as well as the type of material, (PBR vs Non-PBR shader) will also be displayed, since we require PBR textures on all of our models, a non-PBR shader will return an error so the user will always know what went wrong.


Thoughts and lessons learned

I started this project with the idea to help my fellow developers to somehow decrease the amount of time they’d spend looking for a problem in the wrong place.

In the start of our very first project, before we had a clear production pipeline to follow. We had a few occurrences of ‘missing texture links’ or ‘naming convention mismatch’, that led our programmers on a bug chase in our engine, which turned out to be a simple texture not being linked inside Maya before exporting.

The biggest obstacle for me to overcome was to choose exactly what I wanted for this iteration of the tool (planning to revisit and re-iterate in the future). Throughout the development process I realized more and more for every function I added, that there was an equal number of other functions I wanted to add because of their usefulness. For example, having the tool be able to analyze animation files would be very useful, especially considering the amount of different animations that are required to create a smooth and captivating experience.

It’s not impossible that a joint might not get exported or actually deleted by mistake and the result would then mean a broken animation or broken game. So having the tool analyze these files to make sure that, for example all ‘player’ animations have the exact same amount of joints across all files would help reduce the risk of having this problem.


Research and development of this project was conducted at The Game Assembly as part of an Advanced Technical Specialization course.

Last updated: 31st May - 2018