English Amiga Board


Go Back   English Amiga Board > Requests > request.Other

 
 
Thread Tools
Old 21 October 2016, 02:33   #1
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,782
Convert 16 colour pic 2 OCS/ECS

I cannot covert the following picture to OCS its only -16 colours
the results are the second picture
In 16 colour AGA the picture is fine but in OCS the results are not good.
Attached Thumbnails
Click image for larger version

Name:	copper12.png
Views:	195
Size:	486 Bytes
ID:	50539   Click image for larger version

Name:	copper6.png
Views:	204
Size:	835 Bytes
ID:	50540  
Retro1234 is offline  
Old 21 October 2016, 12:35   #2
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,782
Anyone got any ideas on this why 16 colour AGA is ok but 16 Colour OCS is not?
I assume because there is nothing similar in the OCS palette?
Retro1234 is offline  
Old 21 October 2016, 13:07   #3
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
OCS colors use 12bit palette entries, aga uses 24 bit, so when colors are similar/close, you get banding like that.. It's practically the same phenomenon you see in a jpeg picture, if you compress it too hard..
hooverphonique is offline  
Old 21 October 2016, 13:10   #4
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,782
is there anything I can do to get better results.
Retro1234 is offline  
Old 21 October 2016, 13:36   #5
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,340
Use a good program.
idrougge is offline  
Old 21 October 2016, 13:45   #6
Master484
Registered User
 
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
Quote:
is there anything I can do to get better results.
Try converting the colors of the picture to OCS color values before loading and displaying it.

When I make OCS graphics on the PC and convert them to OCS IFFs, I always have to convert the colors to OCS colors first, or else the colors will be wrong.

I don't know if it helps, but to convert a Windows RGB color ( value range 0-255 ) to an OCS color ( value range 0-15 ), you should divide the RGB value with the number 17, and then round up the result to the closest OCS value (0-15).

So for example 255 / 17 would be 15.
But 240 / 17 would be 14.117 so it has to rounded up to 14.

The easier way would be to draw OCS images by using the directly corresponding RGB values, so that no conversion is required after the image is ready.

Here is a chart for the OCS values and their corresponding RGB value:
OCS Value --- RGB Value
0 --- 0
1 --- 17
2 --- 34
3 --- 51
4 --- 68
5 --- 85
6 --- 102
7 --- 119
8 --- 136
9 --- 153
10 --- 170
11 --- 187
12 --- 204
13 --- 221
14 --- 238
15 --- 255

This works for me, but I create all my gfx on PC, so I don't know how things work if you're doing an AGA --> OCS conversion in Amiga DPaint for example.
Master484 is offline  
Old 21 October 2016, 13:54   #7
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,782
Thanks ill try that.
Retro1234 is offline  
Old 21 October 2016, 16:18   #8
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,782
dividing these values by 17 doesnt seem to work am I doing something wrong.
Attached Thumbnails
Click image for larger version

Name:	IMG_20161021_145406.jpg
Views:	170
Size:	240.2 KB
ID:	50549  
Retro1234 is offline  
Old 21 October 2016, 18:43   #9
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,782
dividing by 17 does work but I just dont think these colours exist within the OCS palette.
So the picture cant be converted but a similar picture only.
Retro1234 is offline  
Old 21 October 2016, 19:49   #10
Master484
Registered User
 
Master484's Avatar
 
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
Quote:
dividing by 17 does work but I just dont think these colours exist within the OCS palette.
So the picture cant be converted but a similar picture only.
That's right, the exact same colors are often not possible with the OCS palette. OCS only has 16 different values for each color component (Red, Green and Blue), and each component has a range between 0 to 15. AGA and RGB color components have 256 different values, ranging between 0 to 255.

So you just have to choose the closest color, and if it doesn't look good, then re-design the image palette for OCS.
Master484 is offline  
Old 21 October 2016, 20:40   #11
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,782
Its the Rainbow from Super Mario 1 SNES so im surprised I cant match it but I dont seem to be able to.
Retro1234 is offline  
Old 22 October 2016, 15:31   #12
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,340
I just did a quick conversion in PPaint and the results are similar to yours. The range of the OCS palette just isn't big enough for those gradients. You could get better results by using dithering.
idrougge is offline  
Old 22 October 2016, 15:57   #13
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,782
dithering is no good I load it in to copper raindow.
I guess the Snes had a wider palette.
Retro1234 is offline  
Old 22 October 2016, 16:09   #14
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,340
I suspected as much. If you make your own rainbow by eye, you'll get better results than a dumb colour mapping algorithm will turn out.

The SNES has a much wider palette; 32 768 colours as opposed to the Amiga's 4 096.
idrougge is offline  
Old 24 October 2016, 23:52   #15
pandy71
Registered User
 
Join Date: Jun 2010
Location: PL?
Posts: 2,778
With few tricks probably you can improve picture - temporal dithering and spatial dither (loading BPLxDAT with pattern like 1010...) should work.
pandy71 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ECS and OCS antonvaltaz Amiga scene 41 12 December 2023 19:44
Menace - OCS Colour Palette invent Retrogaming General Discussion 10 25 February 2015 21:28
convert ecs games to aga ??? turrican3 Coders. General 1 22 April 2013 09:09
Shaq Fu OCS/ECS? Old Fool request.Old Rare Games 6 19 April 2006 18:28
OCS ECS selection? PiCiJi HOL data problems 37 24 September 2003 19:21

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:16.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14720 seconds with 14 queries