OpenGEX as .Nif alternative for OpenMW

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
AnyOldName3
Posts: 1875
Joined: 26 Nov 2015, 03:25

Re: OpenGEX as .Nif alternative for OpenMW

Post by AnyOldName3 » 12 Jun 2020, 15:00

This is documented, just as an OSGT/OSGB thing rather than mentioning it applies to all non-Nif formats: https://openmw.readthedocs.io/en/master ... tive-files
AnyOldName3, Master of Shadows

unelsson
Posts: 181
Joined: 17 Mar 2018, 14:57

Re: OpenGEX as .Nif alternative for OpenMW

Post by unelsson » 12 Jun 2020, 23:02

I'm aware of the naming scheme, but...

"The first texture unit automatically acts as diffuseMap if no recognized type is specified."

This didn't work with dae, also texture name was not properly read to OpenMW, but was "" instead. Additionally, only file URI scheme is recognized for images (OSG plugin limitation), so collada textures need full path instead of relative references like "textures/tex.dds" . I'll look into these things later.

unelsson
Posts: 181
Joined: 17 Mar 2018, 14:57

Re: OpenGEX as .Nif alternative for OpenMW

Post by unelsson » 29 Jun 2020, 23:08

Some related work here:

generic osgAnimation support
https://gitlab.com/OpenMW/openmw/-/merge_requests/252

osg dae-plugin fix with naming of bones and skeleton
https://github.com/unelsson/OpenSceneGr ... ndskeleton

silentthief
Posts: 430
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: OpenGEX as .Nif alternative for OpenMW

Post by silentthief » 30 Jun 2020, 19:37

Calmly reading this:
unelsson wrote:
29 Jun 2020, 23:08
Some related work here:

generic osgAnimation support
https://gitlab.com/OpenMW/openmw/-/merge_requests/252

osg dae-plugin fix with naming of bones and skeleton
https://github.com/unelsson/OpenSceneGr ... ndskeleton
Still calm.

Does this mean we may be looking at a *working* expansion of 3D formats so as not to be reliant on the old gamebryo NIF file format?

ST the calm
PS - if this is true, then I won't be calm, I'll be cheering loudly. Just not sure if I understand that properly or not
"You like to dance close to the fire, don't you?."

unelsson
Posts: 181
Joined: 17 Mar 2018, 14:57

Re: OpenGEX as .Nif alternative for OpenMW

Post by unelsson » 01 Jul 2020, 07:38

silentthief wrote:
30 Jun 2020, 19:37
Does this mean we may be looking at a *working* expansion of 3D formats so as not to be reliant on the old gamebryo NIF file format?
Yes - 3d models and animation with Collada/dae works, and "grep -R BasicAnimationManager" hints that the same method might work with bvh, gles, osgjs, and fbx. If so, it could be just a matter of "flipping a switch". And whatever future osg plugins will support with similar methods.

No - as of now, the MR is still WIP, and has limitations. There is still work to do in connecting the animations to the game. For example, with the Collada test files I'm using, animated characters can't yet move, it's unknown whether bounding boxes will work, and if the root node isn't named "root" the whole game will crash. For various reasons, this MR is not (yet) ready for merging or actual production use, and it might be necessary to cut this integration work into multiple smaller pieces.

User avatar
psi29a
Posts: 4880
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 » 01 Jul 2020, 08:37

Can have a pre-flight check to see if the root bone is indeed 'root'?

At some point we have to tell modellers that this is a requirement for animation. OpenMW makes a few assumptions as a start, so we could ask modellers to also do the same if they wish to see their work working in OpenMW?

I'm pretty sure that models are 'agnostic' meaning that they can be rigged however they care, but they need to modify them anyway on a per game basis since each game engine probably requires something different?

unelsson
Posts: 181
Joined: 17 Mar 2018, 14:57

Re: OpenGEX as .Nif alternative for OpenMW

Post by unelsson » 01 Jul 2020, 11:44

psi29a wrote:
01 Jul 2020, 08:37
Can have a pre-flight check to see if the root bone is indeed 'root'?

At some point we have to tell modellers that this is a requirement for animation. OpenMW makes a few assumptions as a start, so we could ask modellers to also do the same if they wish to see their work working in OpenMW?

I'm pretty sure that models are 'agnostic' meaning that they can be rigged however they care, but they need to modify them anyway on a per game basis since each game engine probably requires something different?
Something like this, requirements, but in overall a simple way to get stuff in OpenMW:
1) Build a model with certain requirements (e.g. root bone named "root")
2) Press export from Blender
3) Copy the exported .dae to meshes/ and textures to textures/ folders
4) Add models to game with OpenMW-CS, set up AI etc. game-related
5) If there is a wrong kind of model, there is a console error message that tells what's wrong

But to get various formats to work, there is an extra step of getting the correct kind of OSG, built with the kind of plugins that are wanted. I wonder if this step could be made easier? I'm currently building a custom OSG during the development phase, but this can't be the solution for most people.

User avatar
AnyOldName3
Posts: 1875
Joined: 26 Nov 2015, 03:25

Re: OpenGEX as .Nif alternative for OpenMW

Post by AnyOldName3 » 01 Jul 2020, 13:26

When we actually have stuff in master that uses the other plugins, we can just build those plugins in the OSG we provide for Windows/in our PPA etc. That'll cover it for most people.
AnyOldName3, Master of Shadows

unelsson
Posts: 181
Joined: 17 Mar 2018, 14:57

Re: OpenGEX as .Nif alternative for OpenMW

Post by unelsson » 02 Jul 2020, 15:10

We need a logic for standard structure of dae/whatever models with animation. How does the system know which is the "root node", the base of everything... Is there a good standard for this? What is the easiest and most foolproof way?

Options that come to my mind:
1) "the first node" in visual scene group must be a osg::MatrixTransform that handles also instance movement (e.g. walking). It seems that this is a logic used by nif, is this also a wider standard for animating characters?
2) the node has to have a special name (e.g. "root").. How do we set the MatrixTransform for instance movement in this case?

User avatar
psi29a
Posts: 4880
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 » 04 Jul 2020, 12:02

Going to post something in your MR...

https://gitlab.com/OpenMW/openmw/-/merge_requests/252

Post Reply