tokumaru wrote:
If the end result is better, what they were originally designed to do shouldn't matter. =)
But the end result isn't better, or at least no one's devised a good enough result separately applying scaling filters to different layers.
tokumaru wrote:
That certainly is the easy way out, which is probably why most emulators do it like this.
That's how most scaling is done in almost any situation I can think of, even outside of emulation. You scale the resultant image that is a composition of every layer, not the individual layers themselves.
tokumaru wrote:
A filter working on the final image can't possibly tell that the two black lines are not the same object, and will smooth them out together, effectively "welding" the black lines together:
and it will only like this, because as the sprite moves, the background will be welded to different parts of it, resulting in an inconsistent outline across several frames. That's what I'd call "unintended results".
Yet the alternative isn't any better :/ Fwiw, these scaling filters are designed not to drastically produce inconsistencies with sprite art (rasterized 3D images, however, not so much, and Scale4x gets pretty warped). For the most part, BG and sprite blending is kept to a minimum, simply because of how the algorithms act when encountering groups of different colors. If the results were jarringly inconsistent, it would be of interest to few people.
tokumaru wrote:
Yes, and pixels outside of the sprite will be treated as transparency, which can be processed as if it was a flat color, allowing the edges of the sprite to be smoothed out without intervention from the background.
tokumaru wrote:
Background data doesn't belong to the sprite in the first place, so it's better to have NO data than have the WRONG data. But that's not even the case, since transparency IS data.
tokumaru wrote:
Transparency. If real transparency is not an option, as a last resort you can have a special color double as transparency and remove that later.
Yeah, that doesn't work as well as you might think. See my edits above. Even if you assumed transparency, the colors are incorrectly blended when you place the scaled sprites over the scaled BG. Slight parts around the BG where it approaches an overlap with the sprite need to blended as well, else you still end up with sprite/BG transitions that look sharper rather than smoother, which is a problem for scaling algorithms that aim for smoothness, not sharpness. Forgoing transparency altogether in place of a special color leaves you with potentially sharp or defined edges when you remove those colors and paste the sprite onto the BG plane. Again that might be a neat technique for scaling methods aiming for overall sharpness, but most prioritize smoothness.
Let me further illustrate the issue. Here is the same Shantae test, scaling the sprite plane with HQ4x and using transparency. Note the ugly lines around her shoulders and her bangs. This is what I was talking about when sprites "stick out":
http://i4.minus.com/ixpbH1QD6ygcr.pngIt's like someone just learning Photoshop, which isn't enjoyable at all compared to scaling the entire image via HQ4x. If you look closely, you can see that there's a sort of thin "film" present around Shantae in various parts.
tokumaru wrote:
I'm not saying that filtering individual layers IS better, because I haven't seen the results yet, but in my head, keeping layers from interfering with each other can only be a good thing, but I'll only be sure after I see some test images. Another important point is that I don't even know how fast this would be.
Keeping layers from blending is good when you aren't scaling anything whatsoever. If I were making a game for, say the GBA, I would not want to start blending BG0 with OBJs unless I was aiming for a specific effect. But when you go about scaling an image, you usually don't do the individual layers, you scale the final frame. The final frame will have sprite and BG pixels side-by-side, so if it the scaling algorithm introduces new colors, it's good to blend the two. The overall image looks more natural.
tokumaru wrote:
And that's exactly what the suggestion of filtering the layers separately is trying to improve on! If current filtering technology isn't able to distinguish layers, it will keep blotching together objects that shouldn't be!
But that's the thing, the layers need to be together
See my reasoning above. Again, if you were not doing any scaling, it doesn't really make sense to do blending, but when you are, if you want the entire image to look cohesive, you blend everything to some extent, BG or sprite pixel.