REQUEST: Graphic Filters (IMPLEMENTED)

Started by Snarky, Sat 11/02/2006 17:12:31

Previous topic - Next topic

Snarky

This has been asked in the past, but that's nearly two years ago now, and maybe things have changed.

It would be great if AGS had graphic filters to scale up the resolution of low-res games, like ScummVM and DOSBox do. The most desirable ones would be advmame and hq2x/3x/4x, of course.

There were apparently some issues with the licensing of some of the filters (it had to be open-source, or it had to be freeware), and that they would require 16 or 32 bit. Still, it seems like a feature that would be well worth it.

Helm

#1
As long as you can turn it off in the setup, I'm happy. Some art would benefit from filtering, other art, not so much. Would be a nice feature to have, I think.

Ran some tests that speak for themselves when it comes to detailed pixel art..

www.locustleaves.com/output.png ( original http://pixeljoint.com/files/icons/full/egabg.gif)
www.locustleaves.com/output2.png (original http://pixeljoint.com/files/icons/full/stompboxlarge.png)
www.locustleaves.com/output3.png (original http://pixeljoint.com/files/icons/full/lolmetal23.png)

Any art that isn't flat-type will not benefit from this much.
WINTERKILL

Adamski

If something like this goes in, it should also be able to be disabled at the disgression of the developer.

scotch

Should we also be able to turn off the option to run in a window or to play if you have your audio muted?

Adamski

Well no, but you understand that after working so long on the asthetical side of a game you don't want people to bam up the resolution with a filter and play an oddly blurred version of your game just because they can ;)

But then I'd be equally unhappy if people played my games with the sound muted, so I guess I'll just keep quiet.




scotch

A more useful comment: I don't think these filters would work well on the majority of AGSer's art, some would look better, I think... if it's no trouble to add them I don't have a problem with it, but before that some more standard scaling options could be nice... for example, I run in 1600x1200, and that makes it very hard to play a 320x200 game in a window, even if I run it at 640x400, so a 3x or even 4x scale option would be handy.

LimpingFish

#6
Speaking of graphic filtery things, but slighty off topic,
The Point And Click Development Kit
has some good fullscreen effect graphic filtery things. Fog, Motion Blur, Bloom...

What are the odds of something similar being introduced into AGS?

Maybe sometime around Ver.3?... :-\

Edit: Oops, linkage error. Fixed now. :P
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

monkey0506

Hmm...seems to redirect to Microsoft.com?  So what you're asking for is for Windows to be implemented into AGS? o.0

Snarky

Quote from: Helm on Sat 11/02/2006 17:38:22
Ran some tests that speak for themselves when it comes to detailed pixel art..

www.locustleaves.com/output.png ( original http://pixeljoint.com/files/icons/full/egabg.gif)
www.locustleaves.com/output2.png (original http://pixeljoint.com/files/icons/full/stompboxlarge.png)
www.locustleaves.com/output3.png (original http://pixeljoint.com/files/icons/full/lolmetal23.png)

Any art that isn't flat-type will not benefit from this much.

I think this understates the results of the scalers. For one thing, they do a great job of smoothing out text, which improves the overall impression a lot. Similarly, interfaces tend to benefit significantly, and they often do a good job on sprites.

Helm

I did not understate anything. I merely illustrated what happens when this specific filter tackles artwork made with pixel-level precision. I'm sure it's great for text, some graphics and simple renders of sprites. Dithering hurts, generally noise patterns hurt, or at best, don't benefit from it.
WINTERKILL

Pumaman

I have experimented with graphic filters, the main problem is the huge performance hit of using one.

I tried running a 320x200 AGS game with the Hq3x filter so that it was actually running in a 960x600 window, and the frame rate went down to 20 fps (rather than 200+ fps just running in a normal 320x200 window).

So I remain unconvinced. I've tried 2xSaI which is slightly faster, but on my machine that still cuts it down to 35 fps just for running a 320x200 game at 640x400.

LimpingFish

How about my suggestion?

The PnC DK pales in comparison to AGS but it does have funky screen manip thingies...

Would they be difficult to implement in AGS?  :-\
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

Snarky

Quote from: Helm on Sat 11/02/2006 23:50:53
I did not understate anything. I merely illustrated what happens when this specific filter tackles artwork made with pixel-level precision. I'm sure it's great for text, some graphics and simple renders of sprites. Dithering hurts, generally noise patterns hurt, or at best, don't benefit from it.

I just meant that the examples you linked to did not give a full picture of the possible benefits of graphic filters for AGS. What you say is true, they don't tend to improve very detailed pixel work.

If the engine can't handle it, performance wise, I guess I'll just have to continue to live without.

Pumaman

In a way, there's no harm in the filters being added as an option -- if they make the game too slow then simply don't use them.

It might well be worth me adding a standard 2x and 3x nearest neighbour filter just so that people can easily play 320x200 games in a window on today's large desktop resolutions.

To recap, the problems with adding other filters were:
* Hq2x/3x/4x only supports 32-bit colour
* 2xSaI has a license which only allows it to be used in open-source projects
* Scale2x has the same license issue as 2xSaI

Rui 'Trovatore' Pires

I'd just like to point out that, if you do it

Quoteso that people can easily play 320x200 games in a window on today's large desktop resolutions

then you should do it at about the same time as you do that "eEventQuitGame" request, remember? It's trackered somewhere. Thing is, if people can start quiting games by clicking the "X" button, and some people might prefer to play resized 320x200, then the programmer should still be able to run code that has to be run at game_quit.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

Ok, this whole filtering business has piqued my interest, so I decided to code it up and see what happened to the frame rate and the picture.

So, as a reference, here's Cedric running at the standard 320x200 resolution, lots of fps:



Next, I went into Setup and changed it to run at 640x400:



This causes quite a significant frame rate drop.
So, I then tried running at 320x200 but adding in a nearest-neighbour 2x filter:



Obviously this looks the same as the old way of running at 640x400, but there's a significant performance improvement in using the filter rather than running the whole game at 640x400.

Finally, I tried a 2xSaI filter:



As you can see, a fairly significant frame rate drop, but it does look kinda neat.

Anyway, as I said I can't actually release any code with 2xSaI in it because of license restrictions, but a standard 2x filter is certainly looking possible.


QuoteThing is, if people can start quiting games by clicking the "X" button, and some people might prefer to play resized 320x200, then the programmer should still be able to run code that has to be run at game_quit.

I'm not sure how this is related. People can run in a window at the moment, adding a filter makes no difference to that.

Rui 'Trovatore' Pires

Yes, but most games are in 320x200 res, which can be very small on peecies with high res. So the programmer can safely assume most people will quit the "game" way.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SMF spam blocked by CleanTalk