English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 13 April 2018, 11:05   #1
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,302
Color Fading

When I coded a fade effect with pc, it was very easy, because I use a "big" quad coupled with alpha effect: job done!

It's that possible to do somenthing with Amiga? I would like to do a fade effect on Ham8 pics
sandruzzo is offline  
Old 13 April 2018, 11:38   #2
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
You would have to fade not only your base palette, but also the contents of the bitplanes that modify the R,G or B component.

I have no idea how this can easily be done quickly.

Perhaps using some kind of blitter subtractive algorithm (similar to shade bobs)... but that would be quite slow.
DanScott is offline  
Old 13 April 2018, 12:21   #3
britelite
Registered User
 
Join Date: Feb 2010
Location: Espoo / Finland
Posts: 818
Yeah, I think the fastest way to fade would probably be to add a sprite layer on top of image and fill that with a dithered pattern to achieve fading. Won't look as good as modifying actual RGB-values, but should be fairly fast
britelite is offline  
Old 13 April 2018, 13:18   #4
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,154
Quote:
Originally Posted by DanScott View Post
I have no idea how this can easily be done quickly.

Perhaps using some kind of blitter subtractive algorithm (similar to shade bobs)... but that would be quite slow.
It can be done quickly enough to look nice with low-res HAM6 images (Here's an AMOSPro demonstration - http://retroramblings.net/?p=25) but I think it'd be too slow with HAM8.
robinsonb5 is offline  
Old 13 April 2018, 13:32   #5
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
Quote:
Originally Posted by britelite View Post
Yeah, I think the fastest way to fade would probably be to add a sprite layer on top of image and fill that with a dithered pattern to achieve fading. Won't look as good as modifying actual RGB-values, but should be fairly fast
By writing random "noise" into the sprite data (and biasing the noise from 0 to solid pattern, with halfway at 50% noise) you could make a pretty decent "fizzle" fader... would look really good at 50fps

Precalculate the noise as a page (for example 1024 pixels wide), with 64 pixel vertical columns of different intensities of noise, and blit the strips (with a random y start offset) into the sprite data
DanScott is offline  
Old 14 April 2018, 17:45   #6
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,613
Yes, a proper fade must be done by processing the bitplane data. HAM8 = more MA slots taken+more to process+same Blitter = substantially slower.

You could process parts of it at a time with a pattern, e.g. "blinds" or bobs and it would appear smoother, or shrink the screen.

If you have ~1.1MB free chip or fast you could process 14 frames while showing the pic to be ready in time for the fade.
Photon is offline  
Old 14 April 2018, 20:36   #7
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
@robinsonb5: That's a nice method, thanks for sharing!

Quote:
Originally Posted by Photon View Post
HAM8 = more MA slots taken+more to process+same Blitter = substantially slower.
Hmm, I'd think a HAM8 fade on AGA would be same speed or faster than a HAM6-fade on OCS (both lowres). HAM6 on OCS: ~40,000 chipmem slots per frame free for blitter/copper/cpu if only display dma is active, HAM8 on AGA (FMODE=3): ~60,000 slots free. HAM6 needs to fade 4 planes, HAM8 6 planes - so roughly 10k slots per frame and plane available for both. If you have additional audio/copper dma OCS is more affected because it leaves a smaller percentage of available slots.
chb is offline  
Old 14 April 2018, 23:10   #8
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,613
Quote:
Originally Posted by chb View Post
@robinsonb5: That's a nice method, thanks for sharing!



Hmm, I'd think a HAM8 fade on AGA would be same speed or faster than a HAM6-fade on OCS (both lowres). HAM6 on OCS: ~40,000 chipmem slots per frame free for blitter/copper/cpu if only display dma is active, HAM8 on AGA (FMODE=3): ~60,000 slots free. HAM6 needs to fade 4 planes, HAM8 6 planes - so roughly 10k slots per frame and plane available for both. If you have additional audio/copper dma OCS is more affected because it leaves a smaller percentage of available slots.
Yep, that's correct. I have no idea why I wrote more MA slots taken. More to process, more slots free, HAM8 will be roughly the same speed on AGA as the HAM6 example on OCS.
Photon 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
Colour fading? h0ffman Coders. General 17 02 December 2018 12:41
Color Saturation and Color Tint/Hue Retro-Nerd support.WinUAE 22 02 August 2018 10:38
Printing in color with WinUAE on color laser source support.Apps 7 14 April 2013 00:32
CD32 sound fading in and out Cooljerk support.Hardware 4 31 October 2011 21:30
ISO true color to 256 color algorithm Lord Riton Coders. General 19 15 April 2011 17:49

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 22:32.

Top

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