Page 3 of 14

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 14 Aug 2017, 23:48
by AnyOldName3
Well, I've finished learning the series of OSG tutorials I was looking at now. Maybe making an OSG plugin for that might be a good project to do.

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 15 Aug 2017, 02:00
by Wolvman
+1 from me if that helps to sway the vote any. Nif files are the bane of my existence. I'd be jumping into model development far more often if we had a better file format to work with.

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 15 Aug 2017, 17:56
by psi29a
That sounds wonderful and the right way to go. Creating and maintaining an osg plugin helps not just OpenMW...

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 25 Aug 2017, 13:02
by scrawl
After seeing Eric's comparison of OpenGEX vs. glTF, I wanted to add NIF and .osg to that comparison. The result can be seen here. I wrote this off the top of my head, so there may be some mistakes.
Open Game Engine Exchange.html.zip
(9.31 KiB) Downloaded 301 times

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 25 Aug 2017, 13:08
by psi29a
Nice work, have you asked to see if this gets included?

Can this be published to our wiki or in our documentation?

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 25 Aug 2017, 14:35
by AnyOldName3
Right, so we design a binary representation of OpenGEX, and then we have everything we could ever want for OpenMW until someone makes a new game or total asset replacement using PBR.

In the event that I start meddling with this, is it a better idea to make it something OSG can load or something OpenMW can load?

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 25 Aug 2017, 15:16
by scrawl
Right, so we design a binary representation of OpenGEX, and then we have everything we could ever want for OpenMW until someone makes a new game or total asset replacement using PBR.
Unfortunately, none of these aspirings standards seem to include support for particles, so we'd still need NIF/OSG for that. It would also be nice to have some form of user data in these formats, in the event that we want to add tags for engine-specific stuff.
In the event that I start meddling with this, is it a better idea to make it something OSG can load or something OpenMW can load?
Probably the latter, as we don't use the OSG animation system. Once we have such plugin, it should be possible to port it over to "plain OSG" if needed. (If we skipped animations, the OMW vs. OSG version would be identical)

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 26 Aug 2017, 12:34
by Br0ken

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 02 Sep 2017, 10:10
by scrawl
For what it's worth, commits 209e139aa89015cad87b39dc160f9a5af0998040..5e790b567e460de29bea43ec5410822db58a6e57 greatly streamlines the animation component so it should be easier to write an <insert format here> importer or extend the .osg format. Here's roughly how I'd do it:

- Move KeyframeController out of nifosg into a component (e.g. sceneutil) and make it not depend on NifOsg::NodeUserData
- Add support for other types of keyframes as needed
- Move TextKeyMap out of nifosg into a component

At this point we could start writing importers or exporters.

As for extending the osg format, one might be able to pick up some of the pieces of https://github.com/OpenMW/openmw/pull/844 , or use it as an example.

Another issue is providing a separate collision mesh. We could use a separate file for that or use tags in the visual file to denote a mesh as a collision mesh. Aside from collision meshes it would be nice to support shapes (e.g. MultiSphereShape) because they're much faster to process than triangle meshes. I believe bullet's btWorldImporter has a file format but I haven't really looked into how usable it is.

Re: OpenGEX as .Nif alternative for OpenMW

Posted: 02 Sep 2017, 12:36
by psi29a
Nice work Scrawl and thank you for getting us this far! :D