It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
I've been playing with a few different scalers and since I couldn't get really satisfactory results using DOSBox' included scalers I tried something else: Recording a video and running it through a little PaintShopPro script applying a median filter (think of it as a kind of "majority vote" system where each pixel is determined by looking at a group of pixels and finding the one that's most common... mathematically that's a lot of bull, but it's roughly the net result). The result works pretty well to the point where I'd really love to play the game like that.

http://video2.tapper-ware.net.dest.at/rayman.webm
(The video should play in recent Firefox and Chrome versions, but since it requires a lot of processing power to decode, you might want to open it in a dedicated player like VLC instead... 1080p/60 is something you rarely find in the wild and it eats CPU-cycles for breakfast).


DOSBox supported games don't really look their best using the standard configuration. By changing the configuration it's possible to get better quality, but from what I can tell nothing even remotely as good as this...

Question: A lot of GOG games would benefit tremendously from better scalers, so is this something that GOG could either work on directly or through a "bug bounty"?
avatar
hansschmucker: I've been playing with a few different scalers and since I couldn't get really satisfactory results using DOSBox' included scalers I tried something else: Recording a video and running it through a little PaintShopPro script applying a median filter (think of it as a kind of "majority vote" system where each pixel is determined by looking at a group of pixels and finding the one that's most common... mathematically that's a lot of bull, but it's roughly the net result). The result works pretty well to the point where I'd really love to play the game like that.

http://video2.tapper-ware.net.dest.at/rayman.webm
(The video should play in recent Firefox and Chrome versions, but since it requires a lot of processing power to decode, you might want to open it in a dedicated player like VLC instead... 1080p/60 is something you rarely find in the wild and it eats CPU-cycles for breakfast).


DOSBox supported games don't really look their best using the standard configuration. By changing the configuration it's possible to get better quality, but from what I can tell nothing even remotely as good as this...

Question: A lot of GOG games would benefit tremendously from better scalers, so is this something that GOG could either work on directly or through a "bug bounty"?
While it looks very smooth it also really has the feeling of one of the filters over it. I tried running X-com with Hq3x in Dosbox once, the effect looked a bit like that, only not smoothed so much and made it look more like an abstract painting at times.
Dosbox is itself rather CPU heavy, and scalers eat further resources. I think more complex scalers would need to be implemented as a hardware shader or something to avoid having the entire thing slow down.
Going from my single core CPU to a quad meant my Dosbox performance went down the drain rather seriously. I'm afraid too heavy scalers would do the same thing as the output of Dosbox needs to be quite well synced to work.
Filters need to match the game's style to look good. I'm attaching a screenshot of Rayman with the HQ3x filter applied. As you can see, it stumbles quite a lot since Rayman uses very similar, but different colors to simulate lighting. There is no one filter to rule them all... but each game could come with a "suggested" filter, so that users could chose between "Pixel-preserving", "Smooth" and "Aggressive Image Optimization".

As for performance... that's definitely part of the problem and it would have to be fixed along with this. Why are all advanced filters running in software? the GL output would easily be able to run it as a shader while all it handles right now is bliting. I can't even get it to do bilinear scaling... It's not just the HQ filters that would benefit: Even simple 2x scaling would be faster.
Attachments:
hq3x.png (320 Kb)
avatar
hansschmucker: Filters need to match the game's style to look good. I'm attaching a screenshot of Rayman with the HQ3x filter applied. As you can see, it stumbles quite a lot since Rayman uses very similar, but different colors to simulate lighting. There is no one filter to rule them all... but each game could come with a "suggested" filter, so that users could chose between "Pixel-preserving", "Smooth" and "Aggressive Image Optimization".

As for performance... that's definitely part of the problem and it would have to be fixed along with this. Why are all advanced filters running in software? the GL output would easily be able to run it as a shader while all it handles right now is bliting. I can't even get it to do bilinear scaling... It's not just the HQ filters that would benefit: Even simple 2x scaling would be faster.
My guess is compatibility. And I'm not sure if a shader can resize an output.
I don't know much about how it works, but if we're working with shaders, couldn't you also suggest a parameter to point to a shader script file, thus allowing you to write a custom shader for whichever game you have running.
The problem being that writing a shader, especially one which tries to make a special filter effect would take a long time. Not to mention some games do have different looks throughout the game, what works with one place might not in another. writing a special shader to work with all games here would really put a lot more work on writing and testing.

But yeah I like the idea of doing scaling/filtering in shader with more shaders.

I don't think Hq3x looks that bad in the shot though. My laptop isn't able to pull it, it goes to sit in a corner and sulk whenever you say openGL to it, and most games have trouble enough running in Dosbox without the scaler. I think the heavier abstraction might cause a lot of trouble for lower end systems.

If I'm not mistaken though, I think someone might've forked off from the Dosbox source and made a modified version which does all those fancy things. I'm sure I saw a thread about how to get System shock running on a special dosbox build which added some special scaler which made it a lot prettier...and my laptop run about 2fps vs. the full speed I manage without trouble in normal Dosbox.

Edit: I knew I'd seen something like that
http://www.si-gamer.net/gulikoza/dosbox.html
Direct3D output mentioned there, and support for Pixel Shader 3.0 if your card supports it.
Post edited March 30, 2011 by DrakeFox
Thank you, thank you, thank you :)

The builds on that page are apparently no longer maintained, but I found something interesting in the SVN build page that he links to:

http://ykhwong.x-y.net/

"Oct. 3. 2010

Direct3D pixelshaders are available and some minor bugs fixed. (SVN build for Windows)
x86-64 build for Linux (20101001) was uploaded."

this looks promising!
I've played around with these builds and there really is a great filter included: GS4xSoft.fx

It gets very similar results up to 1600x1000 ... Rayman could probably benefit if it were slightly more aggressive, but it's still an amazing improvement over the standard filters and it actually makes DOSBox run faster, since the scaling is handled entirely by the GPU.

I've recorded another video using it so you can compare for yourself (the video was recorded without sound and it stutters a bit since my PC had some problems keeping up while emulating and recording losslessly-compressed video):

http://video2.tapper-ware.net.dest.at/rayman_GS4xSoft.webm

It doesn't take a lot of changes to your configuration if you have the GOG Rayman version installed:

1. Go to your RaymanForever folder and rename DOSBOX to something else
2. Create a new DOSBOX folder
3. Get a build from http://ykhwong.x-y.net/xe/dosbox_data/143 and extract it to your new DOSBOX folder
4. Open that folder and rename dosbox_run.exe to dosbox.exe
5. Copy the "SHADERS" subdirectory to the Rayman directory.
6. In the Rayman directory, open dosboxRayman.conf with notepad
7. Set fullresolution to the biggest multiple of 320x200 that still fits your screen, for example 960x600, 1280x800, 1600x1000
8. Set output to direct3d
9. After usescancodes=true add a new line saying pixelshader=GS4xSoft.fx
10. Set scaler to none
Post edited March 30, 2011 by hansschmucker
Very nice guide there. Must try it out when I get around to using my desktop. Good work Hans :-)

What happens if you combine a scaler and a shader I wonder though? Thinking maybe use one to upscale and perform one kind of filter action, then having the next one boost the size and effect again. It might become an utter mess, but it might also potentially create a nifty effect.
avatar
DrakeFox: Very nice guide there. Must try it out when I get around to using my desktop. Good work Hans :-)

What happens if you combine a scaler and a shader I wonder though? Thinking maybe use one to upscale and perform one kind of filter action, then having the next one boost the size and effect again. It might become an utter mess, but it might also potentially create a nifty effect.
Actually, you can stack them quite nicely. The shader operates on whatever the filter spits out... I just didn't like those results on Rayman :)