Adventure Game Studio

AGS Development => Engine Development => Topic started by: RyanBram on Wed 03/04/2013 17:44:20

Title: New Graphic Filter for AGS
Post by: RyanBram on Wed 03/04/2013 17:44:20
Current version of AGS (3.2.1) has three graphics filter. Those are Nearest Neighbour (2x, 3x, 4x), and Hqx (2x and 3x). But I just read that there is a new filter called xBR (stands for Scaling by Rules) developed by Hyllian. xBR seems exceeds Nearest Neighbour and even Hqx in term of quality as shown in below screenshot (https://lh3.googleusercontent.com/-ZT7Cirxa9oA/UVOYXcv-D-I/AAAAAAAAAeU/t2xKHv7bB2g/s46/Eliwood.png):

Spoiler
(https://lh5.googleusercontent.com/-_5H0dQG87ww/UVOYbfj8ZNI/AAAAAAAAAek/ujnx9ap4Wgw/s552/Eliwood_12x.png)(https://lh4.googleusercontent.com/-pxrHDKXJbl0/UVOYagwy_DI/AAAAAAAAAec/hPClu7y8dEk/s552/Eliwood_12x%2528xBR%2529.png)
[close]

I think it will be nice if AGS also incorporate this filter to giving better experience for players especially when playing low res games in HD screen.

The development thread can be found at: http://board.byuu.org/viewtopic.php?f=10=2248
And the source code (xbr.cpp) can be found at: http://sourceforge.net/p/paintown/code/7849/tree/trunk/src/util/graphics/sdl/
Standalone software can be seen at this thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47954.0

Regards,

RyanBram
Title: Re: New Graphic Filter for AGS
Post by: Crimson Wizard on Wed 03/04/2013 21:28:30
That looks really nice and styly.
If there's an open source code, I believe it won't be difficult to add new filter to AGS.

I don't know if we are allowed to use the code under GNU GPL though (having engine under Artistic License). I apologise, but I am really not very well versed in understanding license restrictions and compatibilities  :embarrassed:.
Title: Re: New Graphic Filter for AGS
Post by: SpeechCenter on Wed 03/04/2013 21:47:08
As far as I know, as long as AGS is not GPL it cannot incorporate GPL code.
I can think of 2 options:

Obviously option 1 is preferable if possible.
Title: Re: New Graphic Filter for AGS
Post by: RyanBram on Sat 06/04/2013 13:11:46
Quote from: Crimson Wizard on Wed 03/04/2013 21:28:30
I don't know if we are allowed to use the code under GNU GPL though (having engine under Artistic License). I apologise, but I am really not very well versed in understanding license restrictions and compatibilities  :embarrassed:.

Yeah, GPL and Artistic License 1.0  is incompatible (http://en.wikipedia.org/wiki/Artistic_License) that means either AGS or xBR should relicensing its software under compatible license. I contacted the author of xBR and fortunately he willing to re-license xBR source code under LGPL (http://board.byuu.org/viewtopic.php?f=10=2248&sid=d960557a07dd7b6914cafe5b1a0ab16a&start=225) that means AGS can adopt it as external library/module without the needed to relicensing AGS itself.

I am very curious to see next release of AGS with this filter.


Best regards,

RyanBram
Title: Re: New Graphic Filter for AGS
Post by: zabnat on Mon 08/04/2013 11:03:13
I don't see the point of adding any other than nearest neighbor filters to the engine. I mean they only enable the user to make the game look like something different than what the author intended.
Title: Re: New Graphic Filter for AGS
Post by: DrJone.s on Mon 08/04/2013 22:35:56
These filters appeared as soon as TVs became HD and people tried to play low res games designed for old 625 scanlines models found out how incredibly ugly they looked in the new models. The effect caused by playing the old games in new monitors wasn't intended by the author, either.
Title: Re: New Graphic Filter for AGS
Post by: Sslaxx on Tue 09/04/2013 11:53:15
Quote from: RyanBram on Sat 06/04/2013 13:11:46
Quote from: Crimson Wizard on Wed 03/04/2013 21:28:30
I don't know if we are allowed to use the code under GNU GPL though (having engine under Artistic License). I apologise, but I am really not very well versed in understanding license restrictions and compatibilities  :embarrassed:.

Yeah, GPL and Artistic License 1.0  is incompatible (http://en.wikipedia.org/wiki/Artistic_License) that means either AGS or xBR should relicensing its software under compatible license. I contacted the author of xBR and fortunately he willing to re-license xBR source code under LGPL (http://board.byuu.org/viewtopic.php?f=10=2248&sid=d960557a07dd7b6914cafe5b1a0ab16a&start=225) that means AGS can adopt it as external library/module without the needed to relicensing AGS itself.
But the AGS source code is licensed under version 2 of the Artistic License, which is. http://www.gnu.org/licenses/license-list.html#ArtisticLicense2
Title: Re: New Graphic Filter for AGS
Post by: BigMc on Tue 09/04/2013 18:51:36
Yes, but that would make AGS effectively GPL licensed. CJ doesn't want that: http://www.adventuregamestudio.co.uk/forums/index.php?topic=43383.0
Title: Re: New Graphic Filter for AGS
Post by: RickJ on Tue 09/04/2013 23:43:12
Here is what CJ actually said about the LGPL ...

http://www.adventuregamestudio.co.uk/forums/index.php?topic=43383.0
Quote
If you're thinking about adding third-party libraries, remember that AGS must not use GPL libraries as the GPL license is too strict. Libraries licensed under the Lesser GPL (LGPL) are ok, however. Always carefully read the license of any third-party libraries before proposing to use them in AGS.
Title: Re: New Graphic Filter for AGS
Post by: BigMc on Tue 09/04/2013 23:53:41
EDIT: Nevermind, I saw now that the filter will maybe be relicensed under LGPL.
Title: Re: New Graphic Filter for AGS
Post by: RickJ on Wed 10/04/2013 00:02:36
Quote
... fortunately he willing to re-license xBR source code under LGPL
Title: Re: New Graphic Filter for AGS
Post by: Monsieur OUXX on Fri 29/04/2016 16:59:44
Sorry for necroposting but I've rediscovered this (http://filthypants.blogspot.fr/2012/03/xbr-vs-hqx-interpolation-filter.html) and was pleasantly surprised by how active the developers have been, and how some of the filter's variations are available ready-to-use as shaders or as a standalone C code, etc. (see the UPDATES at the end of the page). They offer several levels of correction, depending on how much each variation fits with the style of a game.

If the license thing is not an issue, as it seems to be suggested above, then I'm still pushing in favor of adding the xBR algorithm. It could even allow to drop the other algorithms altogether (except nearest neighbour), which means less maintenance.

Title: Re: New Graphic Filter for AGS
Post by: selmiak on Fri 05/08/2016 17:58:41
xBR looks very smooth. Are we getting this?
Title: Re: New Graphic Filter for AGS
Post by: Knox on Wed 11/04/2018 17:49:10
Hi,

Sorry for re-opening this old thread, but I was wondering if a "bicubic" scaling filter would eventually be possible to add to AGS in the near future? It seems the two current options aren't giving great results when going full-screen (from 1600 x 900 to 1920 x 1080)