OpenMW 0.37.0 (?)

Anything related to PR, release planning and any other non-technical idea how to move the project forward should be discussed here.
User avatar
sandstranger
Posts: 438
Joined: 19 May 2014, 19:53
Location: Oblivion

Re: OpenMW 0.37.0 (?)

Post by sandstranger » 20 Nov 2015, 12:46

d
Last edited by sandstranger on 18 Jan 2018, 16:20, edited 1 time in total.

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: OpenMW 0.37.0 (?)

Post by scrawl » 20 Nov 2015, 17:07

Scrawl, I saw you added a native mesh format for OSG. Could you talk a little about that?
*Is it native to OpenMW or to OSG? Anything interesting about the format?
I didn't come up with a new format, I just restructured the engine a little so it can load the existing OSG serialization format in addition to NIF's. Technically it's native to OpenMW and OSG, since OpenMW uses OSG for the scene graph.

There are multiple variations of the format: text, XML, and binary. Usually, you'll export your mesh to the text format first so that it's easy to inspect and make manual adjustments if needed, then when done you'll convert it to binary so that the file is smaller and faster to load. You can convert back to text if you need to go back to make adjustments. This is all done with the osgconv tool.

The format supports pretty much all nodes that OSG has to offer (geometry, materials, shaders, LOD, animations, particles, terrain, volume rendering, etc.). Not all these features can be exported straight from blender (or even have equivalents in Blender for that matter), but you can always open the exported scene in text format and make manual additions if need be.

The format is extensible (much like NIF's are), so we can add custom nodes we are using in OpenMW (like the custom animation system) to the format. Of course we would also need to adjust the exporter to use these new node types. For simple custom nodes (e.g. texture controllers) it may be feasible to just add them to the model in a text editor. Note that once we have "extended" the format it is still the same core format, just with node contents that the osgconv tool won't know how to read. We'll need to create a new plugin library containing the wrapper classes for our custom nodes, place that plugin in the OSG plugin path and then osgconv would work with the extended format.

Technically speaking, we could also load any mesh format that OSG has a plugin for - and there are quite a lot of those: 3ds, collada, etc. However as far as I'm concerned these formats are not officially supported by OpenMW, nor recommended, for a couple of reasons:
- More formats means more potential for bugs and more support overhead.
- Whether or not a plugin has been built depends on the person compiling OSG. Some plugins (like Collada) depend on external libraries, so they're not built by default. This creates an unfortunate situation where some builds of OpenMW would have support for different mesh formats than other builds.
- Some format plugins cross-reference files in an unsupported manner. For example, .obj files reference a .mtl file of the same name. The .obj plugin for OSG tries to open that file from the filesystem, which will not work since we are using a virtual file system where files could be contained in BSA or ZIP files. (In contrast, file references in .osg files work fine with the virtual file system, because they go through the osgDB::ReadFileCallback rather than directly opening a file).

A better approach to handle such files (if you really need to) is to convert them "offline" to the osg format with osgconv. http://www.openscenegraph.org/index.php ... 55-osgconv
*Who, besides our project is maintaining it?
Robert and the OSG contributors are maintaining the format, in a backwards compatible manner so we should have no issues upgrading to newer versions. The format is continuously updated to add and improve support for new osg features.

Cedric Pinson and contributors are maintaining the Blender exporter on github. All I did was a minor change to make the exported graph more efficient, so use my fork until that pull request is merged.
*Are we able to use all Blenders past 2.6? I know the Blender team is moving on to 2.8 now, so what about 2.7?
Don't know. Just try out those versions and report back. There may be minor changes needed to adapt to new Blender API's.
*How about 3dsMax or Maya?
Programs with astronomically priced licenses are not something we can officially support, so these users will be on their own. I don't know if OSG exporters for these programs exist. But you can always export to blender first and from there to OSG.

corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: OpenMW 0.37.0 (?)

Post by corristo » 20 Nov 2015, 22:00

@scrawl
Is the map black?
It's black.
Does the map appear if you enter "ToggleFogOfWar" in the console?
Yes, it does.
Any errors in the log file?
Yeah:

Code: Select all

Failed to read fog:  code 2
Failed to read fog:  code 2
Failed to read fog:  code 2
Failed to read fog:  code 2
Does the map work on new games (maybe it breaks when a savegame is loaded)?
Same behaviour for brand-new saves & for my existing saves.

Am I right that it has something to do with existing image reading issues on OS X?

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: OpenMW 0.37.0 (?)

Post by scrawl » 20 Nov 2015, 22:35

Am I right that it has something to do with existing image reading issues on OS X?
Judging by the "failed to read fog: " message, probably so. But the reading only happens when loading a save game. This is why I thought the fog should work for new games. Are there error messages on a new game?

Regarding the image reading issues, I guess it's either an issue with reading files from memory, or an issue reading JPG and PNG files in general. I think JPG and PNG are only used for the screenshot & the local map, MW uses DDS textures everywhere. Which ReaderWriter is it using by the way? The png / jpg readerwriters or that OS X specific coreImage?

charlieg
Posts: 50
Joined: 30 Jun 2015, 14:17

Re: OpenMW 0.37.0 (?)

Post by charlieg » 20 Nov 2015, 23:38

scrawl wrote:There are multiple variations of the format: text, XML, and binary. Usually, you'll export your mesh to the text format first so that it's easy to inspect and make manual adjustments if needed, then when done you'll convert it to binary so that the file is smaller and faster to load. You can convert back to text if you need to go back to make adjustments. This is all done with the osgconv tool.
You mean revert, right? Nobody in their right mind would edit in text, convert to binary and delete/not-keep-a-copy of the text format and then convert the binary back to text (presumably losing all formatting plus assuming the text->binary->text process is lossless).

User avatar
psi29a
Posts: 4881
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: OpenMW 0.37.0 (?)

Post by psi29a » 21 Nov 2015, 08:51

And yes, that is what people do... right in the head or not. ;)

User avatar
lysol
Posts: 1430
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: OpenMW 0.37.0 (?)

Post by lysol » 21 Nov 2015, 22:45

Soooo. It's saturday raevol :roll: Sucks being in UTC +1 when the release guy is in, I don't know, UTC -185. It feels like raevol is in UTC -185. At least right now.
Normal mapped texture replacers, exclusive for OpenMW:
My Nexus page

User avatar
raevol
Posts: 3085
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: OpenMW 0.37.0 (?)

Post by raevol » 21 Nov 2015, 23:52

Changelog is about halfway done. -_- holy CRAP this one is long.

I should be able to finish this tonight or tomorrow, but then we still need to review the log, review the release packages, and get it pushed out. How are the RCs looking btw? I see a lot of posts about issues here but I am having a hard time keeping track of where we actually are with this...

corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: OpenMW 0.37.0 (?)

Post by corristo » 22 Nov 2015, 11:19

@raevol
there're two known issues for OS X:
  • saved game previews are not displayed
  • local map is black unless you run ToggleFogOfWar in console
Well, technically it's the same issue me & scrawl were discussing, but from user-perspective it's definitely two separate.

@scrawl
Are there error messages on a new game?
Nope, doesn't work even in a new game without save game loads. OSG still uses ImageIO plugin, and PNG plugin is disabled on OS X on purpose. I'll look into it before next release.

UPD: funny thing is, tga is being used for Fog, and ImageIO shouldn't interfere here at all...
UPD2: found

Code: Select all

supportsExtension("tga",   "tga image file");
in ImageIO plugin, that should explain it ¯\_(ツ)_/¯ That's still weird though. TGAs from files are loading just fine (save game loading splash screens,for example).

Also found out that we're using png for global map overlay & tga for local map fog.

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: OpenMW 0.37.0 (?)

Post by scrawl » 22 Nov 2015, 15:31

in ImageIO plugin, that should explain it ¯\_(ツ)_/¯ That's still weird though. TGAs from files are loading just fine (save game loading splash screens,for example).
Problem is when loading from memory, the readerwriter isn't given a filename, so can't guess what type the file is. This isn't an issue when the readerwriter is only meant to handle one particular filetype, but the imageio plugin supports many files types. Ideally they could check the mimetype of the file, I guess apple hasn't implemented that. https://github.com/openscenegraph/osg/b ... O.cpp#L174

I think we'll have to disable imageio plugin and use the native tga / png / jpg plugins.

Post Reply