WIP: Dae-animation support
This MR implements a basic bridge for osgAnimations(dae) to OpenMW in the most format-agnostic way possible. Took a while to figure out what goes where, and this is the first system that works. I haven't given any thought to optimization, just tried to make one simple thing that works.
Issues of this MR:
- Currently, the root bone of object has to be named "root". If root bone with this name isn't found, the game crashes.
- The BasicAnimationManager is currently found only for model with a similar structure as Seymour.dae, it might or might not work for other models.
- There are sometimes errors when loading models, result is marker_error. This happens when loading a save with a dae-model that wasn't there during the save (loading from memory with istringstram). This is likely related to OpenMW vfs using relative paths, and Collada plugin only accepting URI-paths.
- Collada models only accept "file" URI-paths for textures, this is an OSG limitation.
- Relative paths for image textures don't work with OpenMW's vfs yet.
- Animated characters can't move in the world yet, possibly related to world translations
- Bounding box support in files is not tested/researched
Related to this subject, I'm not sure what to do next. It's probably a good time to give some feedback. Is this approach good in the first place?
For dae-format, OSG probably requires this commit to work: https://github.com/unelsson/OpenSceneGraph/tree/nameboneandskeleton
- my current implementation relies on names of objects, this is one way of fixing the object naming it the dae-plugin
- I understood there's something with plugin options not getting properly passed in OSG dae plugin, but I haven't had time to investigate this