Fundamentals 2015-07-28 - Okulo

Those who have the ability to build OpenMW from the OpenSceneGraph branch have probably already tried it. The new OpenMW is streamlined, fast and of course, most importantly, very functional. It’s not very pretty yet, though. The Ogre version has a bunch of shaders, including Scrawl’s own gorgeous “Shiny” shader which makes the water look incredibly good, but they couldn’t be easily ported to the OSG version. But that’s just eyecandy, and though that is one step back, it’s only temporary. Add to that the fact that with its huge progress in terms of speed and the many fixes that it brings, the whole OSG port represents three steps forward. In fact, it’s far along enough to be included in the next release. So get ready, 0.37.0 will be the version that brings OpenMW-OSG to the world!

At the time of writing, 0.37.0 closes a whopping 138 issues on our tracker. As mentioned in the last post by Scrawl, NPCs are finally the right size. Raindrops won’t make fire see-through anymore and fire no longer make stuff look black. Your followers also won’t be squealing when you touch something the wrong way, so no more “friends” ratting you out to the popo just because you took something that is technically not entirely yours.

Newcomer Kunesj has created a fun little extra that has been integrated already: the crosshair and tooltips can now show if something is owned or not. It doesn’t work as well as it should yet, so for now it requires editing some configuration files to enable and configure this feature, but it’s a good start to something that a lot of players will welcome.

There’s been some work on OpenMW-CS. NPCs should now have a whole lot more stuff for you to edit, including faction rank, level, skills, and the like. UI nags such as the starting size of the main window and a cancel button closing OpenMW-CS rather than returning to the last screen have been resolved. You can now also sort your search results, which should make the global search function even more useful than before. And, oh, bonus! – we also have a pretty colour picker now!

So as you can see, the team is marching on, but besides the engine and the CS, two other projects have seen the light of day.

For the first one we should give a shout-out to TravDark, the creator of Ashes of the Apocalypse mod, and Envy123, the creator of an unofficial expansion to AoA called Desert Region 2. These two creators have generously allowed their work to be expanded and revamped so that they can be run as stand-alone games on the OpenMW engine. To this end, content in these mods needs to be replaced, and such an effort has already started. In order to be stand-alone, however, it requires replacement of all assets made by Bethesda and work from other modders. That’s a ton of work and a solution needs to be found.

Which brings us to the other project: a bare minimum package for game developers. As OpenMW is merely an engine, it doesn’t only run Morrowind. To have a working game on OpenMW, you need some bare minimum files, such as a sky and some animations. Enter the OpenMW Game Template project, a project which aims to provide a minimum package to run OpenMW. Aside from being a good foundation for game developers to work off of, it’s also a fantastic test run for OpenMW. When people try to create their own game, they could run into all sorts of issues and with the tight connections the Game Template project has to the development team, these basic issues can be documented and/or resolved before they can get in the way of the developers of full-fledged games.

So there it is. Two new projects on the side, the CS getting expanded, and OpenMW proper switching to a whole new graphical engine with major fixes and speed as a bonus. Plenty to be excited about, even in this late stage of development!

Want to leave a comment?
Fork me on GitHub 2015-07-28 - Okulo - No pingbacks so far.

During the past three months, the OpenMW team has been hard at work porting their codebase away from the Ogre3D engine and towards the OpenSceneGraph rendering toolkit. The previous post talks about our motivations.

We are pleased to announce the porting efforts are finally bearing fruit – as in, all gameplay-essential features have been ported across, so users can enjoy a legitimate game of Morrowind in the OpenMW-osg development branch.

Some advanced features – shaders, distant terrain, shadows, and water reflections – have not been ported yet. However, even this early, it is safe to say the transition has been a massive success, in more ways than we initially imagined. Players will find the new OpenMW loads faster, improves framerate, looks more like the original game, and fixes a host of long-standing bugs that proved difficult to address within our old framework.

Hold on… improved framerate? Let’s put that to the test…

The first benchmark

Our test environment shall be:
GeForce GTX 560 Ti/PCIe/SSE2, AMD Phenom(tm) II X4 955 Processor × 4, Linux 3.13.0-24-generic x86_64
1680×1050, full screen, no AA, 16x AF, no water reflections, no shadows, no shaders
Maximum view distance as per the in-game slider

The testing scene: good old (laggy) Balmora

OpenMW OpenMW-osg
Framerate avg. 49 75
Loading time avg. 7s 3.4s
System memory avg. 344.6mb 277.1mb

Unsurprisingly, the OSG port wins on all three counts. The framerate improvement is decent, though still far short of the 3-4x improvement we saw in earlier tests with a single model. There is no reason to be concerned, however – you should take these numbers with a grain of salt:

  1. The comparison is unfair. New rendering features are included in the OSG branch, that bring us closer to vanilla Morrowind compatibility, but affect performance as well. For example, we now dynamically expand bounding boxes based on running animations, which fixes the infamous bug of cliff racers disappearing under certain angles (Bug 455), but is taxing on frame rate as well. Likewise, we have ditched static geometry batching, a performance optimization that was causing a multitude of issues, mainly incorrect lighting and scripted movement of objects not working. Even under all this new workload, the OSG port is still faster!
  2. Expect higher performance gains for advanced graphical features. The comparison was made with the minimum graphics settings, for the simple reason that the advanced settings (shadows, reflections, etc.) do not exist in the OSG branch yet. We expect that once those advanced features are ported, their impact on framerate will be much lower than before, simply due to the new renderer scaling a lot better with regards to GPU workload. Draw submissions are now offloaded to a worker thread, so the graphical complexity of the scene does not block the main thread from performing work in the meantime such as culling, physics, scripting, and animation.
  3. The real optimization phase hasn’t even begun yet. The main focus for now has been to get the game back to a playable state, and that only happened a few days ago. Now, there are plenty of optimization opportunities on the horizon. Our new rendering framework gives us more control over how the scene graph is structured, and how updates are dispatched, something we are only just starting to take advantage of. Planned optimizations in the near future include:
    • Move skinning updates to a worker thread.
    • Move particle updates to a worker thread.
    • Share state across different NIF files.
    • Enable culling for particle emitters/programs.
    • Integrate a model optimizer. Morrowind’s models unfortunately contain plenty of redundant nodes, redundant transforms, and redundant state, which impacts rendering performance. The original engine runs an “optimizer” pass over the models upon loading them into the engine. We should implement a similar optimizer pass. OpenSceneGraph provides the osgUtil::Optimizer that might prove useful for this very purpose.
    • Create a more balanced scene graph, e.g. a quad tree, to reduce the performance impact of culling and scene queries.
  4. Rendering is not the only bottleneck. Assuming an N times faster renderer would lead to an N times faster OpenMW is wrong. We have other systems contending for frame time, and now that our renderer is faster, these other bottlenecks are becoming ever more apparent. In particular, the physics and animation systems are currently the worst two offenders. Some preliminary optimizations for these systems have made it into the OSG port, but we have no doubts there is more room for improvement.

With that said, better performance is certainly not the only change users can look forward to:

Preliminary changelog

Rendering improvements

osg_scaling osg_transparency
NPC scaling comparison Transparency comparison

Re-designed NIF loader

Physics rewrite

New raycasting

Improved loading screen

Improved SDL2 support

SDL2, the library we are using for cross-platform input and window creation, has been more closely integrated with the rendering system. Practical benefits for the user include:

8x antialiasing in action

Profiling overlay

A nice side effect of using OpenSceneGraph is access to their top-notch profiling tools. With the ‘F3’ key, an on-screen overlay appears that shows more information with every key press.

Profiling overlay – the colored bars represent OpenSceneGraph’s internal threads, the white bars OpenMW logic

Passive fixes

The new OpenMW sports a unified OpenGL renderer on all our platforms. Rendering via Direct3D is no longer supported, easing the maintenance and support overhead for the OpenMW team.

Practically speaking, we have thus “fixed” Bug 2186 (garbage pixels on the minimap on Windows) and Bug 1647 (crash when switching to windowed mode on Windows).

Miscellaneous changes

Finally, we do have some bonus changes that are not strictly related to the OpenSceneGraph transition, but were committed to the OSG branch anyway in an effort to reduce merge conflicts:

osg_ui_scale_1 osg_ui_scale_2
Normal UI scale 2x UI scale, same resolution

Code maintenance / restructuring / cleanup

The codebase has considerably lost weight, which is likely interesting to developers, though not so interesting to end-users.

In total, ~23.000 lines of code were removed:

git diff upstream/master --shortstat
689 files changed, 24051 insertions(+), 47695 deletions(-)

What’s next?

Phew, that was a lot to take in – even at this stage, the list of improvements is massive, so our first priority should be to merge the port into the main branch, get our various nightly builds up and running again, then get a new release out.

Speaking for the longer term, we are not even close to unleashing the full potential of our new rendering engine. The next steps would be to further improve performance, then work on restoring shaders, distant terrain, water reflections and shadows. Our new NIF loader facilitates the implementation of background cell loading, which was originally planned as a post-1.0 improvement – now, it would be trivial to do, so we might see this feature pre-1.0 after all.

In the meantime though, on the graphics front, there is now nothing stopping us from releasing the long awaited OpenMW 1.0, so perhaps efforts should be diverted to fix the remaining OpenMW 1.0 blockers first, get version 1.0 out the door, then port the advanced graphical features for version 1.1. We might decide this on a case-by-case basis. In particular, the water reflections should be a lot easier to port than shadows, which weren’t working particularly well in the Ogre branch anyway.

If you have an opinion on the matter, feel free to comment. Though regardless of the priorities we decide on, these are certainly exciting times ahead!

Want to leave a comment?
2015-06-07 - scrawl - 2 pingbacks.

The OpenMW team announces the release of maintenance version 0.36.1. This version addresses a regression that caused additional startup scripts to fail to launch. Grab it from our Downloads Page for all operating systems.

Known Issues:


Want to leave a comment?
2015-06-05 - raevol - No pingbacks so far.
OpenMW 0.36.0 Released! 2015-05-29 - raevol

The OpenMW team is proud to announce the release of version 0.36.0! Grab it from our Downloads Page for all operating systems. This release is relatively small as we eagerly await scrawl’s rendering port to OSG. There are a multitude of important fixes for OpenMW-CS, which is progressing at a healthy pace. See below for the full changelog.

Known Issues:


Want to leave a comment?
2015-05-29 - raevol - One pingback.
Base-building 2015-04-17 - Okulo

As the feature list is getting shorter and shorter, our development team’s attention has been shifting towards issues that are a lot bigger than things like NPCs not doing what they are supposed to do.

Scrawl, for example, is slaving away at porting the project from Ogre3D to OpenSceneGraph, a relatively unknown but immensely flexible and expansive 3d engine which will not only allow OpenMW to run smoother than before, but also allows for better handling of materials and stitching the bodyparts of NPCs together (which is not nearly as gruesome as it sounds). Scrawl himself has told us about the what and why of OSG, and yes, I could tell you all that he is making good progress, but pictures speak louder than words.

It’s almost a throwback to version 0.13.0, but don’t worry; unlike the project way back when in 2012, much of the program is already in place right now, so we promise it won’t take three years to catch up. I mean, just between the time that I started writing this update and the time this got posted Scrawl got NPCs to render. Things are progressing fast.

Meanwhile, OpenMW-CS has been developing nicely as well. Our very own modding suite has gotten two more features that you have to see if you are a modder.

A plenty large code submission by cc9ii, based on some hard work by sirherrbatka, will give you access to stuff that you didn’t have access to before. Take NPCs, for example. Their settings were previously accessible only through the main table, but there are some things that were not contained therein. Selecting Edit record from the right click menu would bring up some more stuff to change (such as if this NPC would buy certain items), but cc9ii’s contribution expands that even further. By editing the NPC, you can now put stuff in his inventory, check out the paths they take while walking through the world, and much more.

Zini has announced with the proper fanfare that Global Search is now working. When confronted with a huge list of stuff, trying to find that lovely lime-ware platter from the Census and Excise Office is like searching for a needle in a haystack. Previously, it was possible to filter using a specific syntax, but why make it difficult? With Global Search implemented, you can instantly find that one object with nary a thought. What’s more, this global search function will be extended with a replace function, so you don’t have to edit all those potions one by one.

Finally, a bit of community stuff as well. Sterling of the Old School RPG YouTube channel has started his Let’s Play of Morrowind through the OpenMW engine. If you want to see how LPs are done or are just curious about how OpenMW runs in practice, go ahead and watch the first video below. Don’t forget to check out his channel afterwards for more content.

That it’s for this update. The team is ever active, and we can’t wait to tell you more in our next update. See you next time.

Want to leave a comment?
2015-04-17 - Okulo - No pingbacks so far.