Page 9 of 14

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 12 Jun 2020, 15:00
by AnyOldName3
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

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 12 Jun 2020, 23:02
by unelsson
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.

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 29 Jun 2020, 23:08
by unelsson
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

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 30 Jun 2020, 19:37
by silentthief
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

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 01 Jul 2020, 07:38
by unelsson
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.

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 01 Jul 2020, 08:37
by psi29a
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?

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 01 Jul 2020, 11:44
by unelsson
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.

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 01 Jul 2020, 13:26
by AnyOldName3
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.

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 02 Jul 2020, 15:10
by unelsson
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?

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 04 Jul 2020, 12:02
by psi29a
Going to post something in your MR...

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