The state of COLLADA, FBX, and open source

jwatte's picture

Here's what I want to do:

  1. Accept submitted geometry/texture files from a variety of sources
  2. Select some of them and merge them into a scene
  3. Render that scene to a bitmap (at some given clock, if animated)
  4. Do all of this on a headless Linux server
  5. You would think that, with two big-name open file formats for geometry, and a healthy open source community, this wouldn't be all that hard, right? You'd probably be wrong.

    To test, I export an animated model from 3ds Max 2011 32-bit, using the latest Autodesk COLLADA exporter. Here's a screen shot of the model in Max:

    I tried downloading and building the latest collada-dom and viewer -- version 2.3. I then tried to build it, and kept running into unsatisfied dependencies, on a fairly stock Ubuntu install. Turned out I needed to install libpcre3-dev, libxml2-dev, libboost-dev, libboost-filesystem-dev and nvidia-cg-toolkit. I had the libraries, but Linux is now seemingly going less towards source, and more towards actual binaries, with the difference that there isn't a unified "SDK" with all the headers, a la the Windows SDK. Oh, well.

    Then I opened the file in the collada viewer, and here's what I got:

    Is it just me? Should this not have been the simplest possible test case, apart from a six-sided box with a single texture?

    OK, so COLLADA is still a non-working solution, just like it's been for the last 10 years or so. On to FBX

    I first tried downloading and running Blender. However, Blender doesn't actually support loading FBX files at all.

    Then I tried OpenSceneGraph, which claims to have FBX and COLLADA support. I first used apt-get to install the pre-cooked binaries, including the "examples" source. However, trying to configure (with cmake) and build those binaries just didn't want to work. Apparently, the example source is only for reference, not for building.

    Then I downloaded and built OpenSceneGraph from scratch. However, once done, and installed, it couldn't open COLLADA files, and it couldn't open FBX files.

    Then I downloaded the Autodesk FBX SDK. I've downloaded it several times before, for different OS-es and in different versions. Each time, I have to fill out a who-are-you-and-what-can-we-sell-to-you survey, before you get to the files. Annoying.

    Once downloaded, it didn't build, because it has a number of hard-coded dependencies (like there being a compiler called "gcc403" -- hint: most machines don't have this!)

    Finally, I could get the FBX viewer to run and display its default scene (some guy dieing, or running). However, Initially I thought their viewer sample doesn't actually let you specify the file you want to open -- it just opens a hard-coded file. Bah!

    Turns out, that's not true -- reading the code just a few more lines shows you can specify a file. And here's what it looks like. Success, almost! Note that the transparency of the hair isn't right.

    I have to figure out 4 now, probably using MesaGL in pure-software mode.

    Score: FBX 0.5, COLLADA -1

    Too bad the FBX SDK is closed-source, binary-only :-(

AttachmentSize
bad-collada-2.3.jpg49.63 KB
before-bad-collada-2.3.jpg62.5 KB
good-fbx.jpg66.52 KB