Thursday, January 7, 2010

Instant pipeline in action.

After setting up FBX exporting scripts for 3DSMAX and Maya, I've prototyped whole pipeline. How it looks like? You are double-clicking the MAX file in resources explorer and getting this:

 
After adding desired sub-meshes to list of exported we just pressing Export and viola - editor creates meta-file that contains user choices. Next time it has enough information to re-export without user interaction. This has few strong points comparing to classic exporting pipelines:
  • precise selection of list of needed meshes frees artists to use any helpers he needs. No more "clean version" files or "save selection" hell to keep exported assets clean from any helpers;
  • version control systems can contain original asset files for build machine to generate specialized asset formats for all platforms. No intermediate formats needed;
  • editor can detect that original asset file is changed (meta-file contains date and content CRCs) and automatically re-export and reload asset into engine;
  • new asset importing is very straightforward;
I've tried same principle on textures through NVidia Texture Tools. This allows artists to use original texture files in original scenes. Conversion as well is based on meta-files conception.


Few implementation details

For prototyping needs I've took the following steps:
  • created Max and Maya scripts that monitors some temporary folder for files with description of what scene should be exported;
  • when editor needs to export something, it starts Max or Maya in no-interface mode (like "-silent -mip -U MAXScript %s") and then places description files in temporary folder monitored by script;
  • script loads files one by one and exports them. When it finds special quit file it closes modeling package;
  • editor loads exported files and perform necessarily steps;
This works good for prototyping needs, but this way has few caveats. Editor needs to run modeling package each time it needs to export something. I've ended up with keeping it open with empty scene after first need. Also, loading big files can be time consuming and this will ruin instant feedback we want to achieve. So for production environment we should modify scheme a bit:
  • we need to create a small plugin for our favorite packages that will monitor for scene saving event and communicate to editor instance to decide if file should be exported as FBX;
  • plugin silently runs export routine (so no additional overhead of loading scene in another modeling package instance) and signals to editor;
  • editor loads exported file and perform necessarily steps;

No comments:

Post a Comment