Upscaling graphic filters

As far as I understand VCMI uses some not sophisticated upscaling (SDL_Extensions.cpp: // And upscaling looks awful right now - should be fixed somehow) - have you considered using SAI or HQnx algorithms? This should greatly improve quality of original graphics, and you should not worry about performance as scaling can take place on loading data files. They give good results for drawn comic-style artwork (as opposed to real-life photos), just take a look at dosbox, ScummVM or wiki.

Okay, but VCM uses no upscaling at all, as far as I know. The only issue is with background image, which is actually dowscaled from 1920 x 1200 or something.

So what’s about the hi-res mode? Adventure map without scaling simply covers larger area, but castle or battle screen must have some (even naive) scaling. That’s where such filters go into action.

[sorry about guessing, but I haven’t seen VCMI running since last summer, I must find my data files]

H3 data is not drawn and definitely not comic-style (rendered 3d models). So such filters may not be a good idea.

Main problem with upscaling anything but static images is GUI: currently there is no easy way to scale whole window (like town). Another issue is speed - scaling large amount of data will be slow. Lack of HW acceleration in vcmi makes scaling of UI too slow to be usable.

Graphics have sharp (high contrast) lines, so they should work (at least SAI - just see doom examples). Definitely better than bicubic-like or libswscale which perform well for natural objects.

ScummVM and dosbox cope with that dynamically. Here you scale each texture just once, on load. If this would be too slow (should not), I can imagine offline transformation approach (converting original data to new files with some separate tool).

Notice that there are 2x, 3x and some 4x good quality filters available, which lead to some specific fixed resolutions available. If one needs something between, maybe (needs checking on real data) it’s better to upscale larger with such filter, and then downscale using resampling (with antialiasing).

As an example, I took first "Recent Public Pics"
and rescaled it with HQ2x

Please don’t tell me this ain’t better (than first image with normal x2) - and the effects might be even more good looking if the textures were rescaled independently (without background or other objects covering first plane). This is cartoon-style pixart and that’s the right upscaling to use. Now, the big image downscaled to 1024 height as an example screen resolution, this time using regular algorithms:

It will. For me upscaling battle background image using hq2x takes more than a second. And I think this is less than 10% of total size of graphics on battle screen.

And for comparison, same image upscaled using GIMP: … icubic.png … linear.png
From my point of view bicubid upscaling looks much better than downscaled hq2x (less blurry). And using hq2x without any downscaling will need 1600x1200 monitor. This is extremely small percentage of users.

And don’t forget this:

By “scaling window” I mean scaling all controls and their positioning - all of this is hardcoded. Our GUI does not supports scaling at all. And this is not something that can be fixed easily.

They do not. Castle and battle screens just open as windows, not covering the whole screen space. [like here ]
Currently, VCMI does not upscale anything.

ATM it would not be feasible due to efficiency reasons. When the OpenGL port is ready that may change though. (Still, it’ll need considerable work in GUI framework.)
I’d rather say it’d better to create new high-res graphics for the UI, than upscale the original one. There’s only so much we can make of graphics designed for 800x600 display.

Only if you look at the grass. Take a look at faces, especially the three on the right in upper bar. As for efficiency, hqx library was designed to do 256x256 in real time. I’m not sure if bicubic is faster (or matters). Especially if one can select quality in options (like in previously mentioned projects).

I do have on a few years old panel, but indeed, currently people buy low-height panoramic crap…

That’s a shame… But OK, maybe indeed original H3 has too good quality to make a difference worth the effort.