Hey there,
here's another crazy idea for a feature that I think could enhance the graphics of the old games. Not being a coder myself, I don't know if it's possible.
Would it make any sense to add an anti-alias option for the drawing of the actors in the supported Games? I think it was already done this way by Broken Sword 2 in the original engine, or am I wrong?
All the best,
Kevin
Anti-Aliasing for Protagonists
Moderator: ScummVM Team
-
- ScummVM Team Member
- Posts: 377
- Joined: Sat Sep 24, 2005 12:25 pm
- Location: Austria
Re: Anti-Aliasing for Protagonists
Try any of the high quality scalers under Graphics mode.KevinW wrote:Hey there,
here's another crazy idea for a feature that I think could enhance the graphics of the old games. Not being a coder myself, I don't know if it's possible.
Would it make any sense to add an anti-alias option for the drawing of the actors in the supported Games? I think it was already done this way by Broken Sword 2 in the original engine, or am I wrong?
All the best,
Kevin
Kevin, I think what Joachim suggested was different.
The scalers are "dumb" enhancers, in the sense that they act on each picture frame as a non-distinctive array of pixels.
His suggestion (as I understand it) is to use anti-aliasing techniques on the actor themsleves, which could distinguish them from the background image, and enhance their look.
I personally think it has great potential. I hope someone will pick up that glove.
Omer Mor.
The scalers are "dumb" enhancers, in the sense that they act on each picture frame as a non-distinctive array of pixels.
His suggestion (as I understand it) is to use anti-aliasing techniques on the actor themsleves, which could distinguish them from the background image, and enhance their look.
I personally think it has great potential. I hope someone will pick up that glove.
Omer Mor.
THere will be 2 things: either sprite borders will be jagged or alpha blending should be implemented. Not to say that I'm not aware about any real time scaler which takes alpha channel in account, but may be that's just me. In any case code complexity will be quite high. Kevin, did you try to do it by hand and see if result is really nice.
Eugene
Eugene
you can't really achieve true anti-aliasing without down-sampling from a larger quality image, which in this case you don't have. the 'anti-aliasing' in broken sword 2 i believe is just the result of different quality sprite rendering, weather to use an true alpha-channel or a bit-mask channel.
any attempts to create anti-aliasing on bitmap graphics like these, without a larger quality version to work with is likely to just look like a blurred edge, instead of a well defined yet smooth edge. (you get the latter with edge detecting scaling filters like hq2x and to a smaller extent, advance2x)
any attempts to create anti-aliasing on bitmap graphics like these, without a larger quality version to work with is likely to just look like a blurred edge, instead of a well defined yet smooth edge. (you get the latter with edge detecting scaling filters like hq2x and to a smaller extent, advance2x)
I don't understand why edge detection algorithms which work on a regular bitmap would be more successful at detecting the edges, while the real edge of the sprites is known to us before we render the final image, and can be used in a more sophisticated anti-aliasing algorithm.
I believe that when we are rendering the picture at higher resolution, we should be able to scale up the sprites first, and use alpha-channel in the sprite's edge.
Then we'll scale up the background, and after that we'll mix them together.
Without testing this theory, I believe it should have better visual results than a generic scaler that has no real knowledge about the true edges of the sprites.
I believe that when we are rendering the picture at higher resolution, we should be able to scale up the sprites first, and use alpha-channel in the sprite's edge.
Then we'll scale up the background, and after that we'll mix them together.
Without testing this theory, I believe it should have better visual results than a generic scaler that has no real knowledge about the true edges of the sprites.
honestly, even if you went and created your own scaler (and believe me, after designing a marching cubes scaler a while back, its no walk in the park) that took into equation bit-masks, it would still only look marginally more defined than the hq range of scalers, the only place where you would see any real difference is when a part of the sprite with colour_a moves next to a part of the background with colour_b. with colour_b being marginally different than colour_a.
is the result of a slightly more well defined edge in a small set of circumstances really worth the effort?
is the result of a slightly more well defined edge in a small set of circumstances really worth the effort?
hopefully to put the subject to death, and because i had 20 mins to waste i created a small program based on the hq-filters. and this was the result. the first image was created by filtering both the sprite (guybrush) and the background independently, and composing them together, the second is a straight screenshot from scummvm with hq3x.
the anti-aliased edges just look less well defined and blurry, mainly because the hq filter uses the pixels around edges to create nice smooth edges, when its done independently it just has the equivalent of one plain colour for the background (transparency)
the anti-aliased edges just look less well defined and blurry, mainly because the hq filter uses the pixels around edges to create nice smooth edges, when its done independently it just has the equivalent of one plain colour for the background (transparency)