General Purpose networked source to intermediate converter

I do a lot of building with scons. One of the most frustrating part of my @ work setup is that it launches 3dsmax during the build process, to convert a .max file to an intermediate representation. This limits me to being on a windows platform to do my builds.

It also means I have to keep a preconfigured copy of max on every machine I will build from.

I have set out to produce an alternative, that I can use easily from scons.

Target Features

  1. Written in Python
  2. Use XMLRPC to allow client code to be separate from jobserver code.
  3. Support basic transformations of the following types: max->ase, png->dds, psd->png
  4. Does not require any of the binaries/tools for conversion to be installed on the client machine. Anything required for the conversion (max,nvdxt,imagemagick, etc.) will only need to be on the jobserver.

Architecture

  1. Client example - a script that makes an XMLRPC call to a jobserver to register a new conversion job. Script is written to be easily converted into a SCons builder.
  2. File server - The interaction between client and jobserver is only to setup/start/signal_completion of jobs. The jobserver will provide the client with two directories, an input drop, and an output job, which can be network paths. The file server is just a samba share on the network.
  3. Job Server - The jobserver tracks active jobs, indexed by UUID, and for now performs the job itself.
  4. Conversion slave - not in current prototype, would be a refactoring of the conversion portion of the jobserver. This would let you have multiple conversions going at once on multiple machines.

Current Status

I have a prototype on github that will happily convert png to dds. It uses nvdxt to do the conversion, and currently does not specify any arguments to nvdxt other than -file and -output.

I do have an example that converts max 2 ase, but i’m having issues testing it at home, long story. It really just needs some tweaking to the template maxscript.

Source Code

You can check out the source code from github:

You can also grab a tarball snapshot here:
https://github.com/jonnyro/netmax2int/tarball/master

Collaboration

If anyone is interested in playing along, especially in updating the template maxscript for max2ase conversion, i’d love your help.

Some thoughts:
Rather than deploy Max et al to each machine, set up a virtual machine image with all the tools you need. Virtualbox supports python for scripting purposes. Then you can freeze a machine image with Max running and ready to export. Scons can fire up a copy of the virtual machine on just about any PC and do the export. You’re going to have to write some glue so that you can script the copy of Max running inside the VM, but it shouldn’t pose any insurmountable issues. Firing up a VM takes about the same amount of time that firing up a copy of Max does, so that is roughly a push. If you can’t afford the windows licenses for the VMs (Win7 comes with VM licenses. Google it.) You might be able to run Max under Wine. WineHQ - 3D Studio MAX 9.x

VMs, not a bad idea. Using a VM ensures a tightly controlled environment including tools/settings/etc.

I’m going to keep running with this idea though for now, i’ve been having so much fun putting it together.