"Smart" texture filtering. Is this the future?

marconelly! said:
Look at the circles at the ground, HQ3x clearly fails there.

No, it doesn't fail. It does exactly what it's suppose to do - blurs similar colors. The color of circles is similar to the color of the background. So the whole area should be smoothed, and it is smoothed. Another example - the border of the cloud is sharp, but the inside of the cloud is blured/smoothed. It's not some kind of fluke, no - it's a main feature of the filter.

The HQ filter makes nice sharp borders between the areas of "different" colors, and blures "similar" colors. The "similarity" is defined by the hardcoded threshold.

The scale3x is not smart enough to understand the idea of "similar" colors, it only understands the "same" ones. It regards (200,0,0) and (201,0,0) as totally different colors, which obviously isn't a good thing for pattern recognition.

You can easily "dumb down" the HQ filter by setting the hardcoded color "treshold" constant to zero - the result will look very much like antialiased scale3x.

MaxSt.
 
Well, you can defend it all you want, but the only relevant result is the picture we get in the emulators today, and HQ's output is not perfect.

Here are the SMB pictures where it's clear as day how HQ fails in certain conditions (look at the wavy lines at the ground) If it's supposed to blur them, that's some butt ugly blurring, IMO.

*Copy and Paste links to a new window*

Original:
http://proth.bravepages.com/temp/comparer/normal.png

Scale3X:
http://proth.bravepages.com/temp/comparer/scale3x.png

HQ3X:
http://proth.bravepages.com/temp/comparer/hq3x.png

HQ4X:
http://proth.bravepages.com/temp/comparer/hq3x.png
 
I don't think any of those filter modes are "the future" in that they will replace anisotropic. Their is some usefulness for special cases like cel-shaded graphics and 2D scaling in emulators, but when it comes to realistic real-time 3D the results are ugly.
 
marconelly! said:
HQ's output is not perfect.

There is no such thing as "perfect" magnification filter. Your idea of comparing it to some imaginary "perfect" filter is totally false.

We can only compare existing filters - how they perform in all situations.

marconelly! said:
Here are the SMB pictures where it's clear as day how HQ fails in certain conditions (look at the wavy lines at the ground) If it's supposed to blur them, that's some butt ugly blurring, IMO.

Yes, it is suppose to blur them, because the colors are similar. I already explained that.

You can call the bluring ugly, but try magnifying normal.png in any popular gfx editor, like Photoshop or Paint Shop Pro using any possible filters - bilinear, bicubic, whatever. You will not get better bluring.

MaxSt.
 
Yes, it is suppose to blur them, because the colors are similar. I already explained that.
All I know is that the particular area on a picture scaled using Scale 3X method looks much better. I don't understand why are you so adamnant about this, but if you are the author of the HQ algorithm, I'd suggest you look into that particular issue instead defending it so blindly. I'm not here to put down your programming skills, as I honestly don't give a rat's ass which algo scales picture better, I'm just saying what I see, and what I think looks better on one or the other.

To me, that blur on the SMB picture looks so ugly that it nullifies advantages HQ has on other graphics elements on that screen. Scale 3X picture at least looks even, there's nothing that sticks out like sore thumb.
 
MfA said:
What distance function does hq3x use?

max(abs(Y1-Y2), abs(U1-U2), abs(V1-V2)) in YUV color space.

And it tolerates more difference in Y channel, then in U, V.

MaxSt.
 
marconelly! said:
All I know is that the particular area on a picture scaled using Scale 3X method looks much better.

When you looking at the issue from the developer's perspective, you undersand that the algorithm is always a compromise. You change the algo in order to make a particular area look better - you make some other area look worse.

That's why it only make sense to judge it as a whole thing. From developer's perspective, of course.

marconelly! said:
I honestly don't give a rat's ass which algo scales picture better

Well I do care about the quality of the algorithm. As a whole thing. And I know that with every compromise there are always someone who unhappy about some detail.

marconelly! said:
I'd suggest you look into that particular issue instead defending it so blindly.

At the development stage I looked into all kind of issues. I found the best compromise to satisfy my subjective judgement, and that's it.

Scale3x is too sharp for my taste. And there are lot of patterns it can't really handle.

MaxSt.

P.S. One more thing - the simple modification of HQ filter I described above (setting threshold constant to zero) was actually implemented by the author of scale2x. He called the modification LQ2X and included it in his AdvanceMAME emulator along with the "classic" HQ2X. Currently the hq2x/lq2x code is used it many other emulators - in VBA 1.7, for example. I don't like LQ2X, because is has no blur at all, but you'd probably like it - for the same reason.
 
You might be able to implement HQ2X and HQ3X with PS3.0, but it will not be easy. They are rather complex algorithms that use all sorts of branching which includes a very large switch statement! They also do a huge number of lookups into the source image.

Scale2x and Scale3x on the otherhand are really simple algorithms. Just a few simple comparisons.
 
Colourless said:
You might be able to implement HQ2X and HQ3X with PS3.0, but it will not be easy.

There is no point to do that.

1. CPUs are fast enough.
2. HQ2X is not really for 3D, it's for 2D.
3. "Smart filtering" is for 3D, and it's a totally different algorithm.

The interesting thing would be to implement "Smart filtering" in shaders.

MaxSt.
 
Back
Top