Chivalry: Medieval Warfare

The place for all discussion of the Oculus Rift compatible open source 3D drivers.
Post Reply
taeralis
One Eyed Hopeful
Posts: 7
Joined: Fri Apr 19, 2013 11:32 pm
Location: Owasso, OK, USA

Chivalry: Medieval Warfare

Post by taeralis »

I just posted this over at the game's forums, and I'm going to mostly just repost it here. The instructions get far more basic than most people who have spent any time here will need, but I'm going to do it because I am tired and its full form may provide information or background that someone will find useful or interesting.


Playing Chivalry with the Rift is quite an experience. It's a lot more viable than you might think, if you've been following the device's evolution. The resolution is low, yes, but it's higher than I expected, and this game happens to be a great test bed, given that most combat takes place at short-to-shorter distances, and therefore most opponents are just as visible and trackable to someone in a Rift as to someone using a monitor.

I'm currently playing with the Vireio Perception injection driver, head tracking enabled -- haven't been targeted by an anti-cheat program for doing this, but then I'm not sure any of the servers I've been on have had that system enabled. Even though this solution is completely workable, however, I would like to semi-formally request that TBS (MTBS3D note: Torn Banner Studios) add native support, even if they simply enable the side-by-side, pre-warped rendering and don't do anything to the UI (which is mostly unreadable while wearing the Rift -- see these chat and scoreboard screenshots and keep in mind that the corners are cut off inside the device). Native support should at least provide great gains in FPS (compared with the latest compatible version of Vireio) and not require the user to do as much tweaking as is necessary with a third-party driver.

Now, if you have your Rift and you've found this thread whilst looking for help in getting it and Chivalry to play nice, this next section is for you! Keep in mind that this stuff should all be accurate at the time of this post's writing. I'm going to assume you know how to get the display, well, displaying things in general, so here's what you do next:

1. Click the big, green "Download VIREio" button at vire.io. This version works. The latest build from vireio.com does not, nor does Stereoificator. Well, to say they don't work isn't completely accurate, at least for the former. But they're not usable, and I'll cover why, later.

2. Unzip the archive to somewhere. I used C:\Perception.

3. Go to the directory and copy \bin\d3d9.dll and \bin\libfreespace.dll to your Chivalry executable's directory. In my case, that's \Steam\steamapps\common\chivalrymedievalwarfare\Binaries\Win32\

4. Run Vireio with <its directory>\bin\Perception.exe

5. Make sure "Oculus Rift" is selected in the top box, "OculusTrack" in the bottom one (if you want head tracking -- otherwise, "No Tracking" in the bottom box. I'm hoping that this would prevent Vireio from being detectable by cheat software even if they detect it with tracking enabled, but I am unsure as I do not know if the program makes any mouse-related calls if tracking is disabled entirely).

Normally, at this point, we would need to make a profile for the game in <Vireio's directory>\cfg\profiles.xml, but since another (amazing) game, Antichamber, is already there with the executable name of UDK.exe, Vireio should just use its settings and update them as you tweak them in Chivalry. Woe unto you if you play both and they have different parameters. I should know, as I /do/ play both, but I've only really had one magical night with Antichamber, so far, and I was very drunk, and I do not recall how much tweaking I had to do, or how much re-tweaking was necessary upon reentering Chivalry. Moving on:

6. Go into Documents\My Games\Chivalry Medieval Warfare\UDKGame\Config\ and open UDKEngine.ini. Search for "MaxSmoothedFrameRate" and change the value, which is probably 62, to 124 or above. Vireio uses a method by which it renders one eye's camera, then the other's, then spits out a whole screen with the two side by side (I think) and this confuses Unreal's FPS counter so that if you leave MaxSmoothedFrameRate at 62, you are effectively capped at approximately 31 FPS. Another option to solving this problem is to simply set bSmoothFrameRate to FALSE. Simpler, yes, but I wanted to explain another wonderful thing I've learned, so here we are. And I guess maybe you just want to leave smoothing on. I don't know, we're not close friends or anything. Oh, there's a second set of those same values, later on in the INI file, but those appear to just be for the editor? Whatever. When in doubt, change everything.

7. Run Chivalry. If you're presented with four rendered camera views instead of two, it's (in my understanding) double-hooking. What a whore. Try renaming the d3d9.dll you put in Chivalry's directory (when I'm testing things out or want to go riftless, I just rename it to _d3d9.dll) and give it another shot. And note that there is a difference between running the game from its directory via Windows Explorer/the Run dialogue/the console/etc. and running the game from its Steam entry or something. In my case, with the DLLs in place, running from the directory would do the four-eye thing but running from the Steam list would not.

8. Assuming that worked, you should be seeing the view of two cameras, pre-warped. Fantastic. Go into the game's video options, set the FOV to 110, maybe turn shadows off if they're on (not sure if this is necessary; some games freak out but I don't recall if UE3 games are among them). VSync might or might not end up making the experience better for you. Tweak all this stuff as you playtest. As a note, whether you have VSync on or off, because of Vireio's alternating frames, you will likely notice one (both? not for me) of your eyes somewhat-uncomfortably "pulling" during quick in-game movements. They've got this problem fixed with the newest version of the driver, but, again, the usability is not quite where it needs to be for me to endorse it in a post like this. In this case, that is mostly due to the lack of functioning keyboard bindings for adjusting the driver's 3D settings and the head tracking.

9. And speaking of adjusting, it's time for you to host yourself a little test game in Chivalry and follow the directions outlined here to get a good 3D effect in the Rift. Get back to me when you're done.

10. Welcome back! Now you can adjust the tracking, if you need to. F8 decreases yaw (looking right and left) sensitivity while F9 increases it. Shift+F8 and Shift+F9 do the same for pitch (looking up and down) and Ctrl+F8 and Ctrl+F9 adjust roll (rolling is rolling), though I've never needed to touch the roll setting for any game. Currently, I have my mouse (well, trackball, in my case) sensitivity in Chivalry set to like 34, inverted, which, using default Vireio settings, makes its head tracking super-sensitive and makes me look down in the game when I tilt my head up, so I have Vireio's Chivalry yaw setting turned way down, and its pitch setting turned down even further, into negative values (just hold Shift+F8 and it'll eventually go below zero) to compensate for the aforementioned inversion. After fine-tuning these, if you quit the game, Vireio may seem to forget about your tweaking upon reentering Chivalry. It has not, it just needs a nudge. Quickly tap F8, then F9, and you should be back up and running.

11. Play. Test. Kill every bloody archer you see. Remember that, with head tracking on, you can look at things to aim at them. This is especially fun when blocking or being a cheap, disgusting archer.

This list also serves as an example of all the trouble TBS would save us by adding native support. ;}

Sorry if I've forgotten anything. If I realize that I've left something out, I'll fix it. If you have questions, ask.

Here are a couple more screenshots, with pretties enabled, to show a teensy bit more of what the game looks like in the Rift. Except, in the Rift, it's all huge and 3D. You get the idea.
\0
dariusu
One Eyed Hopeful
Posts: 15
Joined: Wed Jun 05, 2013 8:34 pm

Re: Chivalry: Medieval Warfare

Post by dariusu »

I followed all your steps. I had Vsync both on and off but I there seems to be some jerkiness in the rendering for me. The entire scene looks shifts to the left and right a few pixels every second or so in an apparently random fashion when my head is level, and snaps from roll to level at about the same rate when my head is tilted. This is happening in both eyes at the same time.
taeralis
One Eyed Hopeful
Posts: 7
Joined: Fri Apr 19, 2013 11:32 pm
Location: Owasso, OK, USA

Re: Chivalry: Medieval Warfare

Post by taeralis »

That's odd. I haven't had a problem like that.

1. When the scene shifts to the left or right, it's happening to both eyes simultaneously and equally, correct? So that the 3D effect is not interfered with, it's just that the world seems to be moving of its own accord? I'm going to also assume that the manner in which this is happening does not match small movements made by your physical head -- is this also correct?

2. Snaps from roll to level? That sounds disorienting. Do you mean you'll roll your head (cock it to one side), and the game will follow and then just randomly snap (or creep) back to level while your head is still cocked?

Sorry, I want to make absolutely sure we're on the same page. Additionally, how's the overall smoothness? And do you happen to have Fraps or another program that will overlay your FPS on the screen? (Since the output provided by UE3 games' "stat fps" console command is unreadable while the Rift's distortion is applied)

Given current information, if "OculusTrack" is indeed selected in Vireio Perception, I'm not sure what to think. I haven't had any kind of problem with Vireio's actual tracking, so I can't explain the roll issue yet. My first thought for the scene shifting left/right is that an attached pointing device might be interfering -- my mouse sometimes gets restless and just starts moving the cursor on its own, usually because some junk is stuck near its sensor -- but if this is happening all the time, that's probably not it.
\0
dariusu
One Eyed Hopeful
Posts: 15
Joined: Wed Jun 05, 2013 8:34 pm

Re: Chivalry: Medieval Warfare

Post by dariusu »

OculusTrack wasn't selected. I must have closed Perception.exe at some point while testing but since the distortion worked and the tracking apparently worked, I didn't notice. With the proper version of Perception.exe and OculusTrack selected, it works like it should. Thanks.
taeralis
One Eyed Hopeful
Posts: 7
Joined: Fri Apr 19, 2013 11:32 pm
Location: Owasso, OK, USA

Re: Chivalry: Medieval Warfare

Post by taeralis »

Any time. I'm glad it's working for you.
\0
Post Reply

Return to “Development / General Discussion”