OpenMW support for other games: Oblivion, Skyrim, Fallout and more

Feedback on past, current, and future development.
User avatar
Capostrophic
Posts: 794
Joined: 22 Feb 2016, 20:32

Re: Elder-scrolls IV Oblivion

Post by Capostrophic »

Exactly.
User avatar
Azdul
Posts: 12
Joined: 28 Dec 2018, 13:44

Re: Elder-scrolls IV Oblivion

Post by Azdul »

I've ported cc9cii code that reads BSA files from later Elder Scrolls chapters to current OpenMW engine.
https://gitlab.com/OpenMW/openmw/merge_requests/56

The code no longer depends on Ogre classes.
Please let me know what you think about it.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Elder-scrolls IV Oblivion

Post by psi29a »

Lovely... thank you so much!

Eyes will be on this for review. :)
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: Elder-scrolls IV Oblivion

Post by cc9cii »

Just a quick message to say that the new NIF code restructuring is making progress. The renders and physics are both working but some functionality has regressed in the rewrite (e.g. ragdoll and character animations) - I need to find time to get them included again. On the positive side I got vertex animations and node animations to work, at least for some objects.

I also note the good work being done by Azdul, so maybe this thing will actually go somewhere one day.
User avatar
Br0ken
Posts: 243
Joined: 02 Apr 2012, 05:54
Location: Siberia

Re: Elder-scrolls IV Oblivion

Post by Br0ken »

cc9cii wrote: 18 Jan 2019, 00:49 Just a quick message to say that the new NIF code restructuring is making progress.
Your latest videos are just amazing! So much progress! Don't ever think to stop. ;)
And thanks for your hard work!
ajira2
Posts: 55
Joined: 30 Oct 2017, 14:27

Re: Elder-scrolls IV Oblivion

Post by ajira2 »

Thanks for the progress on this cc9cii but please allow for comments on youtube videos, no?

A little bit more detailed description in the youtube video would be helpful for we people we can barely understand what is going on with this.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Elder-scrolls IV Oblivion

Post by psi29a »

Youtube is not a place for technical discussions, that is why this thread exists.
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: Elder-scrolls IV Oblivion

Post by cc9cii »

HI, I'll be happy to provide some commentary here if you're interested in some details.

Animated doors (and this):
Some doors in the newer NIF files have animations specified within the NIF. In contrast, OpenMW doors mostly (always?) work by rotating the whole door object. This was exciting for me (and hence decided to post the videos) because I had decoded how various records in the newer NIF files link together (without looking at Nifskope source files) to make the animations work. With the older NIF files they generally work by having all the keyframes baked in and various animations are just played back at different points in time.

Vertex Morph animations: This one is just using the Ogre Pose Animation feature. The tricky part is to have the animation configured at the time the meshes are created. OpenMW's vertex animations are done using Ogre::Controller instead, and at the mesh level (I've decided to do it at sub-mesh level). Well, not sure how they are done now since OpenMW has moved on from Ogre a very long time ago.

Character animations:
There are several challenges with this. Firstly, the character models have to be created. They are put together using various body parts (hair, eyes, head, tails as well as armor/clothes). Some body parts are "skinned" while others are simply attached to bones. The ESM/ESP may specify where to find some of these but sometimes the logic seems to be simply hard-coded in the original engine.

Next, Ogre has a limitation(?) where sharing a skeleton instance requires the meshes to be using the same underlying skeleton template. You can imagine a pair of boots being worn by an Imperial as well as an Argonian - but they have different skeletons! So the boots have to be created for each of the target skeletons. Now, we don't want to re-create the meshes each time (they are cached at a resource manager) so there's a bit of complication on managing these. For now I'm simply encoding an additional string onto the skeleton names.

Finally, with the new NIF, almost all the animations are specified in separate ".kf" files. To do this the links between the various NIF records have to be established from another file. Nifskope does this by simply grafting the whole animation tree onto the skeleton but that seems to take a long time. The current implementation is done similar to the old OpenMW way where Ogre::Controller is created for each of the NIF controllers. This might not be ideal, and possibly have to be reviewed at a later point in time.

(to be continued in another post...)
Last edited by cc9cii on 18 Feb 2019, 21:40, edited 1 time in total.
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: Elder-scrolls IV Oblivion

Post by cc9cii »

Head tracking:
This is just an existing feature of OpenMW but the code had to be tweaked a little to get it working again. I think FO3 and/or Skyrim actually specify head tracking in some ESM/ESP records but I'm not sure of the details.

Leveled Creatures:
Creatures' skeletons and body parts are specified a little differently NPCs. So the work here is less with the new NIF formats but to interpret the new ESM/ESP records. For example leveled creature record may specify a creature record or another leveled creature record. Selecting the right one requires some logic (including the player's current level). The NIF animations themselves work the same way as character animations - although there's no animations in this video, the creature models are simply shown in their binding pose.

Creature animations:
For some reason many of the creature animations (i.e. the ".kf" files) seem to have the animations rotated to odd angles (and sometimes moved). Even Nifskope does the same. It took a looong time to figure out how to get the creatures to be animating with the same direction as its binding pose. The NIF animations have the concept of "Accum Root" and "NonAccum Root" - for NPCs they are "Bip01" and "Bip01 NonAccum", respectively. They seem to have some hard coded functions - based on the snippets I gathered from Internet searches I figured these had to do with the way rotations are treated by the "NonAccum Root" node/bone.

If you look closely there are issues with the animations - Storm Atronach is half missing and the arms of the Spider Daedra are deformed. These are addressed in later videos.

Seyda Neen again:
This one is just me playing around with Morroblivion. This was surprisingly difficult because some of the modded NIF files and records look very different to the ones in the official BSA distribution. Obviously the original engine deals with them fine but my new NIF code had difficulties with them. In the video you can see that many things simply do not load properly.

It is an interesting possibility to get high quality assets for OpenMW so I may visit this again in future.

(to be continued...)
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: Elder-scrolls IV Oblivion

Post by cc9cii »

This one is just a test to see if a new capture software will look ok. OBS is difficult to use for me - I can hardly figure out how to record anything. On the other hand there is no watermark and it forces me to use higher resolution (because I can't figure out how to make it fit to the window size) which makes the video look better!

A short video to show the fixed animation of Storm Atronach. This NIF had some body parts and animations built-in, unlike most others which has an empty skeleton as the base model and body parts specified by other NIF files. The spinning rocks animation seems kinda cool, so I wanted to show it off.

All the animations are currently done in software but there's no reason why they can't be hardware skinned and animated. Once the code is stable I will try to learn about shaders (which I know nothing about at the moment).

Fallout 3 Interior (and this earlier effort):
While trying to implement leveled NPC (similar to leveled creatures) I decided to see if even newer NIF files from FO3 will still load since the NIF code rewrite. The material system in the current code is based on the old OpenMW one and it does not implement some of the features specified in the new NIF files. Still, with just some basic textures only they show up mostly ok. Current code is just a hacked workaround until I can figure out how to deal with the material system.

FO3 body parts are quite different to Oblivion. So for now NPCs wear some basic stuff (or nothing at all). The body parts can be dismembered as well - this is yet to be implemented.

Bleak Falls Barrow again:
I was struggling with the distorted arm/hand animation and wanted to take a break. So I tried to see if Skyrim will load again since the rewrite. To my surprise it didn't. I had forgotten about the physics scaling being different as well as how I had done the texture files previously. On one of the NIF record types I had to resort to copying how Nifskope handles them. Skyrim meshes and textures are quite detailed compared to Oblivion/FO3 and you can see the FPS drop even in the interiors (granted, this interior is quite large). Looks pretty good, though.

Distorted animation:
I had created this to ask for help in technical forums (e.g. Ogre) as I was getting nowhere and getting desperate. But once I made the video I figured out the issue. I don't have a solution yet but at least I know why it happens. Basically some of the skinned meshes specify weighting against a bone that is not specified in the animation. The code does not create a controller for bones not mentioned in the animation file, so it probably goes to random places (or maybe the binding pose)
Post Reply