Playing Shenmue in realtime 60FPS (Proof of concept)

(Modding and other series related projects)

Playing Shenmue in realtime 60FPS (Proof of concept)

Postby Jibby » Wed Nov 02, 2016 2:07 am

So before I start, I want to make it clear that this is a proof of concept. It's not really practical at all and you wouldn't want to play the game this way (bad latencty, occasional stutter, general instability etc.), but it is my hope that with enough tweaking and exploring different methods I can change that.

With that being said, let me guide you through the process of playing Shenmue in realtime 60FPS.

You're going to need the following things:
A pretty beefy machine (I'm using a R9 290X and an i5 4690k, so something along those lines should work)
DEMUL (or whatever emulator you prefer)
A Shenmue ROM
SVP (https://www.svp-team.com/wiki/Main_Page)
XSplit Broadcaster
MPC-HD (32 bit!!)

First of all, you're going to need to install all of the software above. (You might need to make an account for XSPLIT I'm afraid).

Once you've done that, launch SVP. It should run through some tests and eventually bring you to this screen:
Image

Match your settings to the one in my screenshot.

The next thing you'll need to do is launch 32 bit (VERY IMPORTANT!) version of MPC-HD. Upon doing so, go to View > Options. Then look on the left hand list for "Internal Filters". Once that is selected, there should be a button named "Video decoder". Click on that and a new window will popup. On the right of this window should be a panel titled "Hardware Acceleration". Click on the dropdown box and set it to "DXVA2 (copy-back)". You can then click ok to close out of that window. Here's a screenshot to clarify:
Image

Next, look on the left hand list again for "External Filters". Once that is selected, click "Add Filter", look for "ffdshow raw video filter" and add that. Make sure it's checked and that it is set to "Prefer". Again, apply the changes.
Image

Finally, you're going to want to look on the list for "Capture" and select that. Under "Analogue settings" change "Video" to "XSplitBroadcaster". Leave everything else as default as it shouldn't make any difference. If you don't see this option, try opening and then closing Xsplit and trying again. You can now apply and close the settings window.
Image

Next, open up your emulator (I suggest DEMUL) and set it to a low resolution like 640x480 (Realtime interpolation at high resolutions makes the game stutter a lot!). Save these settings and launch the emulator.

With the emulator running, launch XSplit and create a new scene (you can do so in the bottom right hand corner). Once you have done this, in the bottom left click "Add" > "Game Capture" and then there should be an option that depicts your emulator. In my case it was "gpuDX11nghw" but this may vary depending on your emulator/plugins. After adding this, stretch it as large as it will go in the preview window. You should now have something that looks like this:
Image

With the emulator and XSplit still running, lauch MPC-HD (32 bit!!) again. Click on "File" > "Open Device". You should hopefully see Shenmue within MPC-HD now (if not, read on anyway). We're almost done. On the left hand side you should see two numbers next to a "Set" button. Ensure both of these numbers are set to 0 and then click "Set".
Image

If you followed the guide correctly, the video feed within MPC-HD should be in 60FPS. Drag your emulator window offscreen but keep it the active window (so that you can control the game). And there you have it, Shenmue in realtime 60FPS! However like I said at the start, I cannot stress enough that this is a proof of concept. There's going to be latency and there's going to be stutter. I just thought it was a cool little thing to try.
Last edited by Jibby on Sat Nov 05, 2016 7:47 am, edited 1 time in total.

Jibby has received 5 thanks from: Esppiral, Mr357, shengoro86, Switch, Yokosuka
User avatar
Jibby
I see.
Alpha Trading Boss
 
Joined: February 2014
Location: Scotland
Favorite title: Shenmue II

Re: Playing Shenmue in realtime 60FPS (Proof of concept)

Postby Yokosuka » Wed Nov 02, 2016 8:44 am

Thanks man. This is the future of gaming you brought here. :-o

Have you tried this on other 30-fps locked games?

What happens to SVP if the game is suddenly below 25 fps when Ryo is in a place with a lot of NPCs? I suppose one of your problems comes from there.
User avatar
Yokosuka
Machine Gun Fist
Machine Gun Fist
 
Joined: August 2014
Location: France
Favorite title: Shenmue II
Currently playing: Rocket League

Re: Playing Shenmue in realtime 60FPS (Proof of concept)

Postby shengoro86 » Wed Nov 02, 2016 9:23 am

This is a great tutorial! Thank you for sharing :)
User avatar
shengoro86
Admin - Shenmue500K
Shenmue 500K Staff
 
Joined: August 2004
Location: New Jersey, USA
PSN: Shengoro86
XBL: Rock Is Sponge
Favorite title: Shenmue IIx
Currently playing: Shenmue III (PC)

Re: Playing Shenmue in realtime 60FPS (Proof of concept)

Postby Jibby » Wed Nov 02, 2016 11:27 am

Thanks guys!
I haven't tried it on any other games at the moment (at least, not in realtime) but I imagine the results will be similar. I can't say for sure what happens when the emulator drops below 30FPS, but my guess is that it will still use interpolation resulting in a framerate around the 50FPS region. In other words, you'd still get something above 30FPS.

That being said though, the realtime interpolation is really shaky at the moment. It kinda snaps between 30 and 60 causing a stuttering effect (but on the occasion it does lock on to 60, it looks really good!). I think most of the problems are coming from XSplit as the interpolation is actually being applied to the XSplit preview and not the direct emulator feed. My next goal is to remove XSplit from the process and find a way to get the feed directly from the emulator into MPC-HD or another player that supports SVP. That should solve a lot of the stuttering and reduce some latency.
User avatar
Jibby
I see.
Alpha Trading Boss
 
Joined: February 2014
Location: Scotland
Favorite title: Shenmue II

Re: Playing Shenmue in realtime 60FPS (Proof of concept)

Postby Jibby » Wed Nov 02, 2016 11:49 am

Annoyingly, the feature I need is only available in the Pro version of SVP. May take one for the team and buy it to investigate. Will search for alternatives first though.
User avatar
Jibby
I see.
Alpha Trading Boss
 
Joined: February 2014
Location: Scotland
Favorite title: Shenmue II

Re: Playing Shenmue in realtime 60FPS (Proof of concept)

Postby Esppiral » Sat Nov 05, 2016 5:26 am

Really awesome!

Thanks.
User avatar
Esppiral
Alpha Trading Boss
Alpha Trading Boss
 
Joined: May 2012
PSN: Esppiral
XBL: Esppiral
Steam: Esppiral
Favorite title: Shenmue
Currently playing: The Witcher 2

Re: Playing Shenmue in realtime 60FPS (Proof of concept)

Postby Jibby » Sat Nov 05, 2016 7:38 am

Thanks Esppiral! Since writing this guide, I've already made a lot of improvements. I've managed to reduce the latency to the point where the game is actually playable now. It's still there and noticeable, but walking around town and actually getting where you're trying to go is possible now (unfortunately this comes at a visual cost though). Also, turning V-Sync on inside the emulator seems to have fixed the stuttering a lot!

It's getting there!

Edit:
Just got a winning can during testing :D. A sign of good things?
Image
User avatar
Jibby
I see.
Alpha Trading Boss
 
Joined: February 2014
Location: Scotland
Favorite title: Shenmue II

Re: Playing Shenmue in realtime 60FPS (Proof of concept)

Postby Mr357 » Sun Nov 06, 2016 2:54 pm

Jibby wrote:Also, turning V-Sync on inside the emulator seems to have fixed the stuttering a lot!


That's typically the case with Demul (I assume that's what you're using).
User avatar
Mr357
"After Burner...Great!"
"After Burner...Great!"
 
Joined: March 2015
Location: United States
Favorite title: Shenmue II

Re: Playing Shenmue in realtime 60FPS (Proof of concept)

Postby Jibby » Sun Nov 06, 2016 5:38 pm

Mr357 wrote:
Jibby wrote:Also, turning V-Sync on inside the emulator seems to have fixed the stuttering a lot!


That's typically the case with Demul (I assume that's what you're using).

Mhm, but I meant the stuttering between 30fps and 60fps in MPC-HD as opposed to the actual emulation. V-Sync really messes up my sound though in a lot of places (everything sounds like it's in slow motion and really choppy). Any idea why?
User avatar
Jibby
I see.
Alpha Trading Boss
 
Joined: February 2014
Location: Scotland
Favorite title: Shenmue II

Re: Playing Shenmue in realtime 60FPS (Proof of concept)

Postby Mr357 » Sun Nov 06, 2016 6:41 pm

Jibby wrote:
Mr357 wrote:
Jibby wrote:Also, turning V-Sync on inside the emulator seems to have fixed the stuttering a lot!


That's typically the case with Demul (I assume that's what you're using).

Mhm, but I meant the stuttering between 30fps and 60fps in MPC-HD as opposed to the actual emulation. V-Sync really messes up my sound though in a lot of places (everything sounds like it's in slow motion and really choppy). Any idea why?


It's because the emulator is slowing down the game speed (and as a result, the framerate) in order to prevent crashing or the like. This can be solved by either using a more powerful computer, or running identical segments of the game twice without turning off or restarting your computer (a combination of both yields the best results).

I'm not sure what causes the latter to be effective, but that's how I've been able to get a constant 30 fps for both of my Shenmue movies. Sometimes, when there's enough strenuous effects like dust clouds, achieving 30 fps is impossible without lowering your settings (and even then it can be a struggle).

Shenmue II has exhibits cutscenes where the game speed stays at 60, but the framerate is intentionally lowered, most likely to sync up animations that were recorded too quickly. These are fairly sparse, but you're bound to run into them if you play the whole game.
User avatar
Mr357
"After Burner...Great!"
"After Burner...Great!"
 
Joined: March 2015
Location: United States
Favorite title: Shenmue II


Return to Community Projects

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000-
ShenmueDojo.net