OpenGEX as .Nif alternative for OpenMW

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
unelsson
Posts: 227
Joined: 17 Mar 2018, 14:57

Re: OpenGEX as .Nif alternative for OpenMW

Post by unelsson »

While Collada works now for statics, and basic animation support is there, there are still a few details that are missing that prevent fully replacing base animations. That combined with lack of alpha testing (and also lack of alpha to coverage), and the issues with bone names, especially that Collada 1.4.1 doesn't support bone names with spaces, it makes FBX and glTF 2.0 more and more tempting.

Issues common to all alternative formats:
- base_anim files are hardcoded to nif -> This can be easily changed, but requires an option at config file or an ESM-expansion.
- no option to define text keys other than "start" and "end" (how to implement this is format-specific or requires OpenMW-specific txt file)

Collada issues currently:
- Only 1.4.1 with PROFILE_COMMON is supported. Bone naming can't take spaces, and this breaks all animations that have bone names starting with "bip01 " unless a workaround is devised. This workaround isn't in master yet.
- lower and UPPER case matters in bone/node names and channels, and this seems to conflict occasionally with animation logic of OpenMW.
- No alpha testing
- Supporting 1.5.0 and other profiles requires extensive work with Blender's Collada exporter as well as OSG

FBX issues currently:
- Lack of ReadNode-method to read from memory via std::istream
- OpenMW animation bridge is missing, probably could be connected easily to RetrieveAnimationsVisitor.

glTF 2.0 issues:
- No OSG plugin that supports animations is available at this stage
- OpenMW animation bridge is missing (OSG plugin has to exist first)
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: OpenGEX as .Nif alternative for OpenMW

Post by psi29a »

FBX is already supported in OSG, so in theory... the work done on collada should also enable FBX support in OpenMW

We'll have to write out own glTF plugin for OSG I'm afraid. That will be non-trivial work, but it would be a great way to get into learning both OSG and glTF.

https://github.com/KhronosGroup/glTF/tr ... cation/2.0 (spec)
https://github.com/urish/gltf2 (tools)
https://github.com/syoyo/tinygltf (header only gltf 2.0 support)
https://github.com/syoyo/tinygltfloader (header only gltf 1.0 support, with working osg plugin)

For the really ambitious, there is also https://www.assimp.org/ which could be used to get a lot more bang for the buck... so either we support assimp directly, or we shoehorn it into OSG.
https://learnopengl.com/Model-Loading/Assimp
Lamoot
Posts: 176
Joined: 22 Apr 2016, 12:03

Re: OpenGEX as .Nif alternative for OpenMW

Post by Lamoot »

Judging by how things are developing, I'd say COLLADA is currently the best candidate for .nif replacement. From all the possible candidates so far it's the most functional one. Static and animated models now work and I'm optimistic we can figure out any remaining issues (famous last words?).

I documented the workflow / pipeline with information we figured out with unelsson. As all things, it can always be improved, but should be a decent start. https://openmw.readthedocs.io/en/latest ... llada.html
User avatar
AnyOldName3
Posts: 2667
Joined: 26 Nov 2015, 03:25

Re: OpenGEX as .Nif alternative for OpenMW

Post by AnyOldName3 »

It's a text-based interchange format, so is fairly slow to parse. I wouldn't like to make a AAA-quality game with Collada assets as you'd be waiting in load screens for eons.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: OpenGEX as .Nif alternative for OpenMW

Post by psi29a »

Collada is great as an exchange format, we're still better off with the binary osg format for faster loading. Sadly no animation support.

glTF2 is still the way to go for that.
Lamoot
Posts: 176
Joined: 22 Apr 2016, 12:03

Re: OpenGEX as .Nif alternative for OpenMW

Post by Lamoot »

Wasn't aware of the slow loading issue with COLLADA. It's a valid argument against the format and I'll mention it in the documentation.

I should elaborate on my previous post some more. In an ideal situation I'd be happy to use glTF2 and I'm looking forward to when that'll be possible. So far though, COLLADA is the only format with a proper pipeline and I don't see this changing in the near future (1-2 years).
  • glTF2 needs to be implemented engine-side with no guarantee when that is going to happen. Otherwise the format has good presence in the wider 3D industry and has a good Blender exporter.
  • OSG native works in OpenMW. I don't see a problem it's for statics only as it can be combined with formats that support animations. The two main issues I see are lack of custom collision shapes and even more so, the old exporter for Blender https://github.com/cedricpinson/osgexport It doesn't work beyond Blender 2.79 which came out 3.5 years ago.
I'm not advocating for COLLADA to be the .nif replacement we're after. It's more a realization it's the best asset pipeline we'll have for some time.
User avatar
AnyOldName3
Posts: 2667
Joined: 26 Nov 2015, 03:25

Re: OpenGEX as .Nif alternative for OpenMW

Post by AnyOldName3 »

Also, for the foreseeable future, non-Nif animations use DYNAMIC drawables, which delay the next frame until the current one's done drawing. Worst-case, that can halve the framerate.
Post Reply