Trouble Loading FBX Model

Hi All,

I’m trying to load an FBX file with three but can’t seem to get anything to render [gist with fbx file].

I’m able to import the FBX file into Blender, and after several minutes of loading, I can see the objects and play the animation:


Using three and Chrome, though, I can load the FBX file, but there don’t appear to be geometries or materials bound to any of the loaded object’s children, and nothing renders.

Does anyone know what I can do to render this FBX file with three? I’d be very grateful for any suggestions others might be able to offer on this question!

Could you say more about hello.fbx, how it was created, and what you expect it to contain? It seems to be a lot of animated point data with some bones, some cameras, and somewhat-broken-looking animation. Even in Blender I’m not really sure what to do with it… If you can say more about the workflow involved there may be other ways to get the data in shape, though.

@donmccurdy thanks very much for your response.

The short answer is I’m actually not quite sure what’s in hello.fbx – I inherited it from a researcher with whom I’m working so it’s a mystery to me too. (It’s strange indeed in Blender.)

That said, I understand the file was created by dancers in a motion capture studio, and I believe the specific software used to create the file was a combination of Vicon Shogun Live and Shogun Post.

Along with these files, I also received files with extensions: .enf, .mcp, .vdf, .x2d. I’ve never worked with any of these file formats, and all appear to be binary, but I can send any that might be helpful. Some of these may contain duplicate data in different formats…

If you have any hunches, I’d be very grateful for your thoughts.

I’m not familiar with the other formats in that list, sorry. If you need to fit the animation to a character mesh and have any sort of high-performance rendering, I think you’ll need to do some fairly manual processing in Blender instead… I can’t see an obvious way to turn it into a THREE.SkinnedMesh instance, as-is. Autodesk software like Maya or 3DS Max may be able to load and export to other formats, they presumably have better FBX support than Blender.

If you can settle for just playing animation data back, as-is, you can get by with some hacks:

  1. Convert the model with FBX2glTF. (you might be able to skip this step, depending on what FBXLoader supports? But in any case this reduces the file size by 70%).
FBX2glTF -i hello.fbx -o hello -b
  1. Load with GLTFLoader. Because the model contains no mesh data, add some geometry:
var loader = new THREE.GLTFLoader();
loader.load( 'hello.glb', ( gltf ) {
  var model = gltf.scene;
  var nodes = [];
  var geometry = new THREE.SphereBufferGeometry(0.5);
  var material = new THREE.MeshStandardMaterial({color: 0xff0000, metalness: 0});
  model.traverse( ( o ) => nodes.push( o ) );
  nodes.forEach((o) => {
    o.add( new THREE.Mesh( geometry, material ) );
  scene.add( model );
  var animation = gltf.animations[ 0 ]; // THREE.AnimationClip
  // ...
} );

The result looks a bit messy, as in Blender, but at least the animation is there:


EDIT: You should also be able to look at the names of the nodes and clean up the nodes that aren’t from characters, it seems organized enough.


@donmccurdy you are a prince among men. Thank you!