Oblivion
NorthernUI - progress update - late-February

Image information

Added on

Uploaded by

DavidJCobb

About this image

I've gotten a lot of work done since the last time I posted an image here. I'll go over all the lovely details.

First, some background knowledge.
Oblivion defines its menus in XML: the layout and structure can all be easily altered without tampering with the executable or using the Construction Set. Objects in menus are called tiles and have traits, which define attributes such as their position. A trait's value can be a raw constant or a set of operators, which direct the trait to copy values from elsewhere and perform mathematical or other operations on them. The most common use cases by far are things like having one tile set its y trait to some other tile's y trait, plus that tile's height, to position the former tile below the latter.

Oblivion's user interface is actually rendered in 3D. Every object in the menu has a flat shape constructed for it at run-time, and images are UV-mapped to these shapes. This means that some of Oblivion's graphics settings (particularly MSAA) actually apply to the interface, and that graphics in the interface have to have texture filtering used on them.

Fixed texture filtering
Oblivion has a strange bug with its user interface. By default, it uses bilinear interpolation for texture filtering, but for some reason, this causes many textures to look muddy or dithered. High-resolution textures look blurred and pixelated when scaled down! It turns out, if Oblivion is applying texture filtering to the menu cursor, then filtering breaks for all other textures in the UI. This isn't a one-time thing, either: I wrote a patch to toggle cursor filtering on and off, and the glitchiness toggled on and off with it. Disabling texture filtering is enough to resolve the issue (at the cost of making the cursor look jagged and slightly distorted at all times) and allows the use of high-resolution graphics. I can also design graphics quicker now: I don't need to anti-alias by hand because in many cases, downscaling allows the game's texture filtering to do that indirectly.

Improved existing graphics
I took advantage of the texture filtering fix to replace several graphics with higher-resolution versions. The new graphics are also better-drawn; early drafts had very basic mistakes caused by a lack of attention to detail when I was just starting the project. (At that stage it'd mainly been a proof of concept.) So far I've retroactively improved the compass, HUD meters, buttons, scrollbars/sliders, and boxes, and I'll show off the latter two in another upload.

Reskinned most of the pause menu
That'll be in another image. I've gotten the options submenus. Saving, loading, and the control remapping menu are all still vanilla.

Added new operators
NorthernUI patches trigonometric operators into the UI: tile traits can now use the sine, cosine, tangent, and atan2 functions, which means that things like radial positioning can now be coded entirely within the XML given an angle input to work with.

I tried adding string operators, but there's a bit of a flaw there. Operator data in memory doesn't have a place to store strings being worked with, and the parser doesn't try to store strings in most operators anyway. My string operators do work, but they don't have anything to work with. The game supplies them with a string consisting of a single space, so the string equality operator always returns true (a string with one space is always equal to itself) and the string append operator always returns two spaces.

Added new HUD widgets
A few days' worth of R&D has made it possible for me to define separate menus that function in tandem with the existing HUDMainMenu. This allows me to add self-contained, compartmentalized HUD widgets. So far, I've added an in-game clock heavily inspired by A Matter of Time. (AMoT's semicircle clock just uses Skyrim's box corners for its endcaps, rotated forty-five degrees, and the clock design itself is blatantly inspired by The Legend of Zelda: Majora's Mask. The author knew what to copy and where, to make a widget that fit seamlessly in Skyrim. That's good.) The clock widget was the reason I patched in those trigonometric operators mentioned earlier.

Very, very preliminary gamepad support
NorthernUI patches Oblivion's input system, replacing the (crappy) vanilla joystick input with code that uses XInput to accurately work with an Xbox 360 controller. Why does a UI mod do this? Why not use Xpadder or AntiMicro? Because if I mod it, then I can give you menu support.

Oblivion allows menu authors to specify that pressing a gamepad button should act on some tile in the menu, e.g. giving it keyboard navigation focus or "clicking" it. That all still works in the PC version of the game... except that the game never actually checks for that input. Tools like Xpadder and AntiMicro can't add that in -- you have to switch to your keyboard and mouse for every menu -- but NorthernUI patches those input checks in, so the menus are cleanly usable in exactly the way a designer intended. Vanilla and mod compatibility should be retained: the XML-facing values such as &xbox; (used to check whether the game is running on Xbox) still equate to "false." NorthernUI does allow traits to query data from a custom source, and updates that custom source to indicate whether any gamepad is connected and available; the main use for this is for menus to show clickable buttons or gamepad button mappings as appropriate.

Aside from that, basic gameplay functions are set up (default control mappings resemble Halo's "Bumper Jumper" scheme, which I use personally). Remapping is not possible at this time. Not all gameplay and menu functions are accessible; Quick Keys are notably unusable on gamepad (I hope to add a Skyrimesque Favourites menu), and menus that had hardcoded gamepad input handlers (particularly MapMenu's map cursor) will probably need those handlers reconstructed from scratch (since they likely weren't compiled into the PC binary).

5 comments

  1. Vrugdush
    Vrugdush
    • supporter
    • 30 kudos
    This is looking very nice. Quite crisp indeed, and the widget looks lovely.

    I was wondering; could the fixed texture filtering benefit other user interfaces, such as the Vanilla UI or DarNified UI?

    If so, would you please consider releasing a standalone version of your cursor texture filtering toggle patch?

    Also, you only mention bilinear filtering. What if a user forces the game to use trilinear or anisotropic filtering? Would your fix still be noticeable?
    1. DavidJCobb
      DavidJCobb
      • premium
      • 366 kudos
      The texture filtering fix should work for everything. I'm trying to design the mod so that the DLL won't on principle interfere with the vanilla UI. I can't 100% guarantee that modded UIs will be compatible; the DLL patches the game to supply additional information to the UI, and modded designs may already be using the XML variables that the DLL supplies values to.

      IIRC trilinear interpolation doesn't seem to make a noticeable difference. Anisotropic filtering is a different thing (and would be applied to the entire UI, I believe, since the UI is a 3D scene).
    2. Vrugdush
      Vrugdush
      • supporter
      • 30 kudos
      Thanks for the reply. Sounds like this could potentially be useful for people who prefer to stay with Oblivion's UI design, then. I've often found the fonts to be a bit too blurry for my tastes. Maybe this could help...

      Oh, and I love what you've done with the HUD. For the menus though, I personally prefer Oblivion's design, with the parchment background, to Skyrim's, and NorthernUI's, more translucent one. Still, this is some mighty impressive work.
  2. maczopikczo
    maczopikczo
    • member
    • 206 kudos
    I don't understand about a half of the words you used here, but strangely it makes me feel reassured you're the right person to tackle that UI - someone who knows what he's doing. :) Nice graphical choices you've made for this mod, too.
  3. nooonemusteverknow
    nooonemusteverknow
    • supporter
    • 14 kudos
    Wow! Impressive work - can't wait to give it a go :)