cancel
Showing results for 
Search instead for 
Did you mean: 

Morrowrift - Morrowind VR (CV1/1.3 alpha! v. 3.0.2)

superllama
Protege
6/6/16 - I finally rewrote the OP... editing this literally gave me a migraine but it's finally cleaned up! If you want to look at the old one for some reason, I archived it here pastebin.com/VDfZgTvB
*ahem* anyway.

DISCLAIMER
- Tested with Disk (GOTY) and Steam copies-- should theoretically work with other versions like the GOG version but this is untested (if someone can confirm that it works I'll remove this disclaimer)

WHAT THIS IS
This is a program that hooks into Morrowind + MGE 3.8.0 and, with certain settings disabled, adds fully playable (except character creation) support for the Oculus Rift.
This is different from configurations for vireio and vorpx because it actually decouples the view from the menu and draws the menu as a 3D projection, meaning you can look around separately from where you're aiming and lean forward to zoom in on game text, and it automatically levels your view pitch so you can play it standing up without getting dizzy.
It's written from scratch in C, so there are no dependencies other than Morrowind + MGE 3.8.0 and the Oculus Runtimes.
Here's a badly recorded gameplay video showing off the features (and bugs) in the already-out-of-date version 3.0 (one of the bugs in the video is already fixed!)
https://www.youtube.com/watch?v=rIMBYREr9yg
(NOTE: if somebody with a decent GPU and recording program wants to take a video of their game window running the latest version of Morrowrift, I'll put it here-- right now all my videos are laggy and ugly because my GPU is old and I don't know how to use OBS)

WHY 3.x?
You might be wondering how this is version 3 when it's so basic... short answer: this one is (theoretically) way more stable and optimized than before due to it using an entirely different structure and coding scheme. Long answer: the first one was DK1 only and was a direct fork of MGE, meaning you had to actually replace MGE with my DLL. Version 2 added DK2 support, and was an extra layer on top of MGE that worked the same way-- that is, by pretending to be DirectX. This version is a standalone program that injects a DLL directly into Morrowind much like VorpX or Vireio, except this program is specifically made for Morrowind/MGE and doesn't have any other dependencies.

WHY ALPHA? (BUGS)
There are still a multitude of bugs present in this version, some of which were even fixed in an older version, but as I've abstracted the code more and more in an attempt to make my edits more portable to other games, certain things got harder to fix. Here's a list of all known bugs that I can think of right now:

  • Overlay ZOrder Bug - Any game overlays (or at least steam) come up behind the main menu or HUD. If you're playing with a steam controller and you can't move the mouse on the main menu, try pressing Shift+Tab to see if you accidentally invisibly opened the steam overlay. Luckily it's completely usable in-game since the menu is transparent there.
  • Native Aspect Loss - The game is currently forced into a Rift-shaped aspect ratio, which applies to in-game menus too. I'd like it to obey the game's starting aspect ratio when it comes to drawing in-game menus eventually but that might not be possible if I want the mirror window to show both viewports correctly.
  • Race Selection Bug - The race selection menu is effectively unusable-- I recommend creating your character outside of VR mode and then running Morrowrift afterward and loading a save.
  • NPC Shadow Bug - You have to set Real-Time Shadows to None in-game or else NPC's will flicker like a banned pokemon episode if you're not staring straight at them. I think they use their own clipping planes and I'll have to locate those to transform them.
  • Weapon Clipping - Weapon/hand models have messed up clipping. Probably a similar cause as above.
  • Water Clipping - Water sometimes disappears when you're not aiming at it, and also looks pretty terrible with reflections and shaders turned off which is still required for the hack to work. Also, if you have Pixel Shaders turned on, water reflections don't look right and sometimes draws twice with incorrect headtracking.
  • Sky Movement - Positional headtracking affects clouds and stuff in the sky, which isn't really that big of a deal but looks stupid and can be a bit disorienting if you try to breakdance ingame (or anything else requiring a lot of positional movement). Also, the sun is rotated based on player aim instead of camera position.
  • Loading Freeze - Since the game renders the progress bar during frozen loading screens, the background freezes but still moves with your head which feels really weird. I honestly have no idea how to fix this.
  • Tracking Asymptotes - If you're looking straight up or down, the headtracking gets pretty weird and overdoes roll. This is because of some really old code I wrote back when I didn't understand quaternions, I'll fix it eventually.
  • Elusive Crosshair - The in-game crosshair is hard to see on most backgrounds, and since headtracking is decoupled from the menu it's easy to lose it. In the future I'll probably add a custom crosshair that renders on top of it and is easier to see.
  • Annoying Menu Placement - Not exactly a bug but a side effect of view auto-levelling still transforming the menu so the crosshair lines up correctly: if you're trying to loot something on the ground the menu will come up down there, which is a pain to read or use and also suffers from the trackign asymptote bug. In the future I'll probably fix this by leaving the game menu level and only transforming the aforementioned extra crosshair and weapon model based on in-game aim. I'm also planning on implementing a system eventually where recentering the view actually moves the crosshair to where you're looking, instead of the other way around, which will make it easier to find it.

Even aside from all that, I'm not 100% sure how well this will run on varying systems, so until a few people test it and confirm that it works, it'll be an alpha. Once enough people are able to run it (which may entail some bugfixing) and I improve the launcher a bit, I'll call it a Beta again.

DOWNLOAD
You can download 3.0.2 Here-- Google was yelling at me for uploading an EXE or something so I had to encrypt it so it wouldn't try to scan it. The password is simply "uh" because that was my reaction to Google taking my first upload down. (Just ask this scientician)

If you have a DK2 and you'd rather run the old unstable 0.8 version for some reason, you can still get it Here. There are instructions for using it somewhere in this old archived post.

SETUP
I recommend starting with vanilla morrowind (goty is fine) since I don't know how different mods (especially MGE and MWSE mods) will affect this. Once you've got it working you can start adding things in and making sure they don't break it.
The first thing you'll need to do is install and set up MGE 3.8.0.
Eventually I want to try to add support for MGE XE and some of the more popular shader mods, but that's a long way off.
Make sure your game has this message in the top left corner before proceeding.
If you're running the Steam copy of the game you'll need to set Morrowind.exe, Morrowind Launcher.exe, and MGEgui.exe to all run as Administrator before this will work.
Next, since this version is still a bit finicky, you have to make sure you run it with the right settings or it will probably just sit there and not draw anything, or render everything totally wrong. Unless you want your game to look that way (or like nothing), you'll need to disable the following MGE features in MGEgui:

  • Distant Land
  • Anti-Aliasing
  • Probably any mods adding shaders

I'm working on getting these features supported but it's very very difficult to do unless I actually modify MGE, and I'm trying to avoid doing that in this version in anticipation of someday retrofitting other games (yes, including skyrim) that don't have open source graphics extenders that I can just rewrite. That's the only reason the ancient DK1 beta version seen on my youtube channel had Distant Land-- I actually modified MGE to add support for it.
If the font size is too small for you, you can choose a lower resolution like 1024x768 and the in-game text will be bigger, but you may get extra aliasing if you do that. Some resolutions render incorrectly right now though like 1600x960.

RUNNING
Just make sure Morrowrift.exe and Morrowrift.dll are in the folder with Morrowind, and run Morrowrift.exe (not Morrowind or Morrowind Launcher). If you're running a Steam copy of the game, you need to make sure Morrowrift.exe is set to Run as Administrator.
If you need the Steam Overlay for any reason (for instance if you use a Steam Controller) You should be able to add Morrowrift.exe to steam as a non-steam game too and still have steam inject its overlay, and if you want to do it with an actual Steam copy of the game you may have to Steam itself as Administrator before it will let you do this (and you still have to add Morrowrift as a non-steam game and run it that way). This may not work for everyone but I was able to run both steam and non-steam copies of Morrowind with Rift support and Overlay support simultaneously.
One caveat with the Steam Overlay though-- for some reason it draws underneath the Morrowind menu right now, so if you accidentally open it on the main menu or during a cinematic, you won't be able to see it. If you can't move the mouse on the main menu try hitting Shift+Tab and see if steam overlay was open invisibly behind the menu.

COMMAND LINE ARGUMENTS
If you run Morrowrift.exe with -nolevel you can disable the auto pitch levelling, but I don't really recommend it since it can make you dizzy. However if you absolutely cannot stand the menu moving up and down all the time when you aim independent of your head position, this feature can be disabled.

This is currently the only command line argument but I'll probably add more options as time goes on, depending on what needs to be customized.

DONATE
If you love my project and want to throw in some motivation for me to continue to add new features, new hardware support, and maybe even new games someday, you could make a Paypal Donation and give me a great excuse to work on this project instead of other stuff 😛

PLANS
First things first, I need to fix bugs. If I can get distant land, anti-aliasing, shaders, and MGE XE working well, I'll consider it a major, major victory. Once I have at least MGE working perfectly I may also try to tackle Oblivion and Skyrim support alongside of MGE XE, since they'll have similar shader setups. MGE XE has the benefit of being open source so I can actually look directly at how it works, which may help me structure the code so it works with newer games.
As a side goal, I'd also like to implement SteamVR support instead of just Oculus support to my codebase. Right now I'm saving up for a GTX 1070 and HTC Vive so I can do this, so that's probably what any donation money will go towards. My current GPU is an old GTX 770 which can barely even run things on the DK2, so if I'm going to get a Vive which has no Async Timewarp I'll definitely need a better GPU to go with it.
If I do get a Vive, another pie in the sky goal would be to hack the game so much that your hands and weapon are drawn based on motion controls, and one of the four weapon moves is performed depending on how you move your hands. This would be so insanely awesome I'm kind of afraid to even mention that I'm planning to try it, since it's probably nearly impossible, but hey, I can dream.
299 REPLIES 299

Jeppe
Honored Guest
Some more information regarding my rig and the crashes. Since it works on your machine it's probably some issue with my setup.

Morrowind GOTY Steam version, no steam overlay
mge 3.8.0.b
OR Runtime 0.8
Morrowrift 2.4.2

Windows 10 64 bit
32 GB RAM
Intel Core i7-6700K
Radeon HD7970 with latest hotfix drivers (they solve a compatibility issue with runtime 0.8)
Week-old Windows install, no overlays that I know of.

I always start Morrowind using the Steam launcher, but I've set Morrowind.exe, Morrowind Launcher.exe and MGEgui.exe to run as admin.

Identical MGE settings as your settings in the global graphics tab as well as render tab, except I'm running in full screen at 1920x1080.



Sometimes when loading an exterior cell, game freezes. In the HMD only the current view is rendered, but you can still look around (but everything apart from the current view frustum is black). On the screen, it's just frozen. Ctrl+Alt+Del is required to close Morrowind, Esc or Alt+F4 doesn't work. Sometimes, it just freezes an gives a "Morrowind has stopped working" message instead.

I've got freezes and crashes at every direction from Seyda Neen, and also when loading the trader/pub interior. Other interior buildings in Seyda Neen seems to work, though. It doesn't seem to happen all the time - once, I could go/swim west along the coast to Thelas Ancient Tomb and enter the tomb, but it crashed (Morrowind has stopped working) as soon as I tried to leave the tomb. another time, I got a freeze when entering the tomb.

Dying slightly outside Thelas Ancient Tomb and attempting to quickload the latest save (which is in town) produced a crash.

Nevermind my comment regarding the water - I ran MGE without Morrowrift and the water is supposed to look like that 😛

Let me know if there are any error logs that I can supply! Otherwise I will try and change some settings and see if it works. For starters I will experiment with different resolutions and run in a window instead. I'll also downgrade my Oculus runtime to 0.7.

Jeppe
Honored Guest
I've tried changing to Windowed mode and lowering the resolution, but still experience crashing. I noticed something though, hard to say if this has happened in all crashes or just this one time. I was walking NW of Seyda Neen until the wizard drops down from the sky, and the game crashed about half a second after he was loaded, but I still had time to move maybe a meter in-game. During this time, the view of right eye was frozen at the location where the wizard/(cell?) was loaded, but the left eye froze half a second later. So when the crash and "Morrowind has stopped working" message came, the left eye saw a view that had been updated until just at the point of the crash, but the right eye saw a view from about half a second before the crash.

superllama
Protege
That's very weird... do you think you could try some of the older versions of Morrowrift and try and pinpoint where the crashes start? If I can get 2.4.3 to stop crashing I can try sending you a copy that outputs debug logs to make it easier to find where it is, but if you could try the older versions and see which one starts crashing first that might narrow it down too.

The only significant difference between our setups is that I'm running the non-steam version of Morrowind and I'm using an nvidia card-- I'm also running OR 0.8 on Windows 10 64-bit and MGE 3.8.0b and it works alright for me. I think others have gotten it working on the steam version though.

Also a question about the water looking weird-- does it happen in the game window too or just inside the rift? If it's visible in the game window could you grab a screenshot of it? It might be that I've just gotten so used to it that I didn't even realize it's rendering different from how it's supposed to, lol.

Jeppe
Honored Guest
Alright, I'll try out the old versions and let you know if the crashes persists! I have a CD version as well which I havn't tried, although it's not the GOTY version, it's Morrowind+Tribunal+Bloodmoon on separate disks. I'll see if I can connect my CD reader and try it out.

Regarding the water - it was a long time ago I played Morrowind without any graphical mods so I'm just not used to it being so "blank". It looks the same in the Rift using Morrowrift as on a monitor when using MGE without Morrowrift, so no cause for alarm here.

EDIT: I'll also give it a try on my laptop. I don't expect it to run very well, but I can check if the crashes persist.

Jeppe
Honored Guest
I'm getting the same crashes even on 2.1, the earliest I found. I'll connect my CD drive tomorrow and try the non-steam version on the same machine.

superllama
Protege
Interesting... there's actually a secret even-earlier version that only edits the in-game FOV and not the clipping planes, hosted here. If even that crashes, there's probably something wrong with the way I'm translating D3D9->D3D9Ex-- if it doesn't, then it's probably something wrong with the way I'm tranforming the clipping planes, possibly their location changes in the steam version or something.

Jeppe
Honored Guest
Alright, got my DVD reader working and I've installed the CD version of Morrowind as well. Unfortunately, that secret early version crashes as soon as I launch the Morrowind.exe executable, on both the stand-alone and Steam version.

I tried 2.4.2 on the stand-alone version, and while it still crashed on most loadings, it differed a bit from the Steam version regarding when it crashed. For example, using the Steam version, I always got crashes when the wizard started falling when walking on the NW road from Seyda Neen. In the stand-alone version, I did not get any crashes here, but it crashed a bit after, once I climbed the steep road and had entered the darker terrain (sorry I can't be more precise).

I'll try it on my laptop tomorrow - I'm starting to think it's a hardware issue. The OR runtime support for my graphics card (HD7970) is a bit shaky (see https://forums.oculus.com/viewtopic.php?f=34&t=27073&start=40 for example, although this was fixed in the latest hotfix drivers I'm using), and my DK2 is acting a bit weird as well. Sometimes when launching Morrowrift I only get a weird greenish pattern in my DK2 and sometimes it won't "activate" at all, and I have to restart the computer to get it working again. I haven't really used it in a long time so it's hard to say whether this is limited to Morrowrift only.

Anyway, despite these problems, I'm enjoying just walking around in Seyda Neen 😄 It truly feels amazing playing Morrowind in virtual reality. Really great work on this project, I'm very impressed with the result so far!

EDIT: Just played around with 2.4.3.Alpha, and while it crashes upon either loading my Seyda Neen save, or exiting the ship to Seyda Neen, I can choose new game and it will work until leaving the ship.

ptisinge
Honored Guest
I have the same crash: I can start a new game but as soon as I leave the boat I crash. If I try loading a save which I made with MGE only after the character creation, it also CTD. I think I tried about all the versions posted here, and I also followed the MGE configuration tips given in this topic, but no luck. The little bit I got to see in the boat was really promising and feeling as good as native VR, so even though I'm stuck for now thanks for implementing that!

That's using MGE 3.8.0, OR runtime 0.8, Win 7 x64, 16GB RAM, i7 3930K and GTX 970. GOG Morrowind version

Edit: In fact I can load any interior (I've tested save files found on Nexus), but as soon as I try loading an outdoor area it CTDs.

JonathanVB
Honored Guest
I've noticed a problem when yawing or rolling my head when looking at a very high/low pitch - the camera rolls too far. It's not too much of a problem though since that pose is somewhat uncomfortable.

superllama
Protege
Hey everyone, sorry I've been gone for a couple weeks, been pretty busy with work and school lately. I have a vacation coming up but it doesn't make sense to bring my rift and pc with me so the next time I'll realistically be able to work much on this is March 26th.

I've been researching alternative code injection methods lately and I may have found a better, more efficient, and less crash-prone way to accomplish this style of VR injection, but I can't say for sure until I write a successful implementation and it involves a lot of more-or-less "bare metal" coding. If this method does work I may end up doing some rewriting and cleaning up which may solve a lot of the outstanding crashes and give me room to move forward again.

Thanks for reporting the issue with camera rolling btw, I hadn't noticed that and will definitely take a look at it next time I do anything with the code.

EDIT: I successfully created a subclassed D3D9 device with my new alternative injection technique, and it's stable enough to work even if I inject it into the mess known as Halo 2 for Vista. I haven't done anything with it yet, but if I can successfully translate those calls to d3d9ex and then to dx11 on the rift, this could be the start of a new injection program that would be able to eventually deliver Morrowrift-like quality to more than just one game (hopefully more stable than current Morrowrift releases, too). I'm really excited about it but it's still too early to say for sure whether it will be as great as I'm imagining it, lol.

EDIT 2: Actually now the calls are properly translated to d3d9ex so now I just need to make it render to the rift and I can re-implement the Morrowind-specific rendering techniques and possibly have a more stable way to achieve the same injections.

EDIT 3: Making steady progress with the new codebase. Since I can't work on the rift-specific part of it until I get back from vacation I can't do all that much, but I'm doing as much as I can do without a rift in the mean time and it's looking like the next release will be Beta 3.0, which will feature a single DLL with a Launcher executable, customizable settings (initially just via command line but eventually with a GUI), and much more stability and speed. Also possibly the ability to play Halo 2...


EDIT 19384: For some reason this new forum is idotic and won't let me post?? Is there something I have to do to not require comment moderation on my own topic?