23 February 2019, 12:12 | #21 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
For computing the color difference, i got good results with R*2+G*3+B*1. |
|
23 February 2019, 12:26 | #22 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,474
|
Quote:
My idea is to use a regular HAM image where base color 15 is unused and free to be used by 'anti-fringe' code. Then a second partial chunky RGB 12bit image for the same picture (pre-calculated using RGB colors same as HAM image). |
|
26 February 2019, 00:04 | #23 |
Registered User
Join Date: Apr 2017
Location: France
Posts: 579
|
Thanks Ross for the clarification.
I have done my POC using Amos and it work well. I use a simple trick. I maintain an array containing the last indexed pixel encountered for each lines and I put it back if the current colour is an "hold an modify" one (not an indexed one). Pro: small memory imprinted, short time for dev. Con: slow? not the best result? Perhaps it would be possible to store, for each column, in a very packed fashion, only bits that need to be changed to suppress the read column step. Not my goal at the moment. I'm curious to see the result of the same technique applied to Bobs. Code:
Screen Hide 0 Flash Off Curs Off FILE$= FSEL( "", "", "Load Iff file to display") Load Iff FILE$, 0 Locate 10, 5 S_HEIGHT= Display Height Rem Print S_HEIGHT Reserve As Work 5, S_HEIGHT Locate 3, 0 For X= 0 To 150 Rem --Read colours of first column of pixels-- For Y= 0 To S_HEIGHT- 1 PIXELCOLOUR= Point( X, Y) If PIXELCOLOUR< 16 Poke Start( 5)+ Y, PIXELCOLOUR End If Next Y Rem --Scroll 1 pixel-- Screen Offset 0, X, 0 Rem --Put colour back if not an indexed colour-- For Y= 0 To S_HEIGHT- 1 PIXELCOLOUR= Point( X, Y) If PIXELCOLOUR> 15 Plot X, Y, Peek( Start( 5)+ Y) End If Next Y Wait 3 Next X Wait 100 End |
26 February 2019, 09:22 | #24 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,474
|
Quote:
I have not tried your code so I do not know how effective it is. But with this technique you could not have wrong colors instead of the fringe for the first pixes after the indexed? Because when you insert the indexed pixel you do it 'in the middle' of a possible series of modified pixels. To move from one color to another you need 3 'steps' minimum, so a little bit of color errors should be visible.. |
|
26 February 2019, 09:35 | #25 |
Registered User
Join Date: Sep 2011
Location: Paris/France
Posts: 274
|
Perhaps the more efficient would be have a "correction map"
I mean a bitmap filled with the "nearer" palette color vs the current ham pixel on the ham picture ie: for each pixel in ham picture found out what is current 12bits RGB ham color then found nearer palette value You can enhance the trick as if ham pixel at (say) xy 10,20 is R4G8B6 and next pixel at xy 11,20 modify to R8 then only take into account the G an B value to find out the best palette value as the R value will be "auto corrected" BTW & OT: Perhaps doing a game in ham with only the characters("sprites") in ham and the background in palette pixels would be simpler : the characters ("sprites") will be surrounded with a black(palette) outline so HAM values would be assured to start/end on black for the "sprites" |
26 February 2019, 11:59 | #26 | |
Registered User
Join Date: Dec 2014
Location: germany
Posts: 439
|
Quote:
|
|
27 February 2019, 21:41 | #27 | |
Registered User
Join Date: Apr 2017
Location: France
Posts: 579
|
Quote:
@thellier I agree with the "correction map", thanks for the idea. I guess a lot of optimization can be done. I don't want to use sprites. Too limited in colours, it's ugly on an HAM screen. |
|
28 February 2019, 11:16 | #28 | |
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,295
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sham instead of ham ? | turrican3 | Retrogaming General Discussion | 2 | 11 September 2020 13:11 |
Why is HAM so underrated? | Foebane | Retrogaming General Discussion | 15 | 02 December 2017 12:25 |
Ham videos | Zooup1972 | support.Apps | 17 | 19 April 2015 00:35 |
Amiga HAM | Si-Pie | Amiga scene | 12 | 13 November 2008 23:50 |
HAM Demo | Frazor | request.Demos | 2 | 06 August 2003 14:36 |
|
|