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 > converting graphics...
2006-01-15 21:58
spinal
Account closed

Registered: Jan 2005
Posts: 47
converting graphics...

I've started a GFX converter, just for fun.

I started by calculating the possible colors mixable from a fairly accurate C64 palette, and came up with the following 135 color palette (including the origional 16 C64 colors).


Using it, I did an RGB comparison to the 135 colors, an plotted the two colors which compose the mixed color on odd or even lines, ie, if the line being drawn was even, then color 1 was plotted, if odd, color 2. The result follows...

I have yet to do lo-res color reduction(3+background), but there is plenty of time for that.

I was wondering if anyone can offer advice for better quality output, I read in another post, that a luminosity check should be done first, then an RGB check (I assume only checking close luma values), I gave that a go first, but ended up with a very similar output.
 
... 27 posts hidden. Click here to view all posts....
 
2006-01-17 08:58
JackAsser

Registered: Jun 2002
Posts: 1992
Pixel aspect ratio is really simple.

Active PAL pixels are 720x576 which are meant to be displayed on a 4:3 TV.

(720/576)/(4/3) = 0.9375 = 1:0.9375

For NTSC we have 720x480 active pixels, also meant to be displayed on a 4:3 TV.

(720/480)/(4/3) = 1.125 = 1:1.125

VGA monitors which also are 4:3 have a pixel aspect ratio of 1:1 for the following video formats (640x480, 800x600, 1024x768, 1600x1200). So when using those formats you have to scale the images with the above ratios to get a correct output.

However if you choose to use 1280x1024 (as I do), that mode has a resolution aspect ratio of 1.25 which is the exact same resolution aspect ratio as PAL (720x576) so no scaling needed since the pixel aspect ratios for both formats are the same:

(720/576)/(4/3) == (1280/1024)/(4/3) == 0.9375

2006-01-17 09:23
Wildstar

Registered: Nov 2004
Posts: 50
Quote: ALiH: It may be a trivial question and a bit offtopic here, but what is the real C64 pixel aspect ratio (you wrote: "and of coruse it fixes aspect ratio so will look squished on vice")?

After Googling for the answer for 1-2 years, I even tried to measure the size of the between borders area on my 14 col TV with a tape, but I guess that was far from being accurate, so I skipped the idea. I guess the most accurate (but far from being 100% accurate) numbers can be measured on an official Commodore monitor which I don't have.

With the exact aspect ratio in hand even VICE could be stretched to a correct aspect ratio with a software or hardware (rendering into a texture) method (of course some subpixel boundaries would be crossed here and there, but maybe the correct aspect ratio would worth it).


[Deleted]
2006-01-17 14:31
Oswald

Registered: Apr 2002
Posts: 5028
doesnt really belongs to here, but a bit though :)

groepaz: I've tested your YUV method, and it gives mixed results. Generally to me it seems its "just" yet another method of converting the colors, the results vary. some pics are better with it some not. But it will make a nice new option in P1, thanks :)
2006-01-17 15:15
JackAsser

Registered: Jun 2002
Posts: 1992
@oswald: yup, that's the correct approach. Give the end user alot of parameters and the most skilled converter-gfxishan will get the best result. I just hate those "intelligent" programs that don't let you tweak a single thing. For instance, as you support, increasing the contrast prior to converting yields a much better result, otherwize you usually gets a grey/green/brown (quake?) blur.
2006-01-17 16:13
algorithm

Registered: May 2002
Posts: 702
All good info in the post

I have some additional idea's for the next convertor (Will be another IFLI one - but this time to take into account the mix colors) more
2006-01-18 05:29
Credo

Registered: Sep 2002
Posts: 11
JackAsser: I also counted similiar way in the past, and the mentioned aspect ratios theorically should be right, but unfortunately different TVs and monitors are hiding different sized border parts. :( For the golden ratio we should physically measure gazillions of TVs and monitors, and weight the numbers after the statistical spread of these. Or at least measure physically some really high end TVs (top HDTVs) and standard monitors (official Commodore ones).

For the record, I just measured the background without borders (what is surely 320x200 without leftover pixels) with a tape on my almost 21 col totally flat Samsung Plano (not some high end stuff, but better than my previous TV) and got 0.831439 X:Y ratio (the TV and the machine are PAL standards, of course). Even if we count the +/- 1mm inaccuracy in both directions, and the fact it's a middle-class TV in its size, this ratio is way too far from the expected 0.9375. But at the same time almost exactly equals to ALiH's "guessed" ratio, which is 0.833333.

So what do you think, should we take the theorical or the inaccurately guessed and measured ratio, or a ratio inbetween these?
2006-01-18 06:46
A Life in Hell
Account closed

Registered: May 2002
Posts: 204
(edited due to a typo in my code which completly invalidated my point - must remember to change the pixel aspect in _all_ places :-p)

Officially, 1.066667 is the defined standard PAL pixel aspect ratio. I did change my convertor to work using this size, and when I measured it vs. the same image on my PC monitor with a ruler (the hardest part, of course, was finding the ruler!), it came out exactly right. But, your monitor may of course vary.
2006-01-18 09:06
JackAsser

Registered: Jun 2002
Posts: 1992
@Credo: seriously, talking about aspect ratio like this is totaly pointless, it's just theoretical, not very practical. The only way to make the circles circular in C64 demos is to have a 1084-monitor calibration part. =) Seriously.

2006-01-19 20:37
Credo

Registered: Sep 2002
Posts: 11
JackAsser: Absolutely true, but the topic is "converting graphics...", so it may be a good idea to find out the most optimal aspect ratio here (and set it as somekinda standard), therefore emulator, C64 targeted PC graphics editor and C64 targeted PC graphics converter programmers (several people are coding such a things from here, including myself) could skale to the best ratio, what would make a C64 circle perfect both on PC and C64 (and hopefully on standard TV-sets too, not just 1084s).
2006-01-19 21:11
Oswald

Registered: Apr 2002
Posts: 5028
you dont even exactly know the source aspect ratio, and you dont know the c64 aspect ratio. thats about it :)
Previous - 1 | 2 | 3 | 4 - 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
psych
Jazzcat/Onslaught
sebalozlepsi
Wayne/Art Ravers
Stablizer/ExCeSs/DMX
Guests online: 84
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 Layers  (9.6)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Performers  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.216 sec.