Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Pixeling > dithering question
2023-03-01 11:11
NoiseEHC

Registered: Feb 2005
Posts: 13
dithering question

Hi!

I have been just looking at recently released MULTI graphics, and what I noticed is that the majority of images use horizontal line dithering. For example:
Always Look at the Bright Side of Life

While in the past most images used checkerboard dithering, for example Hein's graphics in Dutch Breeze. But current example:
Birdman

(Note both images contain both type of dithering, just one is much more dominant.)

And very few use diffuse (random) dithering for some reason.

So what is the reason of this difference? Is it only the preference of the artist, or is there an advantage of horizontal line dithering on a TV? I do not have a real C64 anymore, so I cannot check it unfortunately.

Another question: why are there so few diffuse dithering out there? Is this because this is much harder to do, or is there some visible disadvantage?

Thanks
 
... 15 posts hidden. Click here to view all posts....
 
2023-03-02 18:20
Hein

Registered: Apr 2004
Posts: 877
Quoting NoiseEHC
The reason I ask these questions because I am working on an editor which is a plugin for GIMP. The plan is to draw pictures using my pen tablet, which are converted into 16 color dithered images in real-time. Controlling colors/sprites will be done using some extra layers in the source image. Obviously it will work only if the dithering is good in the first place.


I haven't experimented alot with different patterns, but I think it'd be nice if you'd let the user select the pattern to use while painting. I suppose the choice depends on what kind of effect or material needs to be created.
2023-03-02 18:59
Groepaz

Registered: Dec 2001
Posts: 10589
Quote:
And at least s-video still exhibits black bleed

Until you replace the Modulator by one of the replacement circuits - then it is gone :)
2023-03-02 22:09
Deev

Registered: Feb 2002
Posts: 176
Quote:
Ok, fair points. Perhaps in the future it will just be like songs specifying which SID chip is preferred :)


I'm certainly in favour of exploiting these things for effect if possible. I'm not sure it's possible to do anything too interesting in composite, but I'd love to see someone prove me wrong! Seeing what people do with the 5 luma VIC is always interesting as well.
2023-03-03 03:26
NoiseEHC

Registered: Feb 2005
Posts: 13
Quoting Hein
I haven't experimented alot with different patterns, but I think it'd be nice if you'd let the user select the pattern to use while painting. I suppose the choice depends on what kind of effect or material needs to be created.


Yeah, that is the plan to have different dithering settings, most likely per layer, or per character. But for that it would be awesome if more graphicians would give their two cents about THEIR completely subjective opinion about how they like to dither, the way Deev already did. Because I am not an artist, I am a coder. I know only how to write code...

On the other hand, there are two objective differences I can see between checkerboard and horizontal line dithering:
1. Checkerboards have half the pixels on the second lines, where vertical PAL color mixing change their color, effectively creating 4 different colors from a 2 color checkerboard pattern. It does not happen with horizontal lines, they only have 2 colors.
2. Checkerboards have the horizontal color bleeding everywhere, which does not happen with horizontal lines, which are obviously homogenous horizontally.



Quoting Groepaz
Color bleeding happens horizontally, while the PAL mixing happens vertically. And yes, VICE (and every other emu) should emulate it - however, this is something to be implemented in shaders, its way too costly to do in software (if you want to do it correctly)


As far as I see, VICE (GtkVICE 3.6.1) already emulates something like that, it would be good to know from a VICE developer if that is the same thing we are talking about here:
https://i.ibb.co/pbrbzhk/pal-color-mix-4x.png
(I marked the color pairs with identical luma with rectangles.)

On the left side it is a screen capture with "CRT emulation" enabled, where "Double size" is not checked, magnified 4x so it is easier to pick colors in a photo editor. On the right "Double size" is checked, so it was magnified only 2x, and you can see VICE emulates the darker void between pixels, but the colors of the middle of the pixels seems to be the same both cases.

What I see interesting is that while the color of first lines seem to remain constant horizontally, it actually varies it just a little bit depending on the color pair. The color of the second lines varies a lot more obviously, because of the vertical color mixing. It would be good to know if the default "Pepto (PAL)" palette of VICE is actually representative of a real C64, because in the past the colors of emulation seemed much-much more brilliant than the real thing...

For the horizontal bleeding, there are a lot of transitional pixels, and it seems that the transition is 2 (or rarely 3) pixel wide, which seems to match the measured Luma change speed in the above shared webpage.

If somebody could run the test program on a real c64 and make a good quality photo of the monitor itself, that would be awesome. (I guess a frame grabber might not generate an image like a TV, but who knows?)
https://drive.google.com/file/d/17ZkQf4xm0rRyNWLNbAO1z4fr6gM67m..
2023-03-03 07:15
Hein

Registered: Apr 2004
Posts: 877
Quoting NoiseEHC
Yeah, that is the plan to have different dithering settings, most likely per layer, or per character.

How about selecting dithering (texture, hardness, opacity etc.) same as selecting a brush? Maybe also detect mouse direction and speed and change the dithering pattern based on that. This would feel more natural to me.

Then again, I'll leave the dithering to the pros, hope the other graphicians want to share their preference.
2023-03-03 10:15
Oswald

Registered: Apr 2002
Posts: 4852
suggestion: make dither "strongness" adjustable with mousewheel, and some drop down list to select style.
2023-03-03 12:23
Groepaz

Registered: Dec 2001
Posts: 10589
Quote:
As far as I see, VICE (GtkVICE 3.6.1) already emulates something like that, it would be good to know from a VICE developer if that is the same thing we are talking about here

First, use a recent VICE, not the one from last year. In recent VICE the colors used are from new measurements (made by Tobias) that accurately represent the differences between odd and even lines, and the differences between old/new VIC. Do NOT use any external palettes - because then those things are plain wrong. Do NOT disable double size, because then some aspects of the CRT emulation do not work right. Basically leave everything at their default settings. Preferably use the latest development build from https://github.com/VICE-Team/svn-mirror/releases - then you will also get the recently fixed default for gamma correction (which was not neutral before). And if the colors are too vibrant for your taste, dial down brightness/saturation/contrast all to 100%. It does not make a lot of sense to use a color picker to pick individual pixel colors from the resulting output either :) If you want to use a palette for your gimp experiments, you might want to use the "colodore" palette, which is more accurate than "pepto". (Or ask Tobias for the calculated averaged RGB palette based on his measurements, that will be even more accurate)

Now for what it emulates and how good:
- The vertical color mixing ("PAL" mixing) is very accurate and reproduces all known side effects. That includes "hannover bars", and the differences between monitors that use a delay line only for one color component ("u only delayline" setting). The later is the case for example in the 1084 monitor. As said above, you must NOT use any external palette (or disable double size), or those things will not work right.
- The horizontal color mixing ("color bleeding") is not emulated well, it is basically just some blur. In particular non linear effects like "black bleed" is not reproduced at all, nor is chroma/luma crosstalk (the famous green/red pattern you can see when doing a checkerboard pattern in hires). I believe the current state is closest to what a C64C (new VIC) produces when the modulator has been removed, and the s-video signal is used.

Last not least here are some test programs: https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/crt..
2023-03-09 12:48
NoiseEHC

Registered: Feb 2005
Posts: 13
Thank you for taking the time for this informative response!

Quoting Groepaz
First, use a recent VICE, not the one from last year. In recent VICE the colors used are from new measurements (made by Tobias) that accurately represent the differences between odd and even lines, and the differences between old/new VIC. Do NOT use any external palettes - because then those things are plain wrong. Do NOT disable double size, because then some aspects of the CRT emulation do not work right. Basically leave everything at their default settings. Preferably use the latest development build from https://github.com/VICE-Team/svn-mirror/releases - then you will also get the recently fixed default for gamma correction (which was not neutral before).


Yeah, in the meantime I moved to the latest release, but now I started using GTK3VICE-3.7.1-win64-r43382. The "change" to the "pepto" palette was only my misunderstanding of the settings dialog. I thought that "internal" means that you choose from the internal palettes using the combo box, and "external" means that you have to load the palette with the folder button. The newer UI is not that confusing though. (The best would be to have "internal" the first item in the combo box and remove the radio buttons, but in r43382 it is good enough I think.)

Quoting Groepaz
And if the colors are too vibrant for your taste, dial down brightness/saturation/contrast all to 100%.


I like vibrant colors. My concern was if the colors are not the same as in a C64 monitor, but if these are measured then that is awesome.


Quoting Groepaz
Now for what it emulates and how good:
- The vertical color mixing ("PAL" mixing) is very accurate and reproduces all known side effects. That includes "hannover bars", and the differences between monitors that use a delay line only for one color component ("u only delayline" setting). The later is the case for example in the 1084 monitor. As said above, you must NOT use any external palette (or disable double size), or those things will not work right.
- The horizontal color mixing ("color bleeding") is not emulated well, it is basically just some blur. In particular non linear effects like "black bleed" is not reproduced at all, nor is chroma/luma crosstalk (the famous green/red pattern you can see when doing a checkerboard pattern in hires). I believe the current state is closest to what a C64C (new VIC) produces when the modulator has been removed, and the s-video signal is used.


And here is my problem. In VICE I can create very interesting effects, but I am not that sure now if the display represents reality or not. Or maybe reality has changed in the past to look more like VICE without CRT emulation? :)

Here is a picture from last year's Transmission64 (I asked them and they are recording separate luma/chroma):
https://youtu.be/WwHTp5tI9mY?t=509
The prg file can be found here:
Boimyboi

For example the light red / dark green mix on the neck of the frog looks quite similar both in VICE and on YouTube. But on YouTube the odd/even lines do not look different color at all, while VICE emulates the cheap PAL chroma phase mirroring effect. How can it be? The other difference is that there is some color mixing on YouTube, but it is much less than in VICE. Which one is real?

I am interested in these details because I would like to create some cool effects in my next demo, but it would be kinda pointless if none of the compos would support the real C64 output... :)

Currently I am not 100% convinced if the VICE CRT emulation is the real thing, as I have no access to a real C64 and that way it is quite hard to check it. I will try to find some scene people in New Zealand, as I saw that there were several groups here, and will try to borrow a real C64 and monitor to check my assumptions. In case compos do not look real I can still release my demo just on csdb I guess.
2023-03-09 12:51
Jetboy

Registered: Jul 2006
Posts: 186
Quote: Hi!

I have been just looking at recently released MULTI graphics, and what I noticed is that the majority of images use horizontal line dithering. For example:
Always Look at the Bright Side of Life

While in the past most images used checkerboard dithering, for example Hein's graphics in Dutch Breeze. But current example:
Birdman

(Note both images contain both type of dithering, just one is much more dominant.)

And very few use diffuse (random) dithering for some reason.

So what is the reason of this difference? Is it only the preference of the artist, or is there an advantage of horizontal line dithering on a TV? I do not have a real C64 anymore, so I cannot check it unfortunately.

Another question: why are there so few diffuse dithering out there? Is this because this is much harder to do, or is there some visible disadvantage?

Thanks


> And very few use diffuse (random) dithering for some reason.

The reason is quite simple. It is used when converting ready image, by device that does not care to do a lot of calculations, but for human doing it while painting would be fucking inconvenient and hard to automate. People are lazy and tend to use solutions that are less work for them :) Unless they try to prove a point :) Well, most of the scene prods are doing that though. "So you say it is impossible? Please hold my beer..."
2023-03-09 15:11
Groepaz

Registered: Dec 2001
Posts: 10589
Quote:

For example the light red / dark green mix on the neck of the frog looks quite similar both in VICE and on YouTube. But on YouTube the odd/even lines do not look different color at all, while VICE emulates the cheap PAL chroma phase mirroring effect. How can it be? The other difference is that there is some color mixing on YouTube, but it is much less than in VICE. Which one is real?

Never judge those things from a recording - and much less from youtube video. That adds so many things to the mix, all of which may introduce additional "smoothing". On my setup (new C64/1701 monitor) eg the odd/even lines difference is even more visible than in default VICE settings, eg in solid violet areas.

Quote:
I am interested in these details because I would like to create some cool effects in my next demo, but it would be kinda pointless if none of the compos would support the real C64 output... :)


You probably can not rely on the details of those things, they will not be reproduced the same on different c64+crt setups, and some things just wont be reproduced correctly at all once you add a projector or recording into the mix. I'd always at least check with a couple different c64+crt combinations - And then you will likely come to the conclusion that you can only rely on the principle of PAL mixing, but not on certain details.

Regarding emulation this is a similar problem as SID filters. There is no "right" or "wrong" when it comes to certain things, and all the emulator can try to do is matching "a" C64. But it will never match "all" C64s. And it will always be different to "your" C64 =)
Previous - 1 | 2 | 3 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
MCM/ONSLAUGHT
d0c
Scrap/Genesis Project
Airwolf/F4CG
fandenvoldsk
Slator/Arsenic/Stone..
Courage/PTV
katon/Lepsi De
MightyAxle
Martin Piper
Martinland
Krill/Plush
Guests online: 88
Top Demos
1 Edge of Disgrace  (9.6)
2 Coma Light 13  (9.6)
3 Uncensored  (9.6)
4 Comaland 100%  (9.6)
5 Lunatico  (9.6)
6 Bromance  (9.5)
7 E2IRA  (9.5)
8 Unboxed  (9.5)
9 The World Is Not Eno..  (9.5)
10 Memento Mori  (9.5)
Top onefile Demos
1 Party Elk 2  (9.9)
2 Copper Booze  (9.6)
3 Barry Boomer - Trapp..  (9.5)
4 Dawnfall V1.1  (9.5)
5 Daah, Those Acid Pil..  (9.5)
6 Onscreen 5k  (9.5)
7 POKE 56576,1 for Unl..  (9.5)
8 No Mercy for the Tro..  (9.4)
9 Offering  (9.4)
10 Selbuvotter Latitudes  (9.4)
Top Groups
1 Booze Design  (9.4)
2 Censor Design  (9.3)
3 Crest  (9.3)
4 Oxyron  (9.2)
5 Maniacs of Noise  (9.2)
Top Graphicians
1 Talent  (9.9)
2 Mirage  (9.8)
3 Archmage  (9.8)
4 Electric  (9.7)
5 Mikael  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2023
Page generated in: 0.067 sec.