Better filtering?
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Better filtering?
How likely is it that better filtering options are going to be put in Exult? I just saw some of the examples of the HQ3X and HQ4X filters (http://www.hiend3d.com/hq3x.html), and they look very good to me.
Re: Better filtering?
This has come up before: http://exult.info/forum/viewtopic.php?p=16271#p16271
Seems like there's an issue with speed, which might not matter with modern CPU's; plus Exult's scaling system will need to be modified.
Seems like there's an issue with speed, which might not matter with modern CPU's; plus Exult's scaling system will need to be modified.
Re: Better filtering?
Thanks for that link. However, since the last sign of life was in 2003, I'm not holding my breath. Does anyone here know whether the Exult team (or what's left of it) is still planning to implement this or other options?
P.S.: Please don't think that I'm ungrateful for what's already there. Exult is a gift to us Ultima fans. Having it improved even more would still be nice.
P.S.: Please don't think that I'm ungrateful for what's already there. Exult is a gift to us Ultima fans. Having it improved even more would still be nice.
Re: Better filtering?
I've started looking at the filtering code. I'd like to implement the 3x filter in Exult, but don't want to promise anything, since it might be too slow.
Also, seems like I have a lot more fun real-life activities to distract me, along with some not-so-fun activities (like filing taxes:-( ).
Also, seems like I have a lot more fun real-life activities to distract me, along with some not-so-fun activities (like filing taxes:-( ).
Re: Better filtering?
Thought I'd start with Hq2x. You can try it out in the latest snapshot (might have to wait for tomorrow's). Performance seems fine. I think it looks good, but probably just a little better than the other filters.
Hq3x will be next.
(Developer's note: The trick they did of interpolating colors by adding the 32-bit values is really clever; but I wish they'd mentioned that the reason it works is each color's value (0-255) always has it's 2 low bits cleared.)
Hq3x will be next.
(Developer's note: The trick they did of interpolating colors by adding the 32-bit values is really clever; but I wish they'd mentioned that the reason it works is each color's value (0-255) always has it's 2 low bits cleared.)
Re: Better filtering?
I didn't know that Hq2x/Hq2x would look good on anything other than NES games. Very nice.
-
- Site Admin
- Posts: 731
- Joined: Thu May 14, 2020 1:34 pm
Re: Better filtering?
I tried Hq2x in Pentagram and the results were very disappointing. For the most part it was good, but it really really broke badly when doing the fine cross faded palette adjustments when you were under the effects of shrooms. There was really bad temporal artefacting. Even when standing still the lines around the screen would change and pixels would change colour depending on how far the palette transition had progressed. Hq2x and friends work using YUV and shroom mode in Ultima8 really screws around with what happens to Y and U the comonents.
Re: Better filtering?
Er, Hq2x/Hq3x. You know what I meant.
The filter works wonders for reading signs in Exult. Beautiful!
The filter works wonders for reading signs in Exult. Beautiful!
Re: Better filtering?
I don't see a big difference with the signs, but the usual text fonts and numbers look alot sharper now and are easier to read.
Re: Better filtering?
Any screenshots for lazy people?
Re: Better filtering?
hmm, looks both nice and not
On the one hand I like a lot how it looks, but when I look closer white pixels are too white in comparison... Oh well, got to try to actual play it with that filter
On the one hand I like a lot how it looks, but when I look closer white pixels are too white in comparison... Oh well, got to try to actual play it with that filter
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
-
- Site Admin
- Posts: 731
- Joined: Thu May 14, 2020 1:34 pm
Re: Better filtering?
Hmm.. the reason why the white pixels are too visable is because the rest of the roof is too dark. Gamma correct filtering would probably fix that problem.
Re: Better filtering?
Hq3x is in there now. Looks nice, but it's definitely stressing my CPU. I may fiddle a bit with optimizing it.
Re: Better filtering?
Looks great!
It also runs fine for me, but my specs are reasonably high, so I can't give any input on performance.
It also runs fine for me, but my specs are reasonably high, so I can't give any input on performance.
Re: Better filtering?
Looks as if someone had ran U7 though a Photoshop filter. I think "oil paint" is the one I'm thinking of.
But that can be misunderstood. I think U7 now looks better than ever.
My system runs on a humble AMD Sempron 2600+ 1.86GHz processor.
Hq2x makes Exult take about 30-50% CPU cycles while just standing around Trinsic right after the intro. Switching to Hq3x hardly makes any noticable difference. Maybe +5%.
Running around Trinsic takes 60-70% CPU. All in all, looks good, runs fine for me.
Nice work DrCode
But that can be misunderstood. I think U7 now looks better than ever.
My system runs on a humble AMD Sempron 2600+ 1.86GHz processor.
Hq2x makes Exult take about 30-50% CPU cycles while just standing around Trinsic right after the intro. Switching to Hq3x hardly makes any noticable difference. Maybe +5%.
Running around Trinsic takes 60-70% CPU. All in all, looks good, runs fine for me.
Nice work DrCode
Re: Better filtering?
SuperEagle looks a little more like an oil painting. Hq2x works fine on my Athlon 3000+ (2.1GHz), but Hq3x slows the game down considerably. (in SI) There is a bug where the mouse stops working when resolution is set to 320x200 scaled with Hq3x in fullscreen mode.
Re: Better filtering?
Here are the results in my laptop (Pentium IV 2.2GHz, 1GB Ram, crappy on-board video card):
- Super2xSAI: averages around 7% CPU time when idle, can go up to ~37% when walking quickly in a place with lots of buildings (e.g., Fawn, Britannia).
- Hq2x: in the same situations, the numbers are 14% and 77% (up to 84% with NPCs walking around).
- Hq3x: 20% idle, 90% when walking quickly across Fawn (up to 96% with lots of NPCs).
Given the choice, I think I'll prefer Hq2x any time over Super2zSAI, and I will likely use Hq3x. I will only have to change the Exult menu to not use Hq3x, as it will end up being larger than the screen...
- Super2xSAI: averages around 7% CPU time when idle, can go up to ~37% when walking quickly in a place with lots of buildings (e.g., Fawn, Britannia).
- Hq2x: in the same situations, the numbers are 14% and 77% (up to 84% with NPCs walking around).
- Hq3x: 20% idle, 90% when walking quickly across Fawn (up to 96% with lots of NPCs).
Given the choice, I think I'll prefer Hq2x any time over Super2zSAI, and I will likely use Hq3x. I will only have to change the Exult menu to not use Hq3x, as it will end up being larger than the screen...
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Re: Better filtering?
I'm getting similar results with a 2.8Ghz Athlon from a few years ago. This is compiled for debugging, so it's possible that turning on higher compiler optimization could improve this a bit.
I can also see one or two ways the algorithm could be improved, but haven't had time to play with it yet.
I can also see one or two ways the algorithm could be improved, but haven't had time to play with it yet.
Re: Better filtering?
Last night, I recompiled the scalers with -O3 enabled. I took around 5 minutes! But I think it helped, because walking around with hq3x seemed a lot smoother, and CPU usage stayed around 65%.
I'm guessing that the Windows version of Exult is already compiled with decent optimization turned on.
I'm guessing that the Windows version of Exult is already compiled with decent optimization turned on.
Re: Better filtering?
Marzo:
> - Hq3x: 20% idle, 90% when walking quickly across Fawn (up to 96%
> wiith lots of NPCs).
Since you specify this... I suppose the filter is applied to each graphic element prior their offscreen drawing? I always thought such filtering algorithms were meant to be applied to the whole screen..
> - Hq3x: 20% idle, 90% when walking quickly across Fawn (up to 96%
> wiith lots of NPCs).
Since you specify this... I suppose the filter is applied to each graphic element prior their offscreen drawing? I always thought such filtering algorithms were meant to be applied to the whole screen..
Re: Better filtering?
In this case, it would be a bad idea to use it as a post-processing filter. Since the palette of Ultima 7 is so limited, and since there are a lot of black outlines, you would get unwanted assumed shapes from the filter when shapes overlap.
It's implemented properly as-is. Sure, it would run faster if applied afterward, but it wouldn't look right.
It's implemented properly as-is. Sure, it would run faster if applied afterward, but it wouldn't look right.
Re: Better filtering?
I don't think he was suggesting the way the filter is implemented should be changed.
I thought it was applied to the whole screen too, and had some kind of optimization which caused it to run faster when not much is happening on-screen, but that's because I have no idea how it works. I thought applying a scaler to individual shapes would cause image artifacts when drawn to the screen.
I thought it was applied to the whole screen too, and had some kind of optimization which caused it to run faster when not much is happening on-screen, but that's because I have no idea how it works. I thought applying a scaler to individual shapes would cause image artifacts when drawn to the screen.
Re: Better filtering?
SB-X is correct, it *is* applied for the whole screen. I also forgot to mention that this was in windowed mode; the processor usage would probably be a lot lower if I used full screen. My intent in showing the effects of moving in a place with lots of things is that, while Hq2x and Hq3x had an effect on average CPU use, other aspects of Exult tend to use a lot more CPU cycles. I shouls have been more clear about that.
------
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Marzo Sette Torres Junior
aka Geometrodynamic Dragon
[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
Re: Better filtering?
Aah, I get it now Right right right. I haven't fiddled with the sources since version 0.9X or so, so I wonder [just a slight OT diversion] - what parts of the engine are currently running in separate threads? Or is it everything still single-threaded?
Re: Better filtering?
As far as I know, it's all in one thread except for the audio, which SDL handles in a separate thread.
Re: Better filtering?
Dosbox uses an architecture thats aplies filters only when the screen updates (and various other tricks i belive), and that makes HQ2 tolerable. Just saying.
Re: Better filtering?
I believe that's how Exult works too. But U7's palette rotation means that updates are happening all the time.