capnmidnight/Primrose

Support skinned and animated models

Closed this issue · 0 comments

Model files in Primrose are static and do not animate their sub parts. You can move the model around manually, but you can't animate a timeline in Blender, export that model, and have the animation play in Primrose.

This will require researching different model formats that we can use in Primrose. Currently, Primrose only works reliably with Wavefront OBJ, but OBJ is not animatable. Options include:

  • FBX - though Three.js' support is not very good right now, as the latest version of Blender does not support the latest version of the ASCII format, and Three.js does not support the Binary format.
  • glTF - a newer format designed for the web, I'd like to prioritize this format in general.
  • Three.js JSON - This will work the most reliably, and it might work for eventually exporting out scenes created in Primrose in the live programming environment, but it will also have the least tools support amongst existing 3D modeling packages.
  • Collada - There is a lot of support for Collada out in the world, but Collada is not ideal for the web. It's a very verbose and thus large file format. It's also somewhat ideosynchratic. There have been some issues with compatability between Blender's exports and Three.js' imports of Collada in the past as well, though that may have been fixed by now.
  • STL - STL is not animatable, but as long as we're talking about model formats, we might as well talk about STL. It is used primarily in 3D printing. As such, there are a lot of models available in the wild, freely downloadable, that people may want to use.

We should support all of these formats as much as we can. The other loader formats just aren't supported that well and don't have that much usage in the wild. In those cases, it's probably better for users to export their model to FBX or glTF.