Dithering in 16-Color SCI Games

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

OmerMor
Got a warning
Posts: 176
Joined: Thu Nov 17, 2005 9:29 pm
Location: Israel
Contact:

Dithering in 16-Color SCI Games

Post by OmerMor »

As much as I love the new "undithering" technique used in ScummVM, I also enjoy seeing the games in their original dithered glory from time to time.
So I looked in the source code and found out how to enable dithering back in the SCI engine, and wanted to share with the rest of the community.
To enable dithering (which is disabled by default), you need to add this line to the relevant game section in the scummvm.ini file (on my machine it is found at %APPDATA%\ScummVM\ ):

Code: Select all

sci_undither=false
And to illustrate the difference, here are 2 images from Colonel's Bequest:

Dithering Disabled:
Image

Dithering Enabled:
Image

EDIT by m_kiewitz: this laura bow 1 undithering bug was fixed in r53515
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

This is definitely something we should offer in ScummVM, too. In fact, I believe there should be a GUI option to switch this behavior (inside the SCI engine itself, ideally).
User avatar
m_kiewitz
ScummVM Developer
Posts: 157
Joined: Tue Dec 01, 2009 10:09 am
Location: Daventry

Post by m_kiewitz »

just fyi: you may also use the command "undither 0/1" while playing the game. Changes will get applied when entering another room afterwards.

EDIT: don't use this way anymore, instead set "sci_undither=1" in scummvm.ini or even use the GUI option, if available.
Last edited by m_kiewitz on Fri Nov 05, 2010 12:44 am, edited 2 times in total.
User avatar
LogicDeLuxe
Posts: 437
Joined: Thu Nov 10, 2005 9:54 pm

Post by LogicDeLuxe »

Are the closets and the door supposed to look different? They are not exactly what I would call "dithered" to begin with.
User avatar
m_kiewitz
ScummVM Developer
Posts: 157
Joined: Tue Dec 01, 2009 10:09 am
Location: Daventry

Post by m_kiewitz »

LogicDeLuxe wrote:Are the closets and the door supposed to look different? They are not exactly what I would call "dithered" to begin with.
in that room closets and doors are actually cels that are drawn on top of the picture. They are also "undithered", that's why they look different. In that case the cel-undithering doesn't seem to work as its supposed to, still that code uses heuristics to detect unditherable cels.
Bluddy
ScummVM Developer
Posts: 145
Joined: Sun Nov 18, 2007 8:43 am

Post by Bluddy »

I have a hard time understanding why anyone would want to play it dithered. Nostalgia is fine (I mean it's a big chunk of what Scummvm's about :) but just realize that you're getting to see what the artists really intended the game to look like - it's like a long-lost director's cut (and a beautiful one at that).
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

But we are not getting to see the game as the artists intended them. We will never know for sure how that looks. Instead, we get a different approximation of that; one that in some regards is better, but in others is worse. For example, the shelves on the left and right side of the room, if you look at their sides closely, then in the undithered version, they are clearly messed up -- the "L"-shaped light brown lines are merged in the undithered version, which looks wrong, while in the dithered version, it looks perfectly fine. As LogicDeluxe already pointed out, the big door in the middle also looks weird to me, just as the two small closets.

Until the "undithering" code becomes perfect (something I doubt will ever happen), I think we should let people choose to play as the game was published (and tested by its developers and artists).
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

fingolfin wrote:Until the "undithering" code becomes perfect (something I doubt will ever happen), I think we should let people choose to play as the game was published (and tested by its developers and artists).
I just want to point out here that this optimization is only done at the front layer, i.e. the bounding boxes underneath etc are untouched, thus the game logic isn't affected at all
User avatar
m_kiewitz
ScummVM Developer
Posts: 157
Joined: Tue Dec 01, 2009 10:09 am
Location: Daventry

Post by m_kiewitz »

fingolfin wrote:For example, the shelves on the left and right side of the room, if you look at their sides closely, then in the undithered version, they are clearly messed up -- the "L"-shaped light brown lines are merged in the undithered version, which looks wrong, while in the dithered version, it looks perfectly fine. As LogicDeluxe already pointed out, the big door in the middle also looks weird to me, just as the two small closets.
Like I said - those cels are getting undithered (which is not the same as undithering pictures) and in that case it doesn't work as its supposed to.
Until the "undithering" code becomes perfect (something I doubt will ever happen), I think we should let people choose to play as the game was published (and tested by its developers and artists).
I didn't know about those cels till now. I did the original heuristics for cel detection and undithering and it's not a real problem to tweak them slightly. Even if this wasn't possible one could still maintain a list of cels that need to get undithered.

Games like qfg1ega work already perfectly with unditherung enabled.

Also like [md5] already said: the unditherung doesn't affect the game at all.

Also there are 2 unditherings done. First the "undithering" of the actual background picture - that one will work at any times, because actually we just don't apply dithering instead of "undithering". Second the "undithering" of cels that are drawn on top of the background - that one needs to detect the cels that are supposed to be on top (only those, not actors) and also needs to really undither the cel data, cel data from sierra actually is already dithered, so this is not trivial at all.

If we only do the first, then some rooms won't look good (like in kq1 or in the intro selection of qfg1).
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

My remark about "testing" was not geared towards playability issues (although it's conceivable that broken undithering could render some crucial graphics undecipherable, although I doubt that'll turn out to be an issue). Rather, my point was that the game developers and artists never got to test, play, try out the game in this modified form. Thus arguing that it's somehow closer to the vision of the artists for how the game should look is nonsense :-).

Anyway, I don't have a problem with undithering as such, I just don't want to be forced to use it; and based on experience with similar "improvements" in other games, I am pretty sure that a noticeable percentage of our users would agree.
Bluddy
ScummVM Developer
Posts: 145
Joined: Sun Nov 18, 2007 8:43 am

Post by Bluddy »

Rather, my point was that the game developers and artists never got to test, play, try out the game in this modified form. Thus arguing that it's somehow closer to the vision of the artists for how the game should look is nonsense.
I may be wrong, but from my understanding, the background artists went out of their way to create creative backgrounds that had individualized 16 color palettes. When put into the games, the backgrounds were shoehorned into another, fixed palette per game, which was presumably used because the sprite artists didn't want the actors to change colors. This caused the (in my opinion) ugly dithering, which must have been quite annoying to the background artists.

The background artists clearly meant to use those different palettes, or they would have stuck to the game palettes, as can be seen in games such as PQ2 and KQ4. Since the game files contain the extra information and were only limited by the technology of the time, I consider the undithered versions to be the true artistic visions of the background artists. Of course this is purely a matter of opinion and I didn't mean to suggest that the option to play with dithering should not be available.

BTW kiewitz great job on the undithering heuristic -- I really like it.

Bluddy
KevinW
Posts: 26
Joined: Wed Jan 04, 2006 2:40 pm
Location: Bochum, Germany
Contact:

Post by KevinW »

Although the undithering algorithm may not work perfectly, I think it does look nicer in terms of colouring. Of course, there's upsides and downsides, but I really like these kinds of enhancements.

I guess if you leave them optional it should make everybody happy.
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Sure, I didn't say we should remove the code, just improve it.

Regarding the colors, though, I actually think the undithered version looks worse with regards to colors. In particular the light and dark brown used on the doors / cabinets now has a much higher contrast (to my perception, at least) than the original (dithered) one; they look rather awkward now. This is something that hopefully could be improved (on a scene-by-scene basis) by overriding color choices for specific objects/cells, as was possible in FreeSCI.
User avatar
m_kiewitz
ScummVM Developer
Posts: 157
Joined: Tue Dec 01, 2009 10:09 am
Location: Daventry

Post by m_kiewitz »

fingolfin wrote:In particular the light and dark brown used on the doors / cabinets now has a much higher contrast (to my perception, at least) than the original (dithered) one
Actually those cels are not dithered at all :) They are only detected as being dithered and then "undithered", but that's wrong. Normally those cels shouldn't get modified in anyway.

for working examples take a look at the initial screen of qfg1ega or the gate with the goat in kq1.
OmerMor
Got a warning
Posts: 176
Joined: Thu Nov 17, 2005 9:29 pm
Location: Israel
Contact:

Post by OmerMor »

I just want to be clear on this: I love the undithering algorithm, and I think it looks much better than the original. Sure, it has some bugs that will fixed, but even now the overall look of the scenes looks better to me.
The only reason I brought this topic is to give it some awareness, and because I enjoy comparing it with the original look.
I believe the original artists intended for the backgrounds to look something like that because they used a virtual palette of more than 16-colors, and the drawing engine dithered it into 16 colors.
However - changing this into an optional settings is something I can happily live with. It would be even nicer if you could switch modes on the fly, like the graphic renderers.
Post Reply