Accelerated 2D upscaling for old 2D games.

General information and assistance with dgVoodoo.

Accelerated 2D upscaling for old 2D games.

Postby eierfrucht » 2019-2-08 @ 00:01

I wasn't able to find Dege's e-mail address on his home page so I decided to ask here.

O great Dege, do you have any plans to add support for hardware-accelerated 2D upscaling?

Popular old 2D games like Arcanum, Fallout Tactics, Knights of Honor or Celtic Kings all have fan-made HD patches; the problem is that even on large displays, everything is just too small at 1920x1080 (I"m not even mentioning UHD or 4K)

The best kind of scaling is probably achieved at 1366x768 or 1440x900. The bad thing is that most displays -- quite naturally -- do a very poor upscaling job.

All these games seem to work with dgVoodoo2 (with certain tweaks) so I thought that if would be really cool to implement a hardware-accelerated 2D upscaler.

The first thing that came to my mind is a simple Bicubic filter -- even it would yield a much better looking picture as long as the display keeps its native resolution and does no scaling of its own.

The second thing is this sophisticated open-source upscaler: https://sourceforge.net/projects/xbrz/

It does an amazing job upscaling Heroes of Might & Magic III: https://www.youtube.com/watch?v=1HjObkE2Pks

Alas, HoMM III uses a custom-made render wrapper https://sites.google.com/site/heroes3hd/eng/description that was designed on purpose for this game only.

Another thing that came to my attention is that Arcanum and Fallout Tactics, when launched with dgVodoo, get quite laggy; this seems inexplicable since some old 3D games like Sacred or Might & Magic 8 also use DX8/DX7 but actually get a noticeble performance boost with dgVoodoo.

Even if it's impossible to implement XBRZ, could you possibly just add a simple, late-stage Bicubic upscaler that treats every finished frame (rendered at 800x600, 1024x768, 1368x768, 1440x900, etc) as a 3D surface then upscales it to the display's native resolution using hardware acceleration? DirectX 11 should offer a good variety of texture scaling options...
eierfrucht
Newbie
 
Posts: 4
Joined: 2019-2-07 @ 23:37

Re: Accelerated 2D upscaling for old 2D games.

Postby ZellSF » 2019-2-08 @ 08:14

If you set dgVoodoo2 to use any of the scaling modes below the first three, dgVoodoo2 will handle the upscaling (probably hardware accelerated). I think it's bilinear and not bicubic. More scaling options would be nice.
eierfrucht wrote:The best kind of scaling is probably achieved at 1366x768 or 1440x900.

Ideal scale factors are integer scale factors and those two aren't integer scale factors for any common display resolution. Not that it makes a huge difference for any sort of interpolated scaling method.
eierfrucht wrote:The second thing is this sophisticated open-source upscaler: https://sourceforge.net/projects/xbrz/

Can I be the first person to say "eww". XBRZ and similar scalers always ruin the source art in some way.
eierfrucht wrote:Another thing that came to my attention is that Arcanum and Fallout Tactics, when launched with dgVodoo, get quite laggy; this seems inexplicable since some old 3D games like Sacred or Might & Magic 8 also use DX8/DX7 but actually get a noticeble performance boost with dgVoodoo.

This was the part of your post I was going to reply something useful to. Disable vsync in your graphic driver. dgVoodoo2 doesn't like vsync for some games.

If you want to avoid tearing you can run the game windowed. Then it will be vsynced by the window compositor, which won't affect the game's performance in the same way.
ZellSF
Oldbie
 
Posts: 1390
Joined: 2006-1-01 @ 18:19

Re: Accelerated 2D upscaling for old 2D games.

Postby eierfrucht » 2019-2-08 @ 12:40

If you set dgVoodoo2 to use any of the scaling modes below the first three,

I may sound stupid, but what do you mean by 'below the first three'?

dgVoodoo2 will handle the upscaling (probably hardware accelerated)

No matter how hard I experimented the upscaling was sort of jagged/uneven/grainy/flaky/whatever and not just the regular 'a bit blurry', it looked even worse than display-driven interpolation.

Ideal scale factors are integer scale factors and those two aren't integer scale factors for any common display resolution. Not that it makes a huge difference for any sort of interpolated scaling method.

You are absolutely right, but I was talking about a different thing.

English is not my native language, by 'best kind of scaling' I was trying to say that games originally designed to run at 800x600 or 1024x768 look best when upscaled no larger than 1366x768 or 1440x900 -- everything is big enough not to put any strain on the eyes and the HUD is small enough not to occupy like 1/3 of the screen, but isn't way too small. And I'm talking about my 27 inch display. With smaller displays I'd stick with 1280x720 for 800x600 and 1366x768 for 1024x768.

But these resolutions look really bad on a 1920x1080 display exactly because of the stuff you mentioned -- display-driven upscaling is more often poor than not due to purely mathematical reasons.

Can I be the first person to say "eww". XBRZ and similar scalers always ruin the source art in some way.

They may ruin pixel art, but the games I mentioned are notorious for using very small sprites rendered from 3D models. Such sprites lack the artistic conventions of pixel art (e.g. contrast, outlines, palette, etc, etc) and thus aren't really ruined by xBRZ -- especially if we upscale by a small factor.

This was the part of your post I was going to reply something useful to. Disable vsync in your graphic driver. dgVoodoo2 doesn't like vsync for some games.

Well, if I enable vsync, those games come down to a crawl, like one frame every few seconds (!) I'm pretty well aware of it. Without Vsync, FPS is just halved or cut by a third. This is only noticeable in games that don't use any 3D surfaces. And that's very suspicious.

Merely wrapping Fallout Tactics in dgVoodoo2 -- without really changing/upscaling anything -- results in a noticeable performance hit, in just about every dgVoodoo mode that doesn't break the game altogether. Arcanum is literally decimated.
eierfrucht
Newbie
 
Posts: 4
Joined: 2019-2-07 @ 23:37

Re: Accelerated 2D upscaling for old 2D games.

Postby ZellSF » 2019-2-09 @ 13:05

eierfrucht wrote:
If you set dgVoodoo2 to use any of the scaling modes below the first three,

I may sound stupid, but what do you mean by 'below the first three'?
First three in this dropdown:
Clipboard01.png

eierfruch wrote:Well, if I enable vsync

You don't need to not enable vsync, you need to explicitly force it off in your graphic card drivers.
ZellSF
Oldbie
 
Posts: 1390
Joined: 2006-1-01 @ 18:19

Re: Accelerated 2D upscaling for old 2D games.

Postby Dege » 2019-2-10 @ 13:24

Yes, as Zell says, dgVoodoo has its own scaling mechanism for 'Stretched, *' and 'Centered, keep Aspect Ratio' scaling modes. This is plain bilinear but you can force point sampled in the config.

'Unspecified', 'Centered' and 'Stretched' are up to the driver/display (the 3 first options from the dropdown list).

So, basically you'd like new scaling filters beyond the bilinear/point sampled ones?
Dege
Oldbie
 
Posts: 1377
Joined: 2003-9-04 @ 11:06

Re: Accelerated 2D upscaling for old 2D games.

Postby ZellSF » 2019-2-10 @ 14:43

If you're taking suggestions for adding new scaling filters, I really like lanczos scaling for somewhat high resolution (1024x768 and above) sources. It looks sharper than bilinear, without actually looking different.
ZellSF
Oldbie
 
Posts: 1390
Joined: 2006-1-01 @ 18:19

Re: Accelerated 2D upscaling for old 2D games.

Postby eierfrucht » 2019-4-16 @ 01:18

Okay, I must be totally stupid and ignorant. I've been tampering with the MM6-7-8 Merge Mod that basically runs on the Might & Magic 8 engine beefed up with GrayFace's MM8 2.2 Patch

I'm using the stable dgVoodoo v2.55.4 with it so the 3D part of the game looks better than ever:

Image

But no matter which dgVoodoo.conf filtering options I choose, the 2D parts (sprites making up the user inteface) are jaggy at all times:

Image

I tried everything from App Driven to 16x Anisothropic, also tried switching Bilinear Blit Stretch on and off -- it's all the same!

All I want is a bit of Bicubic filtering for the UI bits:

Image

Can we have this with the state-of-art dgVoodoo 2.55.4? Which values should be set in dgVoodoo.conf then?

This issue plagues me in many other older games -- all the 2D elements get jaggy which I can't stand, but I wouldn't mind a bit of blurring instead. Or maybe even some xBRZ goodness if it ain't too hard on the CPU...
eierfrucht
Newbie
 
Posts: 4
Joined: 2019-2-07 @ 23:37

Re: Accelerated 2D upscaling for old 2D games.

Postby eierfrucht » 2019-4-16 @ 02:05

Arcanum behaves quite differently. It goes down to a crawl if I enable MSAA, any form of filtering, or set any option to anything other than 'Off' or 'App Driven'

But it does get a nice smoothed out picture if I enable 'Bilinear Blit Stretch'

Here's a screenshot of Arcanum patched (with HD Mod) for 1280x720 but upscaled with dgVoodoo 2 v2.55.4 to 1920x1080:

Image

Worse than Bicubic, I suppose, but at least it works!

Alas, when I get past the character creation screen, I start getting this mess:

Image
eierfrucht
Newbie
 
Posts: 4
Joined: 2019-2-07 @ 23:37


Return to dgVoodoo General

Who is online

Users browsing this forum: No registered users and 1 guest